[Koha-patches] [PATCH 29/55] [MT2275] Hide buttons when there is no more checkboxes
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Wed Mar 10 22:26:11 CET 2010
From: Jean-André Santoni <jeanandre.santoni at biblibre.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>
---
.../prog/en/modules/offline_circ/list.tmpl | 97 ++++++++++++++++++++
1 files changed, 97 insertions(+), 0 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tmpl
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tmpl
new file mode 100644
index 0000000..50fe065
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/list.tmpl
@@ -0,0 +1,97 @@
+ <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+ <title>Koha › Circulation › Offline Circulation</title>
+ <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+ <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
+ <script type="text/javascript" language="javascript">
+ $(document).ready(function() {
+ $('#checkall').click(function() {
+ $(":checkbox").attr('checked', $('#checkall').is(':checked'));
+ });
+ $('#process,#delete').click(function() {
+ var action = $(this).attr("id");
+ $(":checkbox[name=operationid]:checked").each(function() {
+ var cb = $(this);
+ $.ajax({
+ url: "process.pl",
+ data: { 'action': action, 'operationid': this.value },
+ async: false,
+ dataType: "text",
+ success: function(data) {
+ cb.replaceWith(data);
+ }});
+ });
+ if( $('#operations tbody :checkbox').size() == 0 ) {
+ $('#actions').hide();
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+ <!-- TMPL_INCLUDE NAME="header.inc" -->
+ <!-- TMPL_INCLUDE NAME="circ-search.inc" -->
+
+ <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › Offline Circulation</div>
+
+ <div id="doc" class="yui-t7">
+
+ <div id="bd">
+
+ <h2>Offline Circulation</h2>
+
+ <!-- TMPL_IF NAME="operations" -->
+
+ <form>
+
+ <table id="operations">
+ <thead>
+ <tr>
+ <th><input type="checkbox" name="checkall" id="checkall" /></th>
+ <th>Date</th>
+ <th>Action</th>
+ <th>Barcode</th>
+ <th>Cardnumber</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- TMPL_LOOP NAME="operations" -->
+ <tr class="oc-<!-- TMPL_VAR NAME="action" -->">
+ <td><input type="checkbox" name="operationid" value="<!-- TMPL_VAR NAME="operationid" -->" /></td>
+ <td><!-- TMPL_VAR NAME="timestamp" --></td>
+ <td><!-- TMPL_VAR NAME="action" --></td>
+ <td>
+ <!-- TMPL_IF NAME="biblionumber" -->
+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" title="<!-- TMPL_VAR NAME="bibliotitle" -->"><!-- TMPL_VAR NAME="barcode" --></a>
+ <!-- TMPL_ELSE -->
+ <span class="error"><!-- TMPL_VAR NAME="barcode" --></span>
+ <!-- /TMPL_IF -->
+ </td>
+ <td>
+ <!-- TMPL_IF NAME="actionissue" -->
+ <!-- TMPL_IF NAME="borrowernumber" -->
+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->" title="<!-- TMPL_VAR NAME="borrower" -->"><!-- TMPL_VAR NAME="cardnumber" --></a>
+ <!-- TMPL_ELSE -->
+ <span class="error"><!-- TMPL_VAR NAME="cardnumber" --></span>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_IF -->
+ </td>
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </tbody>
+ </table>
+
+ <p id="actions">For the selected operations:
+ <input type="button" id="process" value="Process" />
+ <input type="button" id="delete" value="Delete" /></p>
+
+ </form>
+
+ <!-- TMPL_ELSE -->
+
+ <p>There is no pending offline operations.</p>
+
+ <!-- /TMPL_IF -->
+
+ </div>
+
+ <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
--
1.6.3.3
More information about the Koha-patches
mailing list