diff --git a/CHANGELOG.md b/CHANGELOG.md index 462e6d0..445ba44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.1.2 + +### Added + +- Added `UltraSettings::ApplicationView` which can be used to embed the web UI application showing the configuration inside your own templates. So now you can more seamlessly integrate the settings UI into your own admin tools. + ## 1.1.1 ### Added @@ -20,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Revamped web UI that can now display setting values. - Added option to specify fields as a secret in the configuration to prevent exposing sensitive information in the web interface. By default all fields are considered secrets. This can be changed per configuration by setting the `fields_secret_by_default` property to `false`. -- Added `UltraSettings::ConfigurationView` which can be used to embed the HTML table showing the configuration options and values other admin views. So now you can integrate the settings view into your own admin tools. +- Added `UltraSettings::ConfigurationView` which can be used to embed the HTML table showing the configuration options and values inside other admin views. So now you can more seamlessly integrate the settings view into your own admin tools. - Add `__to_hash__` method to `UltraSettings::Configuration` which can to serialize the current configuration values as a hash. This value can be used for comparing configuration between environments. ## 1.0.1 diff --git a/README.md b/README.md index ca3e38d..632c439 100644 --- a/README.md +++ b/README.md @@ -348,15 +348,23 @@ end, at: "/ultra_settings" #### Embedding the Settings View in Admin Tools -If you prefer to embed the settings view directly into your own admin tools or dashboard, you can use the `UltraSettings::ConfigurationView` class to render the settings interface within your existing views: +If you prefer to embed the settings view directly into your own admin tools or dashboard, you can use the `UltraSettings::ApplicationView` class to render the settings interface within your existing views: ```erb -

My Service Settings

+

Configuration

-<%= UltraSettings::ConfigurationView.new(MyServiceConfiguration.instance).render %> +<%= UltraSettings::ApplicationView.new.render(select_class: "form-select", table_class: "table table-striped") %> ``` -This approach allows for seamless integration of the settings UI into your application's admin interface, leveraging your existing authentication and authorization mechanisms. The settings are rendered in an HTML table which you can format with your own CSS. +This approach allows for seamless integration of the settings UI into your application's admin interface, leveraging your existing authentication and authorization mechanisms. The settings are rendered in an HTML table with navigation handled by an HTML select element. You can specify the CSS classes for these elements and use your own stylesheets to customize the appearance. + +You can also embed the view for individual configurations within your own views using the `UltraSettings::ConfigurationView` class if you want more customization: + +```erb +

My Service Settings

+ +<%= UltraSettings::ConfigurationView.new(MyServiceConfiguration.instance).render(table_class: "table table-striped") %> +``` ### Testing With UltraSettings diff --git a/VERSION b/VERSION index 524cb55..45a1b3f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.1 +1.1.2 diff --git a/app/index.html.erb b/app/index.html.erb index 0eb8346..7e667fe 100644 --- a/app/index.html.erb +++ b/app/index.html.erb @@ -1,8 +1,8 @@
- <% UltraSettings.__configuration_names__.sort.each do |name| %> - + <% end %>
@@ -11,11 +11,11 @@ <% UltraSettings.__configuration_names__.sort.each do |name| %> <% configuration = UltraSettings.send(name) %> -