Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add agent model components and integration #278

Merged
merged 51 commits into from
Aug 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
b6b6e3f
fix alert message component to show the content if used
syphax-bouazzouni Jun 19, 2023
806dd04
add option to the select input to hide the add another value intput
syphax-bouazzouni Jun 19, 2023
ea5188c
add agents controller, routes and views
syphax-bouazzouni Jun 19, 2023
cc405f8
make the admin page save the current section when reloaded
syphax-bouazzouni Jun 19, 2023
dcf3d4c
add Persons & Organizations tab in the admin page
syphax-bouazzouni Jun 19, 2023
f535472
Merge branch 'feature/extract-search-input-component' into feature/ad…
syphax-bouazzouni Jun 27, 2023
63f8ea0
Merge branch 'feature/extract-search-input-component' into feature/ad…
syphax-bouazzouni Jun 27, 2023
5b00d92
Merge branch 'feature/update-nested-from-input-component-design' into…
syphax-bouazzouni Jun 29, 2023
3d426aa
add agents json search endpoint and action
syphax-bouazzouni Jul 7, 2023
c4e8fcc
update search input component to handle custom link turbo targets
syphax-bouazzouni Jul 7, 2023
3dd7493
add agents search input component and show action
syphax-bouazzouni Jul 7, 2023
9d8c5ad
add agents form style file
syphax-bouazzouni Jul 7, 2023
4f5bd97
update new agent action to take default values from the request params
syphax-bouazzouni Jul 7, 2023
c053ee7
update agent update action to not update agent affiliations separately
syphax-bouazzouni Jul 7, 2023
cdbb08b
update the agent for to use the agents search component
syphax-bouazzouni Jul 7, 2023
2f10ccd
make the agent new partial turbo frame id parameterized
syphax-bouazzouni Jul 7, 2023
fc76c5e
add email field to the agents form
syphax-bouazzouni Jul 7, 2023
4c86671
fix agents search input style
syphax-bouazzouni Jul 11, 2023
11ce305
add search input style
syphax-bouazzouni Jul 15, 2023
66396fd
include all latest_submission attributes in the summary page action
syphax-bouazzouni Jul 15, 2023
8986905
add hasCreator and publisher displayer for the summary page
syphax-bouazzouni Jul 11, 2023
f269c6b
add margin top and bottom for the nested form component
syphax-bouazzouni Jul 11, 2023
0fb8601
enable turbo for the submission form
syphax-bouazzouni Jul 15, 2023
e25496f
update submission updated to make it work with publisher and hasCreator
syphax-bouazzouni Jul 11, 2023
7c86299
add nested agent search input component
syphax-bouazzouni Jul 11, 2023
e1fd0c6
update search input component to use its internal variables
syphax-bouazzouni Jul 11, 2023
a78ef1d
update and finalize agents controller actions
syphax-bouazzouni Jul 11, 2023
16e3e93
update agent search input to be more customizable
syphax-bouazzouni Jul 11, 2023
f5b898d
add hasCreator and publisher attribut to submission edit form
syphax-bouazzouni Jul 15, 2023
d5c0c01
Merge branch 'development' into feature/add-agent-model-ui-components
syphax-bouazzouni Jul 15, 2023
6f52c9f
update search input component to have form-control style by default
syphax-bouazzouni Jul 24, 2023
16e039b
change agent search input to use it's Id instead of name to find it
syphax-bouazzouni Jul 28, 2023
f818858
add Jquery data table to the admin agents table
syphax-bouazzouni Jul 28, 2023
9c6af22
change agent search input to use it's Id instead of name to find it
syphax-bouazzouni Jul 28, 2023
fd51d38
update nested form component to have an empty state to send to the back
syphax-bouazzouni Jul 28, 2023
7579414
fix metadata curator not save agent update (bug still in changed_values)
syphax-bouazzouni Jul 28, 2023
3eae4cd
add display agent in the metadata curator
syphax-bouazzouni Jul 28, 2023
aa7fc32
handle the display of no array agents in summary page
syphax-bouazzouni Jul 28, 2023
5ddbca0
add generate_agent_input helper to the submission helpers
syphax-bouazzouni Jul 24, 2023
ce249cd
fix submission save/update error state
syphax-bouazzouni Jul 28, 2023
211b5a4
update display agent to show agent affiliations
syphax-bouazzouni Jul 28, 2023
1bbd1db
make select input by default not open to add values
syphax-bouazzouni Jul 28, 2023
f88e8d1
fix text field component not using the required argument
syphax-bouazzouni Jul 28, 2023
ce7dae5
remove the hardcoded hasCreator and publisher inputs in submission from
syphax-bouazzouni Jul 28, 2023
35edfc3
Merge branch 'development' into feature/add-agent-model-ui-components
syphax-bouazzouni Jul 28, 2023
65e3629
handle for agent show the case they are string
syphax-bouazzouni Jul 28, 2023
4fcf11d
handle contact nested form empty state
syphax-bouazzouni Jul 28, 2023
4734751
Merge branch 'development' into feature/add-agent-model-ui-components
syphax-bouazzouni Jul 28, 2023
e5c8974
remove container class from the new and edit submission views
syphax-bouazzouni Aug 1, 2023
4f36ca6
handle string errors (location file not given ) in the submission form
syphax-bouazzouni Aug 1, 2023
5db8315
Merge branch 'development' into feature/add-agent-model-ui-components
syphax-bouazzouni Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make the admin page save the current section when reloaded
syphax-bouazzouni committed Jun 19, 2023
commit cc405f8e8ed46853a986b1eb9fb632624ea42720
6 changes: 6 additions & 0 deletions app/helpers/admin_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module AdminHelper
def selected_admin_section?(section_title)
current_section = params[:section] || 'site'
current_section.eql?(section_title)
end
end
28 changes: 14 additions & 14 deletions app/views/admin/index.html.haml
Original file line number Diff line number Diff line change
@@ -15,23 +15,23 @@
%div.col
%ul.nav.nav-tabs{id: "admin-tabs", role: "tablist"}
%li.nav-item
=link_to("Site Administration", "#site-admin", id: "site-admin-tab", class: "nav-link active", role: "tab", data: { toggle: "tab" }, aria: { controls: "site-admin", selected: "true" })
=link_to("Site Administration", "#site-admin", id: "site-admin-tab", class: "nav-link #{selected_admin_section?('site') ? 'active': ''}", role: "tab", data: { toggle: "tab" }, aria: { controls: "site-admin", selected: "true" })
%li.nav-item
=link_to("Ontology Administration", "#ontology-admin", id: "ontology-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab" }, aria: { controls: "ontology-admin", selected: "false" })
=link_to("Ontology Administration", "#ontology-admin", id: "ontology-admin-tab", class: "nav-link #{selected_admin_section?('ontology') ? 'active': ''}", role: "tab", data: { toggle: "tab" }, aria: { controls: "ontology-admin", selected: "false" })
%li.nav-item
=link_to("Licensing", "#licensing", id: "licensing-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab", href: admin_licenses_path() }, aria: { controls: "licensing", selected: "false" })
=link_to("Licensing", "#licensing", id: "licensing-admin-tab", class: "nav-link #{selected_admin_section?('licensing') ? 'active': ''}", role: "tab", data: { toggle: "tab", href: admin_licenses_path() }, aria: { controls: "licensing", selected: "false" })
%li.nav-item
=link_to("Users", "#users", id: "users-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab", href: users_path() }, aria: { controls: "users", selected: "false" })
=link_to("Users", "#users", id: "users-admin-tab", class: "nav-link #{selected_admin_section?('users') ? 'active': ''}", role: "tab", data: { toggle: "tab", href: users_path() }, aria: { controls: "users", selected: "false" })
%li.nav-item
=link_to("Metadata Administration", "#ontologies_metadata_curator", id: "ontologies_metadata_curator-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab"}, aria: { controls: "ontologies_metadata_curator", selected: "false" })
=link_to("Metadata Administration", "#ontologies_metadata_curator", id: "ontologies_metadata_curator-admin-tab", class: "nav-link #{selected_admin_section?('metadata') ? 'active': ''}", role: "tab", data: { toggle: "tab"}, aria: { controls: "ontologies_metadata_curator", selected: "false" })
%li.nav-item
=link_to("Groups", "#groups", id: "groups-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab", href: "groups" }, aria: { controls: "groups", selected: "false" })
=link_to("Groups", "#groups", id: "groups-admin-tab", class: "nav-link #{selected_admin_section?('groups') ? 'active': ''}", role: "tab", data: { toggle: "tab", href: "groups" }, aria: { controls: "groups", selected: "false" })
%li.nav-item
=link_to("Categories", "#categories", id: "categories-admin-tab", class: "nav-link", role: "tab", data: { toggle: "tab", href: "categories" }, aria: { controls: "categories", selected: "false" })
=link_to("Categories", "#categories", id: "categories-admin-tab", class: "nav-link #{selected_admin_section?('categories') ? 'active': ''}", role: "tab", data: { toggle: "tab", href: "categories" }, aria: { controls: "categories", selected: "false" })
%div#adminTabContent.tab-content

-# Site Administration tab
%div.tab-pane.active.show.fade{id: "site-admin", role: "tabpanel", aria: { labelledby: "site-admin-tab" }}
%div.tab-pane.fade{id: "site-admin", role: "tabpanel", aria: { labelledby: "site-admin-tab" }, class: selected_admin_section?('site') ? 'show active': ''}

-# Clear caches
%div#site-admin-clear-caches.my-5
@@ -68,7 +68,7 @@


-# Ontology Administration tab
%div.tab-pane.fade{id: "ontology-admin", role: "tabpanel", aria: { labelledby: "ontology-admin-tab" }}
%div.tab-pane.fade{id: "ontology-admin", role: "tabpanel", aria: { labelledby: "ontology-admin-tab" }, class: selected_admin_section?('ontology') ? 'show active': ''}
%div.ontologies_list_container.mt-3
%table{:style => "float:left;"}
%tr
@@ -81,7 +81,7 @@
%table#adminOntologies.zebra{:cellpadding => "0", :cellspacing => "0", :width => "100%"}

-# Licensing tab
%div.tab-pane.fade{id: "licensing", role: "tabpanel", aria: { labelledby: "licensing-admin-tab" }}
%div.tab-pane.fade{id: "licensing", role: "tabpanel", aria: { labelledby: "licensing-admin-tab" }, class: selected_admin_section?('licensing') ? 'show active': ''}
%div#renew-license-notice

%table.table.table-sm.table-bordered.mt-5#license-table
@@ -99,21 +99,21 @@
%div.mb-5#renew-license-form

-# Users tab
%div.tab-pane.fade{id: "users", role: "tabpanel", aria: { labelledby: "users-admin-tab" }}
%div.tab-pane.fade{id: "users", role: "tabpanel", aria: { labelledby: "users-admin-tab" }, class: selected_admin_section?('users') ? 'show active': ''}
%div.ontologies_list_container.mt-3
%table#adminUsers.zebra{:cellpadding => "0", :cellspacing => "0", :width => "100%"}

-# metadata tab
%div.tab-pane.fade{id: "ontologies_metadata_curator", role: "tabpanel", aria: { labelledby: "ontologies_metadata_curator-admin-tab" }}
%div.tab-pane.fade{id: "ontologies_metadata_curator", role: "tabpanel", aria: { labelledby: "ontologies_metadata_curator-admin-tab" }, class: selected_admin_section?('metadata') ? 'show active': ''}
= render partial: 'ontologies_metadata_curator/metadata_tab'

-# Groups tab
%div.tab-pane.fade{id: "groups", role: "tabpanel", aria: { labelledby: "groups-admin-tab" }}
%div.tab-pane.fade{id: "groups", role: "tabpanel", aria: { labelledby: "groups-admin-tab" }, class: selected_admin_section?('groups') ? 'show active': ''}
%div.ontologies_list_container.mt-3
%table#adminGroups.zebra{:cellpadding => "0", :cellspacing => "0", :width => "100%"}

-# Categories tab
%div.tab-pane.fade{id: "categories", role: "tabpanel", aria: { labelledby: "categories-admin-tab" }}
%div.tab-pane.fade{id: "categories", role: "tabpanel", aria: { labelledby: "categories-admin-tab" }, class: selected_admin_section?('categories') ? 'show active': ''}
%div.ontologies_list_container.mt-3
%table#adminCategories.zebra{:cellpadding => "0", :cellspacing => "0", :width => "100%"}