
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
active_scaffold_kanban
Advanced tools
An addon for ActiveScaffold to render a kanban board instead of normal list, using a model's column for the kanban columns.
Add :kanban to actions.
active_scaffold :model do |conf|
conf.actions << :kanban
Kanban view is used when index action is loaded with view=kanban
parameter. Default list view can be replaced with kanban with conf.kanban.replace_list_view = true
.
Then define the column used as kanban columns in the board with conf.kanban.group_by_column
. It works with both DB column and association.
The columns for the board are returned with the kanban_columns
helper, and it uses the same way to get the values as :select form_ui. The helper kanban_columns
can be overrided, supporting model prefix, but the default helper supports the same methods to define or change the available values:
options[:options]
in the column, or override active_scaffold_enum_options
(supports model prefix)options_for_association_conditions
or association_klass_scoped
, model prefix is supported too.Dragging a card to other column will use update_column
action, like inplace edit, to change the value. If update_column
action fails to save, the card is reverted to the original position.
If no position column is defined in sortable, or sortable action is not added, the position on the column can't be changed (drop on the same column reverts to the original position), and the position on the new column is not respected (position may change when kanban is reloaded).
To define a position column, add :sortable
to conf.actions
, and define conf.sortable.column
, then changing the position on the original column will use reorder
action (as active_scaffold_sortable), and dragging to other column will use update_action
and will pass the new order to update the order too.
A column may accept items, but don't allow to drag items out. Override kanban_column_receive_only?
(supports model prefix too) which receives the column value (associated record if the column is an association) and return true for the columns which don't accept to move cards out.
Define the method used for the title with conf.kanban.title_method (defaults to :to_label), and method used for description with conf.kanban.description_method. The card is rendered with _kanban_card.html.erb
view partial, which can be overrided to change the html structure of a card, and supports model prefix too. Also the kanban_description
helper can be defined, which supports model prefix, to change only the body of the card. The actions are rendered calling the kanban_actions
helper, which supports model prefix, or actions can be ignored in kanban by defining ignore_method? in the action_link to skip them if @kanban_view
variable is set, or overriding skip_action_link?
helper.
A javascript event kanban:beforeChange
is fired on the card, when it's drop into other column, before sending the request to update the column. The event receives a object argument with 2 properties, the id of the card and the value of the new column (when column is an association, value is an id too). If the event listener returns false, it will reject the change, and the card will revert to the original position. The event listener can set extra params to send to the update_column
action, with jQuery(event.target).data('params', {key: value})
.
FAQs
Unknown package
We found that active_scaffold_kanban demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.