diff options
| author | cedricnjanga | 2017-10-25 17:15:34 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-10-25 18:02:36 +0200 |
| commit | 2ad3520f94bcfca20bb95dfdac98ad6735ca1287 (patch) | |
| tree | e9a62646af4618453d788b11ffcb17948d914954 /app/views/stif | |
| parent | b0c1dd17d8e301ed2c3c22d84cf3620763b9fdf7 (diff) | |
| download | chouette-core-2ad3520f94bcfca20bb95dfdac98ad6735ca1287.tar.bz2 | |
Refs #4759
Fix bug on dashboard to show the 5 first referentials of the current_organisation's first workbench.
Added a small changes dashboard.rb to avoid '@workbench is not defined error'
With the same logic we list only the first 5 calendars
Diffstat (limited to 'app/views/stif')
| -rw-r--r-- | app/views/stif/dashboards/_dashboard.html.slim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/stif/dashboards/_dashboard.html.slim b/app/views/stif/dashboards/_dashboard.html.slim index 3142ecd5b..f3cd01f46 100644 --- a/app/views/stif/dashboards/_dashboard.html.slim +++ b/app/views/stif/dashboards/_dashboard.html.slim @@ -39,14 +39,14 @@ h3.panel-title.with_actions div = t('.referentials') - span.badge.ml-xs = @referentials.count if @referentials.present? + span.badge.ml-xs = @dashboard.referentials.count if @dashboard.referentials.present? div = link_to '', workbench_path(@dashboard.workbench), class: ' fa fa-chevron-right pull-right', title: t('.see') - - if @referentials.present? + - if @dashboard.referentials.present? .list-group - - @referentials.each_with_index do |referential, i| + - @dashboard.referentials.first(5).each_with_index do |referential, i| = link_to referential.name, referential_path(referential, workbench_id: referential.workbench_id, current_workbench_id: @dashboard.workbench.id), class: 'list-group-item' if i < 6 - else @@ -65,7 +65,7 @@ - if @dashboard.calendars.present? .list-group - - @dashboard.calendars.each_with_index do |calendar, i| + - @dashboard.calendars.first(5).each_with_index do |calendar, i| = link_to calendar.name, calendar_path(calendar), class: 'list-group-item' if i < 6 - else |
