-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add flowchart_node_id to seed data * add active admin * add icons to activeadmin * add flowchart node form * add icon_helper resource, dashboard * modified flowchart create vs. edit form * add link to icons in node view * linting and test fixes * linting fixes * minor dashboard fixes * linting * linting fix
- Loading branch information
Showing
8 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
ActiveAdmin.register FlowchartIcon, as: 'Icon' do | ||
menu priority: 5 | ||
permit_params :url | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
ActiveAdmin.register FlowchartNode do | ||
menu priority: 4 | ||
sidebar 'Flowchart Details', only: %i[show edit] do | ||
ul do | ||
li link_to 'Node Icons', admin_icon_connectors_path('q[flowchart_node_id_eq]' => flowchart_node.id) | ||
end | ||
end | ||
|
||
belongs_to :flowchart | ||
permit_params :id, :text, :header, :next_question, :is_root, :flowchart_id, :deleted, :flowchart_node_id, :flowchart_id, :is_leaf, :breadcrumb_title, | ||
belongs_to :flowchart, optional: true | ||
permit_params :id, :text, :header, :next_question, :is_root, :flowchart_id, :deleted, :flowchart_node_id, :flowchart_id, :is_leaf, :breadcrumb_title, :button_text, | ||
flowchart_icon_helpers_attributes: %i[id flowchart_icon_id flowchart_node_id _destroy] | ||
|
||
controller do | ||
def permitted_params | ||
params.permit :authenticity_token, :commit, :_method, :flowchart_id, :id, flowchart_node: [:id, :text, :header, :breadcrumb_title, :next_question, :is_root, :flowchart_id, :flowchart_node_id, :is_leaf, :deleted, :flowchart_id, | ||
flowchart_icon_helpers_attributes: %i[id flowchart_icon_id flowchart_node_id _destroy]] | ||
params.permit :authenticity_token, :commit, :_method, :flowchart_id, :id, | ||
flowchart_node: [:id, :text, :header, :breadcrumb_title, :next_question, :is_root, :flowchart_id, :flowchart_node_id, :is_leaf, :deleted, :flowchart_id, :button_text, | ||
flowchart_icon_helpers_attributes: %i[id flowchart_icon_id flowchart_node_id _destroy]] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters