Koha/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
Owen Leonard cd921163c0 Fixes for Bug 3089, Date entry fields should indicate required date format
- Added include, date-format.inc, which shows format, e.g. "(DD/MM/YYYY)"
- Hint shows expected date format based on system preference
- Removing calendar.inc include from templates which don't use it

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-03 15:12:18 -05:00

181 lines
8.7 KiB
Cheetah
Executable file

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Tools &rsaquo; News</title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function() {
$("#newst").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
sortList: [[2,0]],
headers: { 0: {sorter:false},6: { sorter: false },7: { sorter: false }}
});
});
//]]>
</script>
</head>
<body>
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <!-- TMPL_IF NAME="add_form" --><a href="/cgi-bin/koha/tools/koha-news.pl">News</a> &rsaquo; <!-- TMPL_IF NAME="id" -->
Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->News<!-- /TMPL_IF --></div>
<!-- TMPL_IF NAME="add_form" --><div id="doc" class="yui-t7"><!-- TMPL_ELSE --><div id="doc3" class="yui-t2"><!-- /TMPL_IF -->
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<!-- TMPL_UNLESS NAME="add_form" -->
<div id="toolbar">
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
yuiToolbar();
});
// YUI Toolbar Functions
function yuiToolbar() {
new YAHOO.widget.Button("newentry");
}
//]]>
</script>
<ul class="toolbar">
<li><a id="newentry" href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New Entry</a></li>
</ul></div>
<!-- /TMPL_UNLESS -->
<!-- TMPL_IF name="add_form" -->
<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->" />
<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
<fieldset class="rows">
<legend>OPAC and Koha News</legend>
<ol> <li>
<label for="lang">Display Location</label>
<select id="lang" name="lang">
<option value="koha">Librarian interface</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 -->
</select>
</li>
<li>
<label for="title">Title</label>
<input id="title" size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
</li>
<li>
<label for="timestamp">Publication date</label>
<input id="timestamp" type="text" name="timestamp" size="15" value="<!-- TMPL_VAR NAME="timestamp" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="timestampButton" style="cursor: pointer;" />
<script type="text/javascript">
Calendar.setup(
{
button : "timestampButton",
inputField : "timestamp",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
}
);
</script>
<div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
</li>
<li>
<label for="expirationdate">Expiration date</label>
<input id="expirationdate" type="text" name="expirationdate" size="15" value="<!-- TMPL_VAR NAME="expirationdate" -->" />
<img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendar" style="cursor: pointer;" />
<script type="text/javascript">
Calendar.setup(
{
button : "openCalendar",
inputField : "expirationdate",
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
}
);
</script>
<div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
</li>
<li>
<label for="number">Appear in position </label>
<!-- TMPL_IF NAME="number"-->
<input id="number" size="3" name="number" type="text" checked="checked" value="<!-- TMPL_VAR NAME="number" -->" />
<!-- TMPL_ELSE -->
<input id="number" size="3" name="number" type="text" />
<!-- /TMPL_IF -->
</li>
<li><label for="new">News</label>
<textarea name="new" id="new" cols="75" rows="10"><!-- TMPL_VAR NAME="new" --></textarea></li>
</ol>
</fieldset>
<fieldset class="action"><input class="button" type="submit" value="Submit" /> <a class="cancel" href="/cgi-bin/koha/tools/koha-news.pl">Cancel</a></fieldset>
</form>
<!-- TMPL_ELSE -->
<div style="margin-bottom:5px;">
<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
<label for="lang">Display Location:</label>
<select name="lang" id="lang">
<option value="">All</option>
<option value="koha">Librarian interface</option>
<!-- TMPL_LOOP name="lang_list" -->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR name="language" -->" selected="selected">
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR name="language" -->">
<!-- /TMPL_IF -->
OPAC (<!-- TMPL_VAR name="language" -->)
</option>
<!-- /TMPL_LOOP -->
</select>
<input type="submit" class="button" value="Filter" />
</form>
</div>
<!-- TMPL_IF NAME="opac_news_count" -->
<form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('Are you sure you want to delete the selected news?')">
<table id="newst">
<thead> <tr>
<th>&nbsp;</th>
<th>Location</th>
<th>Number</th>
<th>Creation&nbsp;Date</th>
<th>Expiration&nbsp;Date</th>
<th>Title</th>
<th>News</th>
<th>&nbsp;</th>
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="opac_news" -->
<!-- TMPL_IF NAME="expired" -->
<tr class="expired">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<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_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>
<td><!-- TMPL_VAR NAME="title" --></td>
<td>
<!-- TMPL_VAR NAME="new" -->
</td>
<td><a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a></td>
</tr>
<!-- /TMPL_LOOP --></tbody>
</table>
<input type="hidden" name="op" value="del" />
<fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
</form>
<!-- TMPL_ELSE -->
<p>No news loaded</p>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
</div>
<!-- TMPL_UNLESS NAME="add_form" -->
<div class="yui-b noprint">
<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
</div>
<!-- /TMPL_UNLESS -->
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->