Sonar

Better printing of pages

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.6
  • Component/s: Web
  • Labels:
    None
  • Number of attachments :
    1

Description

See the attached pdf file to see what you currently get when you print a Sonar page.
Here are several improvements to get a better result :

  • When printing, navigation bars (top and left) must disappear
  • The name of the project must appear on top left

Issue Links

Activity

Hide
Simon Brandhof added a comment -

First draft, add the following in the top of style.css :

/* PRINT */
@media print {
  html, body { 
	font-size: 8pt; 
  }
  a, a:link, a:visited { text-decoration: none; border-bottom: 0; }
  .noprint { display:none !important; }
  .print { display: inline; position: static; left:0; }
  #header { display:none;}
  .nav { display: none;}
  #sidebar {display: none; margin: 0;}
  #contentwrapper { float: none;}
  #content {
	  margin-left: 0 !important;
	  padding: 0 !important;
  }
}
@media screen {
.print { display: none; }	
}

To do :

  • landscape format
  • forbids white fonts (for example measures with red alert)
  • display the project name (because the header is not printed). Example in application.rb :
    <div id="contentwrapper"><div id="content">
    <% if @snapshot %><div class="print"><h2><%= h @snapshot.project.fullname %></h2></div><% end %>
Show
Simon Brandhof added a comment - First draft, add the following in the top of style.css :
/* PRINT */
@media print {
  html, body { 
	font-size: 8pt; 
  }
  a, a:link, a:visited { text-decoration: none; border-bottom: 0; }
  .noprint { display:none !important; }
  .print { display: inline; position: static; left:0; }
  #header { display:none;}
  .nav { display: none;}
  #sidebar {display: none; margin: 0;}
  #contentwrapper { float: none;}
  #content {
	  margin-left: 0 !important;
	  padding: 0 !important;
  }
}
@media screen {
.print { display: none; }	
}
To do :
  • landscape format
  • forbids white fonts (for example measures with red alert)
  • display the project name (because the header is not printed). Example in application.rb :
    <div id="contentwrapper"><div id="content">
    <% if @snapshot %><div class="print"><h2><%= h @snapshot.project.fullname %></h2></div><% end %>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: