A modern, responsive admin framework for Ruby on Rails
Trestle.configure do |config|
config.helper -> { CustomHelper }
config.form_field :custom, -> { CustomFormField }
end
enum
columns as radio buttons within automatic forms (#379)config.persistent_params
Trestle.resource(..., register_model: false)
to disable model lookup registrationclass
option to be passed to avatar
helperavatar-sm
and avatar-lg
CSS classes for small and large avatarssidebar
helperCONTRIBUTING.md
guideHousekeeping:
master
branch has been renamed to main
across all TrestleAdmin repositoriesscopes 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 ...
menu do
group :configuration, collapse: true do
item ...
end
end
current_user
) from within scope blocksoptions[:disabled]
is setoptions[:wrapper]
is false#save_or_dismiss
resource toolbar builder methodselectable_column
checkbox JS and custom checkbox stylingconfig.reload
option (admins will now always reload in development mode)has_many
/ has_and_belongs_to_many
fields (ending in _ids
)col
helper to not add bare col
class when explicit column count is given--singular
option to trestle:resource
generator for generating a singular resource:rails generate trestle:resource account --singular
form dialog: true
#new
, #save
, #delete
and #dismiss
button shortcuts for resource toolbarstitle
and toolbar
helpers to be called from within controller actionsstatic_field
to automatically infer value rather than require it to be explicitly setadmin.<admin-name>.breadcrumbs.index
)count(:all)
instead of count
in ActiveRecord adapter to fix ambiguous column errors in joined queriesen
locale is not available🎉🎉🎉 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:
sass-rails
or sassc-rails
) is no longer a required dependency unless you are doing custom theme compilation.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.Other updates and fixes include:
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) { ... }
card
helper to replace panel
helperpanel
and well
helperscheck_box
/radio_button
controls (default) as well as switch check_boxes
check_box :published, switch: true
tab
blockscontroller do
def show
super do |format|
format.js
end
end
end
routes
block to be called multiple timesselectable_column
This will likely be the last release before #195 is merged in (which will then be released as 0.9.0).