Skip to content

Commit

Permalink
Feat(dashboard): Show scrollbars for dashboard panels with many entri…
Browse files Browse the repository at this point in the history
…es. Fix #539
  • Loading branch information
chrisma committed Jan 10, 2017
1 parent aba6ea2 commit 29fda31
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/views/dashboard/_missing_timesheets.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="panel-heading">
<h4><%= t 'dashboard.index.missing_timesheets' %></h4>
</div>
<div class="panel-body">
<div class="panel-body panel-scroll">
<% if @missing_timesheets.empty? %>
<%= t 'no_entries_yet', target: t('activerecord.models.time_sheet.other') %>
<% else %>
Expand Down
6 changes: 3 additions & 3 deletions app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="panel-heading">
<h4><%= t '.ending_contracts' %></h4>
</div>
<div class="panel-body">
<div class="panel-body panel-scroll">
<% if @ending_contracts.empty? %>
<%= t 'no_entries_yet', target: t('activerecord.models.contract.other') %>
<% else %>
Expand Down Expand Up @@ -76,7 +76,7 @@
<div class="panel-heading">
<h4><%=t('.notifications')%></h4>
</div>
<div class="panel-body">
<div class="panel-body panel-scroll">
<% @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' %>
Expand All @@ -96,7 +96,7 @@
<div class="panel-heading">
<h4><%=t('.activities')%></h4>
</div>
<div class="panel-body">
<div class="panel-body panel-scroll">
<% unless @activities.empty? %>
<% @activities.each do |event| %>
<%= render partial: event %>
Expand Down

0 comments on commit 29fda31

Please sign in to comment.