Merge branch 'patroncards-wip' of git://git.foundations.edu/koha into community
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / koha-news.tmpl
old mode 100644 (file)
new mode 100755 (executable)
index 2569a73..09dca99
@@ -1,21 +1,49 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
-<title>Koha &rsaquo; Tools &rsaquo; Koha News</title>
+<title>Koha &rsaquo; Tools &rsaquo; News</title>
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
-<!-- TMPL_UNLESS NAME="add_form" --><!-- TMPL_INCLUDE NAME="yui-toolbars.inc" --><!-- /TMPL_UNLESS -->
+<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 class="yui-skin-sam">
+<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/reports/tools-home.pl">Tools</a> &rsaquo; <!-- TMPL_IF NAME="add_form" --><a href="/cgi-bin/koha/tools/koha-news.pl">Koha News</a> &rsaquo; Add News Item<!-- TMPL_ELSE -->Koha News<!-- /TMPL_IF --></div>
+<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" --><!-- TMPL_INCLUDE NAME="tools-news-toolbar.inc" --><!-- /TMPL_UNLESS -->
+<!-- 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" >
                        <fieldset class="rows">
                        <legend>OPAC and Koha News</legend>
            <ol> <li>
-            <label for="lang">Language</label>
+            <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"><!-- TMPL_VAR name="language" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="language" -->"><!-- TMPL_VAR name="language" --></option><!-- /TMPL_IF -->
+                    <!-- 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>
                 <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>
+            </li>
             <li>
                 <label for="expirationdate">Expiration date</label>
-                <input id="expirationdate" type="text" name="expirationdate" value="<!-- TMPL_VAR NAME="expirationdate" -->" />
+                <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" -->",
                     }
@@ -51,7 +95,7 @@
             <li>
                 <label for="number">Appear in position </label>
                 <!-- TMPL_IF NAME="number"-->
-                    <input id="number" size="3" name="number" type="text" checked="checked" />
+                    <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 -->
             </ol>
                        </fieldset>
   
-                <input class="button" type="submit" value="Save" />
-                <input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/tools/opac-news.pl'" />
+                <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 -->
-        <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
-            <label for="lang">Language</label>
+        <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_ELSE -->
                         <option value="<!-- TMPL_VAR name="language" -->">
                     <!-- /TMPL_IF -->
-                        <!-- TMPL_VAR name="language" -->
+                        OPAC (<!-- TMPL_VAR name="language" -->)
                     </option>
                 <!-- /TMPL_LOOP -->
             </select>
             <input type="submit" class="button" value="Filter" />
-            </form>
+        </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>
-                    <tr>
+                <table id="newst">
+                   <thead> <tr>
                         <th>&nbsp;</th>
-                        <th>Language</th>
+                        <th>Location</th>
                         <th>Number</th>
-                        <th>Creation Date</th>
-                        <th>Expiration Date</th>
+                        <th>Creation&nbsp;Date</th>
+                        <th>Expiration&nbsp;Date</th>
                         <th>Title</th>
                         <th>News</th>
                         <th>&nbsp;</th>
-                    </tr>
-                    <!-- TMPL_LOOP NAME="opac_news" -->
-                        <tr>
+                    </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_VAR NAME="lang" --></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" --></td>
+                            <td><!-- TMPL_VAR NAME="expirationdate" --> <!-- TMPL_IF NAME="expired" -->(<span class="expired">expired</span>)<!-- /TMPL_IF --></td>
                             <td><!-- TMPL_VAR NAME="title" --></td>
-                            <!-- TMPL_IF NAME="hasexpirated" -->
-                            <td class="hasexpirated">
-                            <!-- TMPL_ELSE -->
-                            <td>
-                            <!-- /TMPL_IF -->
+                           <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 -->
+                    <!-- /TMPL_LOOP --></tbody>
                 </table>
                 <input type="hidden" name="op" value="del" />
-                <input type="submit" class="button" value="Delete selected" />
+                <fieldset class="action"><input type="submit" class="button" value="Delete selected" /></fieldset>
             </form>
         <!-- TMPL_ELSE -->
             <p>No news loaded</p>
     <!-- /TMPL_IF -->
 </div>
 </div>
-<!-- TMPL_UNLESS NAME="add_form" --><div class="yui-b">
-<!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
-</div><!-- /TMPL_UNLESS -->
+<!-- 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" -->