From 29fda31dc47c1e18be6772c6ac49d4502d901431 Mon Sep 17 00:00:00 2001 From: Christoph Matthies Date: Tue, 10 Jan 2017 12:52:23 +0100 Subject: [PATCH] Feat(dashboard): Show scrollbars for dashboard panels with many entries. Fix #539 --- app/assets/stylesheets/application.css | 5 +++++ app/views/dashboard/_missing_timesheets.html.erb | 2 +- app/views/dashboard/index.html.erb | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 99d7758d..d16a4b2b 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -207,6 +207,11 @@ tr.highlight { color: white; } +.panel-scroll { + max-height: 300px; + overflow: auto; +} + /* Styling for Bootstrap modal popovers of gem 'data-confirm-modal' */ .modal-footer { diff --git a/app/views/dashboard/_missing_timesheets.html.erb b/app/views/dashboard/_missing_timesheets.html.erb index ce8ca314..c7048948 100644 --- a/app/views/dashboard/_missing_timesheets.html.erb +++ b/app/views/dashboard/_missing_timesheets.html.erb @@ -4,7 +4,7 @@

<%= t 'dashboard.index.missing_timesheets' %>

-
+
<% if @missing_timesheets.empty? %> <%= t 'no_entries_yet', target: t('activerecord.models.time_sheet.other') %> <% else %> diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 9f71d837..e3ba744c 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -34,7 +34,7 @@

<%= t '.ending_contracts' %>

-
+
<% if @ending_contracts.empty? %> <%= t 'no_entries_yet', target: t('activerecord.models.contract.other') %> <% else %> @@ -76,7 +76,7 @@

<%=t('.notifications')%>

-
+
<% @notifications.each do |event| %> <%= render partial: event %> <%= link_to t('helpers.submit.hide'), hide_event_path(id: event, request: current_user), method: :post, class: 'label label-warning' %> @@ -96,7 +96,7 @@

<%=t('.activities')%>

-
+
<% unless @activities.empty? %> <% @activities.each do |event| %> <%= render partial: event %>