trestle

A modern, responsive admin framework for Ruby on Rails

LGPL-3.0 License

Downloads
716.5K
Stars
1.9K
Committers
31

Bot releases are hidden (Show)

trestle - v0.9.8 Latest Release

Published by spohlenz over 1 year ago

  • Fix error when mixing string & symbol navigation items
  • Fix development-mode instance error rendering in Rails 7
  • Update to jQuery 3.6.4
trestle - v0.9.7

Published by spohlenz almost 2 years ago

  • Allow helpers and custom fields to be lazily declared using procs (or String constant names)
Trestle.configure do |config|
  config.helper -> { CustomHelper }
  config.form_field :custom, -> { CustomFormField }
end
  • Sort navigation items by name when priority levels are identical (#421 )
  • Update to Bootstrap 4.6.2, jQuery 3.6.1, rails-ujs 6.1.7
  • Fixed compatibility with Haml 6.x (#424)
  • Switch CI from Travis CI to Github Actions
trestle - v0.9.6

Published by spohlenz over 2 years ago

  • Render enum columns as radio buttons within automatic forms (#379)
  • Add support for hash and array parameters in config.persistent_params
  • Implement admin Registry class with support for resource lookups by model
  • Allow passing Trestle.resource(..., register_model: false) to disable model lookup registration
  • Allow class option to be passed to avatar helper
  • Add avatar-sm and avatar-lg CSS classes for small and large avatars
  • Allow HTML options to be passed to sidebar helper
  • Update to Bootstrap 4.6.1, jQuery 3.6.0, FontAwesome 5.15.4, Flatpickr 4.6.13, rails-ujs 6.1.3
  • Revamped sandbox for improved development process
  • Standardize colors for additional alert styles, and add support for variable-width alert icons
  • Fix Ruby 3 kwargs forwarding within form renderer
  • Fix backgrounding and scrolling of stacked modals
  • Fix logo stretching in sidebar header
  • Add Rails 7 to Travis CI tests and update Ruby versions
  • Add CONTRIBUTING.md guide

Housekeeping:

  • The master branch has been renamed to main across all TrestleAdmin repositories
trestle - v0.9.5

Published by spohlenz over 3 years ago

  • Add support for scope groups (#322)
scopes do
  scope :first, group: "Group Name"
  scope :second, group: "Group Name"

  scope :third, group: "Another Group"
end

# Default layout is :row. Scope groups will automatically stack for mobile devices.
scopes layout: :columns do ...

# Disable grouping regardless of scope definitions
scopes group: false do ...

# Specify custom classes on the scopes container div
scopes class: "scope-tags" do ...
  • Allow default navigation group state to be set to collapsed (#332)
menu do
  group :configuration, collapse: true do
    item ...
  end
end
  • Update to Bootstrap 4.6.0, FontAwesome 5.15.2, Flatpickr 4.6.9, rails-ujs 6.1.2
  • Update form field error state to show all error messages (#331)
  • Fix incorrect admin controller parent class autoloading issues (#329)
  • Fix potential XSS cookie injection vulnerability (#341)
  • Fix keyword argument forwarding for Ruby 3 (#342)
  • Added Rails 6.1 and Ruby 3 to Travis CI tests
trestle - v0.9.4

Published by spohlenz almost 4 years ago

  • Add Vietnamese translations [Derek Nguyen]
  • Implement preliminary support for AJAX pagination
  • Allow access to controller methods (e.g. current_user) from within scope blocks
  • Allow per-admin translations for scope labels
  • Change form parameter name to unscoped singular admin name
  • Update to jQuery 3.5.1, Bootstrap 4.5.3, FontAwesome 5.15.1, Flatpickr 4.6.6, rails-ujs 6.0.3
  • Fix select field options when passing additional data attributes
  • Ensure select fields are disabled when options[:disabled] is set
  • Fix use of hooks within form blocks
  • Fix form field attributes when options[:wrapper] is false
  • Fix deprecation warnings in Ruby 2.7
  • Fix file permissions in gem release
trestle - v0.9.3

Published by spohlenz over 4 years ago

  • Add #save_or_dismiss resource toolbar builder method
  • Add support for passing parameters to hooks
  • Implement selectable_column checkbox JS and custom checkbox styling
  • Deprecated config.reload option (admins will now always reload in development mode)
  • Update to jQuery 3.5.0
  • Update to FontAwesome 5.13.0, rails-ujs 6.0.2, popper.js 1.16.1, select2 4.0.13, bs-custom-file-input 1.3.4
  • Loosen dependency on kaminari (allow updating to 1.2.x)
  • Fix deprecation warnings when using Zeitwerk
  • Fix focus styles for themed buttons
  • Fix centering of title/logo at mobile breakpoints
  • Fix error messages for has_many / has_and_belongs_to_many fields (ending in _ids)
  • Fix JS AJAX events from incorrectly firing on child elements of a Trestle form
  • Fix overriding of table options when embedding within another admin
  • Fix col helper to not add bare col class when explicit column count is given
trestle - v0.9.2

Published by spohlenz over 4 years ago

  • Add German translations [Mischa Schindowski]
  • Added --singular option to trestle:resource generator for generating a singular resource:
rails generate trestle:resource account --singular
  • Allow setting custom options on automatically generated forms, e.g.
form dialog: true
  • Add #new, #save, #delete and #dismiss button shortcuts for resource toolbars
  • Allow title and toolbar helpers to be called from within controller actions
  • Allow static_field to automatically infer value rather than require it to be explicitly set
  • Allow custom HTML options to be set on navigation items
  • Allow options to be overridden when embedding tables
  • Updated to Bootstrap 4.4.1
  • Update i18n key for admin breadcrumbs to be more consistent (admin.<admin-name>.breadcrumbs.index)
  • Use count(:all) instead of count in ActiveRecord adapter to fix ambiguous column errors in joined queries
  • Fix loading of Flatpickr locale files
  • Fix initialization of JS translations when en locale is not available
  • Fix tab initialization on context refresh
trestle - v0.9.1

Published by spohlenz almost 5 years ago

  • Fix JavaScript initialization when Turbolinks is disabled or not available
  • Disable automatic focusing within modals
trestle - v0.9.0

Published by spohlenz almost 5 years ago

🎉🎉🎉
After many months in development, this release finally incorporates the new build process from #195!

**If you have written a lot of custom code that depends on Bootstrap 3, this may be a breaking update. Please review your admin application code before pushing to production.**

**If you are using trestle-auth or trestle-search, please also ensure you also update to trestle-auth >= 0.3.0 and trestle-search >= 0.4.0**

The main features of this update are:

  • A Webpack-based build process which produces a static CSS bundle. This means a Sass compilation gem (sass-rails or sassc-rails) is no longer a required dependency unless you are doing custom theme compilation.
  • Cleaned up the Sass and JS code, and migrated the JS to ES6 syntax.
  • Updated to Bootstrap 4 (4.3.1).
  • Updated to FontAwesome 5 (5.11.2). The v4 compatibility classes are included.
  • Removed Ionicons.
  • Theme customization is now done within app/assets/stylesheets/trestle/_theme.scss (rather than _variables.scss). The trestle:install generator has been updated to create this new file. However your current _variables.scss should continue to work for supported variables.
  • Sprockets is still a required dependency (for now).

Other updates and fixes include:

  • The col helper now accepts an integer for the default (mobile breakpoint) columns. Old usage should continue to work:
# New
col(4) { ... }
col(6, lg: 3) { ... }

# Old
col(xs: 4) { ... }
col(xs: 6, lg: 3) { ... }
  • Added new card helper to replace panel helper
  • Deprecated panel and well helpers
  • Added support for custom check_box/radio_button controls (default) as well as switch check_boxes
check_box :published, switch: true
  • Always show tabs if form was defined using one or more tab blocks
  • Use model name to determine default resource admin human name (#251)
  • Fixed model name pluralization when singular and plural versions are defined (#238)
trestle - v0.8.13

Published by spohlenz about 5 years ago

  • Additional French language translations [Tao Galasse]
  • Add support for admin-level hook definitions
  • Improve default handling of JSON attribute form fields
  • Improve handling of error responses
  • Remove default JS response handlers for admin resources. They can be added manually as required using:
controller do
  def show
    super do |format|
      format.js
    end
  end
end
  • Remove clear button from disabled date/time pickers
  • Disable select fields and date pickers when admin is read-only
  • Allow routes block to be called multiple times
  • Fix error when using selectable_column
  • Fix deprecation warnings in Rails 6

This will likely be the last release before #195 is merged in (which will then be released as 0.9.0).

trestle - v0.8.12

Published by spohlenz over 5 years ago

  • Add Korean translations [Cheon Park]
  • Allow toolbars to be cleared when defining toolbar blocks
toolbar(:primary).clear!
# or
toolbar(:primary, clear: true) do |t|
  t.button ...
end
  • Add support for dropdowns within toolbar buttons
toolbar(:primary) do |t|
  # Buttons and links render a split button dropdown (primary button plus toggle)
  t.button "Button" do |d|
    d.header "Dropdown Header"
    d.link "Dropdown Link", "#"
    d.divider
  end

  t.link "Button link", "#" do |d|
    d.link "Dropdown Link", "#"
  end

  # Dropdowns render an integrated button dropdown (primary button triggers the dropdown)
  t.dropdown "Dropdown" do |d|
    d.link "Dropdown Link", "#"
  end
end
  • Add support for dynamically defined scopes
scopes do
  Tag.all do |tag|
    scope tag.name, -> { Post.tagged(tag) }
  end
end
  • Allow navigation menu blocks to access controller methods
  • Add config.favicon to set favicon within admin
  • Disable browser autocompletion on password fields
  • Updated styles for dropups, dropdown groups and select group headers
  • Allow id and data attributes to be passed to panel helper
  • Fix i18n of confirmation popovers
  • Fix error when :en locale is unavailable
  • Fix inline JS when Content Security Policy is enabled
  • Fix select form helper when choices passed as a string
trestle - v0.8.11

Published by spohlenz about 6 years ago

  • Allow adapter methods to invoke controller methods (e.g. current_user, request, etc)
  • Add header: false option to disable table header
  • Add :if/:unless options to be passed to table columns
  • Add option to float form field help blocks above input: help: { text: "message", float: true }
  • Add support for nested modals
  • Pass unfiltered params as second argument to #delete_instance and #save_instance adapter methods
  • Fix merging of navigation group options
trestle - v0.8.10

Published by spohlenz about 6 years ago

  • Add Latvian translations [Martins Kruze]
  • Add Spanish and Mexican Spanish translations [Ismael G Marin C]
  • Implement new toolbars API
toolbar(:secondary) do |t|
  t.group do
    t.button "Approve", style: :success, icon: "fa fa-thumbs-up"
    t.button "Reject", style: :danger, icon: "fa fa-ban"
  end

  t.link "More Info", "...", style: :info
end
  • Deprecate old-style toolbars e.g. content_for(:primary_toolbar) do
  • Add additional options to timestamp and datestamp helpers
  • Add support for passing proc as column :header option
  • Add :if/:unless options for hooks
  • Add config.timestamp_precision option defaulting to :minutes
  • Add config.root option to set title and root breadcrumb link targets
  • Add view.title hook for overriding sidebar header
  • Add resource.index.header and resource.index.footer hooks
  • Add general confirmation popup with data-toggle="confirm"
  • Allow form control input group addon wrapping to be disabled with :append!/:prepend! options
  • Allow options passed to trestle_form_for to override defaults
  • Improve rendering of input groups, button groups and scopes
  • Improve handling of button disabling and loading indicators
  • Fix tab behaviour when saving modal forms
  • Fix persistence of sidebar expanded/collapsed state
  • Fix compatibility with Sprockets 4
trestle - v0.8.9

Published by spohlenz over 6 years ago

  • Fix error when rendering dialog forms
  • Add additional feature specs to cover dialog JavaScript
  • Fix support for string flash messages
  • Pass unhandled options to avatar helper to div tag
trestle - v0.8.8

Published by spohlenz over 6 years ago

  • Add Czech translations [Jan Svoboda]
  • Add Simplified Chinese translations [Li Jie]
  • Add support for singular resources (Trestle.resource(:name, singular: true) do ...)
  • Add support for per-admin translations of titles, button labels and flash messages
  • Add clear button to date/time picker fields
  • Add config.reload option to customize admin reloading strategy (:always or :on_update)
  • Add Trestle::Resource#instance_path(instance, options) method
  • Add inheritance support to admin_for(instance) helper
  • Update default Gravatar image
  • Improve default breadcrumbs for module-scoped admins
  • Allow root admin breadcrumb to be disabled via breadcrumb false
  • Fix issue with conflicting tabs within dialogs
  • Fix form_group helper behavior within templates
  • Fix JSON serialization of Configuration objects
  • Fix form submission when HTML5 validations are used
  • Fix error field rendering within input groups
  • Fix compatibility with will_paginate gem (must set custom Kaminari.config.page_method_name)
trestle - v0.8.7

Published by spohlenz over 6 years ago

  • Improve handling of error responses within dialogs
  • Add support for custom dialog class via data-dialog-class link attribute
  • Fix admin links to new action of dialog forms
  • Add :if and :unless (Proc) options to navigation item builder
  • Add tooltips to main navigation when collapsed
  • Improve heading typography within form sidebars
  • Add h1..h6 helpers for headings within forms
  • Add support for named tables
  • Add support for custom table IDs
  • Allow column block return values to be auto-formatted
  • Remove unscoped adapter method
  • Implement finalize_collection adapter method
  • Pass collection down to scope blocks
  • Allow custom per-page pagination settings using paginate per: X
  • Fix polymorphic associations within automatically generated forms
  • Don't add general form group wrapper options to wrapper element
  • Add support for return_to { :back } to redirect to previous page after action
  • Ensure image popups appear above modal dialogs
trestle - v0.8.6

Published by spohlenz almost 7 years ago

  • Add Polish translations [Marcin Lewandowski]
  • Add French translations [Jean Lazarou]
  • Add support for dialog-based forms (form dialog: true do...)
  • Make forms remote by default
  • Add remove_action resource builder method to disable default actions
  • Add return_to resource builder method to customize create/update/delete return location
  • Add breadcrumb admin builder method to override breadcrumb
  • Add autolink: false table option to disable automatic row linking
  • Add Trestle.init JS callback for scoped element initialization
  • Add visual indicator for collapsed navigation blocks in tablet/collapsed view
  • Decode cookie values when reading via Trestle.cookie.get
  • Add configuration option for admin load paths
  • Update vendored select2 version to 4.0.5
  • Bump kaminari dependency to ~> 1.1.0
  • Loosen dependencies on sass-rails and autoprefixer-rails
trestle - v0.8.5

Published by spohlenz about 7 years ago

  • Add Dutch translations [Richard Venneman]
  • Add Portuguese translations [Leandro Matheus]
  • Improve resource model name pluralization via i18n
  • Add JS API for getting/setting cookies (Trestle.cookie)
  • Add toggle buttons for navigation group headers and persist state between requests
  • Automatically scroll sidebar to active navigation item
  • Add form error debugging (enabled by default in development mode)
  • Add options[:label] option to navigation items to explicitly set label
  • Allow actions column to accept an options hash
  • Add show and edit button types to actions builder
  • Fixed Trestle::Options hash merging in edge Rails
  • Testing: test all compatible Rails versions (+ edge Rails) within Travis
  • Testing: setup for feature specs
trestle - v0.8.4

Published by spohlenz about 7 years ago

  • Implement auto-formatting of Array column values
  • Implement formatting of tag column values with format: :tags
  • Allow resource actions to respond to JSON/JS
  • admin_link_to and admin_url_for no longer fall back to the current admin
  • Fix table column blocks within ERB and Haml templates
  • Add support for polymorphic associations in default form/table
  • Add support for Sequel ORM (See Trestle::Adapters::SequelAdapter)
  • Pass full params as additional parameter to #build_instance and #update_instance Adapter methods
  • Add #human_attribute_name Adapter method
  • Split Adapter#default_attributes into #default_form_attributes and #default_table_attributes
  • Updated dependency versions (kaminari, autoprefixer-rails, Flatpickr)
  • Depend on railties rather than rails
  • Remove dependency on coffee-rails
trestle - v0.8.3

Published by spohlenz about 7 years ago

  • Add generator for non-resourceful admins (rails generate trestle:admin NAME)
  • Add global config.helper configuration option
  • Add global config.before_action, config.after_action and config.around_action configuration options
  • Add per-resource support for before_action, after_action and around_action
  • Add sort_column resource method for defining custom column sorts
  • Add nicer exception and error message when a resource model cannot be inferred
  • Set lower priority for fallback dashboard route (to allow a user-defined dashboard admin)
Package Rankings
Top 8.17% on Proxy.golang.org
Top 2.05% on Rubygems.org
Badges
Extracted from project README
RubyGem Build Status Coveralls Code Climate