Commit b532a620295284fd1c20cbc4c20a63cb73bac938
1 parent
76011137
Exists in
master
and in
2 other branches
Some modifications and now included the print button to print the news
Showing
1 changed file
with
11 additions
and
5 deletions
Show diff stats
news/templates/news/view.html
... | ... | @@ -25,11 +25,11 @@ |
25 | 25 | </script> |
26 | 26 | {% endfor %} |
27 | 27 | {% endif %} |
28 | -<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 "> | |
29 | - <div class="col-lg-12 row-fluid panel panel-default"> | |
30 | - <div class="panel-body"> | |
28 | + | |
29 | + <div class="row-fluid panel panel-default" > | |
30 | + <div class="panel-body" id="printArea"> | |
31 | 31 | <div class="col-md-12" style="display:inline-block"> |
32 | - <h2><b>{{new.title}}</b></h2> | |
32 | + <h2><b>{{new.title}}</b></h2> <button style="text-transform:none; text-decoration: underline;" type="button" class="pull-right btn btn-default btn-sm" id="printButton" name="button">{% trans "Print News" %} <i class="fa fa-print" aria-hidden="true"></i></button><br> | |
33 | 33 | <p>{{new.creator}}, em {{new.create_date}}</p> |
34 | 34 | </div> |
35 | 35 | <div class="col-md-12"> |
... | ... | @@ -43,6 +43,12 @@ |
43 | 43 | |
44 | 44 | </div> |
45 | 45 | |
46 | + <script type="text/javascript" src="{% static 'js/printThis.js' %}"></script> | |
47 | + <script type="text/javascript"> | |
48 | + $('#printButton').click(function(){ | |
49 | + $("#printArea").printThis({removeInline:true,importStyle: true, }); | |
50 | + }); | |
51 | + | |
52 | + </script> | |
46 | 53 | |
47 | -</div> | |
48 | 54 | {% endblock %} | ... | ... |