aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Peignier2017-10-17 09:58:30 +0200
committerAlban Peignier2017-11-26 16:56:59 +0100
commit3542e4812b7060e2bfbde21343163244e003b85c (patch)
tree9b68abacb6bbde2047f38fd75e3371fee7d641d7
parent61b03808e8e2314f0deb60f85d243aa15375aca6 (diff)
downloadchouette-core-3542e4812b7060e2bfbde21343163244e003b85c.tar.bz2
Create custom view for STIF main nav left. Refs #4735
-rw-r--r--app/views/layouts/navigation/_main_nav_left.html.slim108
-rw-r--r--app/views/layouts/navigation/_main_nav_left_content_stif.html.slim106
2 files changed, 107 insertions, 107 deletions
diff --git a/app/views/layouts/navigation/_main_nav_left.html.slim b/app/views/layouts/navigation/_main_nav_left.html.slim
index 837b9cb73..b63c2dd1c 100644
--- a/app/views/layouts/navigation/_main_nav_left.html.slim
+++ b/app/views/layouts/navigation/_main_nav_left.html.slim
@@ -1,5 +1,3 @@
-- @localizationUrl = "#{params[:controller]}##{params[:action]}"
-
.nav-menu#menu_left
.openMenu title='Ouvrir le menu'
@@ -7,108 +5,4 @@
.closeMenu title='Fermer le menu'
.brandname = t('brandname')
- #menu-items.panel-group
- .menu-item.panel
- .panel-heading
- h4.panel-title
- = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
- |Offres courantes
-
- #miOne.panel-collapse.collapse
- .list-group
- = link_to root_path, class: "list-group-item #{(@localizationUrl == 'workbenches#index') ? 'active' : ''}" do
- span Tableau de bord
- = link_to '#', class: 'list-group-item' do
- span Offre de mon organisation
- = link_to '#', class: 'list-group-item' do
- span Offre IDF
-
- .menu-item.panel
- .panel-heading
- h4.panel-title
- = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
- |Espace de travail
-
- #miTwo.panel-collapse.collapse
- .list-group
- - if current_user
- = link_to workbench_path(current_offer_workbench), class: "list-group-item #{params[:controller] == 'workbenches' ? 'active' : ''}" do
- span Jeux de données
- = link_to workbench_imports_path(current_offer_workbench), class: "list-group-item #{(params[:controller] == 'imports') ? 'active' : ''}" do
- span Import
- = link_to calendars_path, class: 'list-group-item' do
- span Modèles de calendrier
- = link_to workbench_compliance_check_sets_path(current_offer_workbench), class: 'list-group-item' do
- span Rapport de contrôle
- = link_to compliance_control_sets_path, class: 'list-group-item' do
- span Jeux de contrôle
-
- .menu-item.panel
- .panel-heading
- h4.panel-title
- = link_to '#miThree', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
- |Données
-
- #miThree.panel-collapse.collapse
- - if @referential.try(:id) && respond_to?(:current_referential)
- .list-group
- .list-group-item
- = (current_referential.name).upcase
- .list-group
- = link_to referential_networks_path(current_referential), class: 'list-group-item' do
- span = t('networks.index.title')
-
- = link_to referential_companies_path(current_referential), class: 'list-group-item' do
- span = t('companies.index.title')
-
- = link_to '#', class: 'list-group-item disabled' do
- span Tracés
-
- = link_to referential_time_tables_path(current_referential), class: 'list-group-item' do
- span = t('time_tables.index.title')
-
- - else
- .panel-body
- em.text-muted
- = "Sélectionnez un jeu de données pour accéder à plus de fonctionnalités"
-
- .menu-item.panel
- .panel-heading
- h4.panel-title
- = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
- |Synchronisation
-
- #miFour.panel-collapse.collapse
- .list-group
- = link_to line_referential_path(1), class: "list-group-item #{(@localizationUrl == 'line_referentials#show') ? 'active' : ''}" do
- span Synchronisation iLICO
- = link_to stop_area_referential_path(1), class: "list-group-item #{(@localizationUrl == 'stop_area_referentials#show') ? 'active' : ''}" do
- span Synchronisation iCAR
-
- .menu-item.panel
- .panel-heading
- h4.panel-title
- = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
- |Outils
-
- #miFive.panel-collapse.collapse
- .list-group
- = link_to Rails.application.config.try(:portal_url), target: '_blank', class: 'list-group-item' do
- span
- span.fa.fa-2x.fa-circle
- |Portail (POSTIF)
-
- = link_to Rails.application.config.try(:codifligne_url), target: '_blank', class: 'list-group-item' do
- span
- span.fa.fa-2x.fa-circle
- |iLICO
-
- = link_to Rails.application.config.try(:reflex_url), target: '_blank', class: 'list-group-item' do
- span
- span.fa.fa-2x.fa-circle
- |iCAR
-
- = link_to '#', target: '_blank', class: 'list-group-item' do
- span
- span.fa.fa-2x.fa-circle
- |Support
+ = render_custom_view 'layouts/navigation/main_nav_left_content'
diff --git a/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim b/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim
new file mode 100644
index 000000000..bd25d29c4
--- /dev/null
+++ b/app/views/layouts/navigation/_main_nav_left_content_stif.html.slim
@@ -0,0 +1,106 @@
+- @localizationUrl = "#{params[:controller]}##{params[:action]}"
+
+#menu-items.panel-group
+ .menu-item.panel
+ .panel-heading
+ h4.panel-title
+ = link_to '#miOne', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
+ |Offres courantes
+
+ #miOne.panel-collapse.collapse
+ .list-group
+ = link_to root_path, class: "list-group-item #{(@localizationUrl == 'workbenches#index') ? 'active' : ''}" do
+ span Tableau de bord
+ = link_to '#', class: 'list-group-item' do
+ span Offre de mon organisation
+ = link_to '#', class: 'list-group-item' do
+ span Offre IDF
+
+ .menu-item.panel
+ .panel-heading
+ h4.panel-title
+ = link_to '#miTwo', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
+ |Espace de travail
+
+ #miTwo.panel-collapse.collapse
+ .list-group
+ = link_to workbench_path(current_offer_workbench), class: "list-group-item #{params[:controller] == 'workbenches' ? 'active' : ''}" do
+ span Jeux de données
+ = link_to workbench_imports_path(current_offer_workbench), class: "list-group-item #{(params[:controller] == 'imports') ? 'active' : ''}" do
+ span Import
+ = link_to calendars_path, class: 'list-group-item' do
+ span Modèles de calendrier
+ = link_to workbench_compliance_check_sets_path(current_offer_workbench), class: 'list-group-item' do
+ span Rapport de contrôle
+ = link_to compliance_control_sets_path, class: 'list-group-item' do
+ span Jeux de contrôle
+
+ .menu-item.panel
+ .panel-heading
+ h4.panel-title
+ = link_to '#miThree', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
+ |Données
+
+ #miThree.panel-collapse.collapse
+ - if @referential.try(:id) && respond_to?(:current_referential)
+ .list-group
+ .list-group-item
+ = (current_referential.name).upcase
+ .list-group
+ = link_to referential_networks_path(current_referential), class: 'list-group-item' do
+ span = t('networks.index.title')
+
+ = link_to referential_companies_path(current_referential), class: 'list-group-item' do
+ span = t('companies.index.title')
+
+ = link_to '#', class: 'list-group-item disabled' do
+ span Tracés
+
+ = link_to referential_time_tables_path(current_referential), class: 'list-group-item' do
+ span = t('time_tables.index.title')
+
+ - else
+ .panel-body
+ em.text-muted
+ = "Sélectionnez un jeu de données pour accéder à plus de fonctionnalités"
+
+ .menu-item.panel
+ .panel-heading
+ h4.panel-title
+ = link_to '#miFour', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
+ |Synchronisation
+
+ #miFour.panel-collapse.collapse
+ .list-group
+ = link_to line_referential_path(1), class: "list-group-item #{(@localizationUrl == 'line_referentials#show') ? 'active' : ''}" do
+ span Synchronisation iLICO
+ = link_to stop_area_referential_path(1), class: "list-group-item #{(@localizationUrl == 'stop_area_referentials#show') ? 'active' : ''}" do
+ span Synchronisation iCAR
+
+ .menu-item.panel
+ .panel-heading
+ h4.panel-title
+ = link_to '#miFive', data: {toggle: 'collapse', parent: '#menu-items'}, 'aria-expanded' => 'false' do
+ |Outils
+
+ #miFive.panel-collapse.collapse
+ .list-group
+ = link_to Rails.application.config.try(:portal_url), target: '_blank', class: 'list-group-item' do
+ span
+ span.fa.fa-2x.fa-circle
+ |Portail (POSTIF)
+
+ = link_to Rails.application.config.try(:codifligne_url), target: '_blank', class: 'list-group-item' do
+ span
+ span.fa.fa-2x.fa-circle
+ |iLICO
+
+ = link_to Rails.application.config.try(:reflex_url), target: '_blank', class: 'list-group-item' do
+ span
+ span.fa.fa-2x.fa-circle
+ |iCAR
+
+ = link_to '#', target: '_blank', class: 'list-group-item' do
+ span
+ span.fa.fa-2x.fa-circle
+ |Support