Merge remote branch 'kc/new/enh/bug_5283' into kcmaster

This commit is contained in:
Chris Cormack 2010-12-17 09:43:17 +13:00
commit 9c17e9305a
3 changed files with 34 additions and 2 deletions

View file

@ -2,7 +2,8 @@
<title>Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="<!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/print.css" />
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/print.css" />
<script language="javascript">
window.print();
window.close();
@ -57,4 +58,17 @@ Date due: <!-- TMPL_VAR NAME="date_due" --></p>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="koha_news_count" -->
<hr><h4 style="text-align: center; font-style:italic;">News</h4>
<!-- <!-- TMPL_VAR name="koha_news_count" --> recent news item(s) -->
<!-- TMPL_LOOP name="koha_news" -->
<div class="newsitem" id="news<!-- TMPL_VAR NAME="idnew" -->"><h5 style="margin-bottom: 1px; margin-top: 1px"><b><!-- TMPL_VAR name="title" --></b></h5>
<p style="margin-bottom: 1px; margin-top: 1px"><!-- TMPL_VAR name="new" --></p>
<p class="newsfooter" style="font-size: 8pt; font-style:italic; margin-bottom: 1px; margin-top: 1px"> Posted on <!-- TMPL_VAR name="newdate" -->
</p><hr /></div>
<!-- /TMPL_LOOP -->
<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

View file

@ -55,6 +55,7 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
<label for="lang">Display Location</label>
<select id="lang" name="lang">
<option value="koha">Librarian interface</option>
<option value="slip">Slip</option>
<!-- TMPL_LOOP name="lang_list" -->
<!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR name="language" -->" selected="selected">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="language" -->">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
@ -116,6 +117,7 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
<select name="lang" id="lang">
<option value="">All</option>
<option value="koha">Librarian interface</option>
<option value="slip">Slip</option>
<!-- TMPL_LOOP name="lang_list" -->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR name="language" -->" selected="selected">
@ -151,7 +153,13 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
<td>
<input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->" />
</td>
<td><!-- TMPL_IF EXPR="lang eq 'koha'" -->Librarian interface<!-- TMPL_ELSE -->OPAC (<!-- TMPL_VAR NAME="lang" -->)<!-- /TMPL_IF --></td>
<td><!-- TMPL_IF EXPR="lang eq 'koha'" -->Librarian interface<!-- /TMPL_IF -->
<!-- /TMPL_ELSE -->
<!-- TMPL_IF EXPR="lang eq 'slip'" -->Slip<!-- /TMPL_IF -->
<!-- /TMPL_ELSE -->
<!-- TMPL_IF EXPR="lang ne 'slip'" --><!-- TMPL_IF EXPR="lang ne 'koha'" -->OPAC<!-- /TMPL_IF --><!-- /TMPL_IF -->
</td>
<td><!-- TMPL_VAR NAME="number" --></td>
<td><!-- TMPL_VAR NAME="newdate" --></td>
<td><!-- TMPL_VAR NAME="expirationdate" --> <!-- TMPL_IF NAME="expired" -->(<span class="expired">expired</span>)<!-- /TMPL_IF --></td>

View file

@ -49,6 +49,7 @@ use C4::Biblio;
use C4::Reserves;
use C4::Branch; # GetBranchName
use C4::Form::MessagingPreferences;
use C4::NewsChannels; #get slip news
#use Smart::Comments;
#use Data::Dumper;
@ -443,4 +444,13 @@ $template->param(
quickslip => $quickslip,
);
#Get the slip news items
my $all_koha_news = &GetNewsToDisplay("slip");
my $koha_news_count = scalar @$all_koha_news;
$template->param(
koha_news => $all_koha_news,
koha_news_count => $koha_news_count
);
output_html_with_http_headers $input, $cookie, $template->output;