Skip to content

Commit

Permalink
modified print style for redmine 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jkalbhenn committed Jan 19, 2016
1 parent e750f47 commit 0c933e5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
8 changes: 4 additions & 4 deletions app/views/timesheet/report.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
<%= render :partial => 'timesheet_group', :locals => {:entry => entry, :name => entryname, :total => @total[entryname] } %>
<% when :date %>
<%#*entry[:logs].each do |log|%>
<% logger.debug "#{'*'*100}\n ENTRYNAME > #{entryname.to_yaml} ENTRY #{entry[:logs][0].id}\n#{'*'*100}"%>
<% logger.debug "#{'*'*100}\n ENTRYNAME > #{entryname.to_yaml} ENTRY #{entry[:logs][0].id}\n#{'*'*100}"%>

<h3><%= toggle_issue_arrows_date(entryname) %><%= h entryname -%> (<%= h number_with_precision(@total[entryname], :precision => @precision) %> <%= h(l(:field_hours)) -%>)</h3>

<span class="<%= cycle("odd", "even") %> issue-time-entry-<%= entryname -%>" style="display:none;">
<%= render :partial => 'timesheet_group', :locals => {:entry => entry, :name => entryname, :total => @total[entryname] } %>
</span>
</span>

<%#*end%>
<script type="text/javascript">
Expand All @@ -58,7 +58,7 @@
</script>
<% else %>
<%# Default to :project %>
<h3><%= h entryname -%> (<%= h number_with_precision(@total[entryname], :precision => @precision) %> <%= h(l(:field_hours)) -%>) <%= showing_users(entry[:users]) %></h3>
<h3><%= h entryname -%> (<%= h number_with_precision(@total[entryname], :precision => @precision) %> <%= h(l(:field_hours)) -%>) <%= showing_users(entry[:users]) %></h3>
<%= render :partial => 'timesheet_group', :locals => {:entry => entry, :name => entryname, :total => @total[entryname] } %>

<% end
Expand All @@ -70,7 +70,7 @@
<% content_for(:header_tags) do %>
<%= javascript_include_tag 'context_menu' %>
<%= stylesheet_link_tag 'context_menu' %>
<%= stylesheet_link_tag 'timesheet.css', :plugin => 'redmine_timesheet_plugin', :media => 'all' %>
<%= stylesheet_link_tag 'timesheet.css', :plugin => 'redmine_timesheet_plugin' %>
<%= stylesheet_link_tag 'timesheet-print.css', :plugin => 'redmine_timesheet_plugin', :media => 'print' %>
<%= javascript_include_tag 'timesheet.js', :plugin => 'redmine_timesheet_plugin' %>
<%= call_hook(:plugin_timesheet_views_timesheets_report_header_tags, { :timesheet => @timesheet }) %>
Expand Down
30 changes: 26 additions & 4 deletions assets/stylesheets/timesheet-print.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
body {
font-size: 10px;
}

table.list td {
padding: 0;
padding-top: 2px;
padding-bottom: 2px;
}

table.list td, table.list th {
text-align: left;
}
table.list th {
padding: 0;
padding-bottom: 4px;
font-weight: bold;
}

#footer,
#top-menu,
#header,
Expand All @@ -20,12 +39,10 @@ h2,
display: none;
}

tr.total {
display: table-row;
}

tr.total td {
font-weight: bold;
padding-top: 0;
height: 24px;
}

#time_entries a {
Expand All @@ -50,6 +67,11 @@ h3:first-of-type {
background-color: #fff !important;
}

tr.total {
display: table-row;
border-top: 1px solid #ddd !important;
}

table * {
text-align: left;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/timesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ tr.total {

.timesheet-groups {
display:none;
}
}
5 changes: 0 additions & 5 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Project.send(:include, RedmineTimesheetPlugin::Patches::ProjectPatch)
User.send(:include, RedmineTimesheetPlugin::Patches::UserPatch)
TimeEntry.send(:include, RedmineTimesheetPlugin::Patches::TimeEntryPatch)

# Needed for the compatibility check
begin
require_dependency 'time_entry_activity'
Expand All @@ -33,21 +32,17 @@
description 'This is a Timesheet plugin for Redmine to show timelogs for all projects'
url 'http://github.com/arkhitech/redmine_timesheet_plugin'
author_url 'https://github.com/arkhitech'

version '0.7.0'
requires_redmine :version_or_higher => '2.0.0'

settings(:default => {
'list_size' => '5',
'precision' => '2',
'project_status' => 'active',
'user_status' => 'active'
}, :partial => 'settings/timesheet_settings')

project_module :timesheet do
permission :see_all_timesheets, {}
end

menu(:top_menu,
:timesheet,
{:controller => :timesheet, :action => :index},
Expand Down

0 comments on commit 0c933e5

Please sign in to comment.