Koha/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
Paul Poulain 03d9a79878 suggestions changes (probably useless)
and incompatible with hdl stuff
2009-09-30 11:30:22 +02:00

246 lines
13 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Acquisitions &rsaquo; Suggestions Management</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">
// <![CDATA[
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
/**
* displayOther.
* This function display the select or an textaera to write a reason.
*/
function displayOther(id,show,hide) {$("#"+hide+id).hide(); $("#"+show+id).show(); }
$(document).ready(function() {
$('#suggestiontabs > ul').tabs({
select: function(ui) {
$("#loadingtab").show();
},
show: function(ui) {
$("#loadingtab").hide();
}
});
$.tablesorter.defaults.widgets = ['zebra'];
$("#acceptedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}}
});
$("#acceptedt").bind("sortStart",function() {
$("#sorting").show();
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("#pendingt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}}
});
$("#pendingt").bind("sortStart",function() {
$("#sorting").show();
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("#rejectedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}}
});
$("#rejectedt").bind("sortStart",function() {
$("#sorting").show();
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("#checkedt").tablesorter({<!-- TMPL_IF EXPR="dateformat eq 'metric'" -->
dateFormat: 'uk',<!-- /TMPL_IF -->
headers: { 0: { sorter: 'articles' },3:{sorter: false},4:{sorter: false},5:{sorter: false},6:{sorter: false},7:{sorter: false}, 8:{sorter: false}}
});
$("#checkedt").bind("sortStart",function() {
$("#sorting").show();
}).bind("sortEnd",function() {
$("#sorting").hide();
});
$("div[id*=other-reason]").hide();
$("input[name*=other-reason]").focus(function(){ $(this).val(""); });
$("select[name*=reason]").change(function(){
if($(this).children("[selected]").val() == "other"){
displayOther($(this).attr("name").replace(/reason/,""),"other-reason","select-reason");
}
});
$("a[href*=back]").click(function(){
var sid = $(this).attr("href").replace(/#back/,"");
displayOther(sid,"select-reason","other-reason");
$("#reason"+sid).find("option[value='']").attr("selected","selected");
});
$("a[href=#markall]").click(function(){
if($(this).attr("id").indexOf("markallop") > -1){
// select each identical option, clear each input
var selectedOp = $(this).prev().find("option:selected").val();
var container = $(this).attr("id").replace(/markallop/,"");
$("#"+container+" div[id*=other-reason]").hide();
$("#"+container+" div[id*=select-reason]").show();
$("#"+container+" select[name*=reason]").not("select[name*=all]").children().each(function(){
if($(this).val() == selectedOp){ $(this).attr("selected","selected"); }
});
} else {
// set each input value, deselect options
var inputText = $(this).prev().val();
var container = $(this).attr("id").replace(/markalltext/,"");
// hide all selects
$("#"+container+" input[name*=other-reason]").not("input[name*=all]").each(function(){
// show all text inputs and populate
$(this).val(inputText).parent("div").show();
$("div[class=select"+container+"]").hide();
});
}
});
});
// ]]>
</script>
<style type="text/css">
.overlay { top: 180px; left: 50%; position: absolute; margin-left: -100px; width: 200px; text-align: center; display: none; margin-top: -10px; background: #eeffd4; padding : .5em; color: #000; }
</style>
</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/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <!-- TMPL_IF NAME="op_accepted"--> <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Suggestions Management</a> &rsaquo; Accepted<!-- /TMPL_IF --><!-- TMPL_IF NAME="op_else"--> Suggestions Management<!-- /TMPL_IF --><!-- TMPL_IF NAME="op_rejected"--> <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Suggestions Management</a> &rsaquo; Rejected<!-- /TMPL_IF --></div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Suggestions</h1>
<div id="sorting" class="overlay">Sorting...</div>
<div id="loadingtab" class="overlay">Loading tab...</div>
<div id="suggestiontabs" class="toptabs">
<ul class="ui-tabs-nav">
<li class="ui-tabs-selected"><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#pending">Pending</a></li>
<li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#checked">Checked</a></li>
<li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#accepted">Accepted</a></li>
<li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl#rejected">Rejected</a></li>
</ul>
<!--TMPL_LOOP Name="suggestions"-->
<div id="<!--TMPL_VAR Name="suggestiontype"-->">
<form name="f<!--TMPL_VAR Name="suggestiontype"-->" method="post" action="/cgi-bin/koha/suggestion/acceptorreject.pl#<!--TMPL_VAR Name="suggestiontype"-->">
<input type="hidden" name="op" value="aorr_confirm" />
<input type="hidden" name="suggestiontype" value="<!--TMPL_VAR Name="suggestiontype"-->" />
<!-- TMPL_IF NAME="suggestions_loop" -->
<table id="<!--TMPL_VAR Name="suggestiontype"-->t">
<thead><tr>
<th>Suggestion</th>
<th>Notes</th>
<th>Suggested by</th>
<th>Date</th>
<th>Reason</th>
<!--TMPL_IF EXPR="suggestiontype ne 'pending'"-->
<th>Reason Update</th>
<!--/TMPL_IF -->
<th>Checked</th>
<th>Accept</th>
<th>Reject</th>
<th>Delete</th>
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="suggestions_loop" -->
<!-- TMPL_IF name="even" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
<td>
<!-- TMPL_IF NAME="title" --><a href="/cgi-bin/koha/catalogue/search.pl?q=<!-- TMPL_VAR NAME="title" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- /TMPL_IF --><!-- TMPL_IF NAME="author" -->, by <a href="/cgi-bin/koha/catalogue/search.pl?q=au:<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a><!-- /TMPL_IF --><br />
<!-- TMPL_IF name="copyrightdate" -->&copy; <!-- TMPL_VAR name="copyrightdate" --> <!-- /TMPL_IF -->
<!-- TMPL_IF name="volumedesc" -->; Volume:<i><!-- TMPL_VAR name="volumedesc" --></i> <!-- /TMPL_IF -->
<!-- TMPL_IF name="isbn" -->; ISBN :<i><!-- TMPL_VAR name="isbn" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->; Published by <!-- TMPL_VAR name="publishercode" --> <!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR name="publicationyear" --></i> <!-- /TMPL_IF --><!-- TMPL_IF name="place" --> in <i><!-- TMPL_VAR name="place" --></i> <!-- /TMPL_IF --><br /></td>
<td><!-- TMPL_VAR NAME="note" --></td>
<td>
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrnumsuggestedby" -->"><!-- TMPL_VAR name="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF -->
<!-- TMPL_VAR name="firstnamesuggestedby" --></a><br />
<!-- TMPL_VAR name="categorydescriptionsuggestedby" --> (<!-- TMPL_VAR name="categorycodesuggestedby" -->)<br />
<!-- TMPL_VAR name="branchnamesuggestedby" --> (<!-- TMPL_VAR name="branchcodesuggestedby" -->)
</td>
<td>
<!-- TMPL_VAR name="suggestioncreatedon" -->
</td>
<!--TMPL_IF EXPR="suggestiontype ne 'pending'"-->
<td>
<!--TMPL_VAR Name="reason"-->
<input type="hidden" name="initial-reason<!-- TMPL_VAR name="ordernumber" -->" value="<!--TMPL_VAR Name="reason" ESCAPE="HTML"-->" />
</td>
<!--/TMPL_IF -->
<td>
<div id="select-reason<!-- TMPL_VAR NAME="ordernumber" -->" class="select<!-- TMPL_VAR NAME="suggestiontype" -->">
<!-- TMPL_IF NAME="reasonsloop" --><select id="reason<!-- TMPL_VAR NAME="ordernumber" -->" name="reason<!-- TMPL_VAR NAME="ordernumber" -->">
<option value=""> -- Choose a reason -- </option>
<!-- TMPL_LOOP NAME="reasonsloop" -->
<option value="<!-- TMPL_VAR NAME="lib" -->"><!-- TMPL_VAR NAME="lib" --></option>
<!-- /TMPL_LOOP -->
<option value="other">Others...</option>
</select><!-- TMPL_ELSE --><span class="problem">No reasons defined in <a href="/cgi-bin/koha/admin/authorised_values.pl">authorized values</a></span><!-- /TMPL_IF -->
</div>
<div id="other-reason<!-- TMPL_VAR NAME="ordernumber" -->">
<input type="text" size="31" name="other-reason<!-- TMPL_VAR name="ordernumber" -->" value="please note your reason here..." />
<p><a href="#back<!-- TMPL_VAR NAME="ordernumber" -->">back to list</a></p>
</div>
</td>
<td>
<!--TMPL_IF Name="CHECKED"-->
<input id="c<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="CHECKED" readonly="readonly" checked="checked" />
<!--TMPL_ELSE-->
<input id="c<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="CHECKED" />
<!--/TMPL_IF-->
</td>
<td>
<!--TMPL_IF Name="ACCEPTED"-->
<input id="a<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="ACCEPTED" readonly="readonly" checked="checked" />
<!--TMPL_ELSE-->
<input id="a<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="ACCEPTED" />
<!--/TMPL_IF-->
</td>
<td>
<!--TMPL_IF Name="REJECTED"-->
<input id="r<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="REJECTED" readonly="readonly" checked="checked" />
<!--TMPL_ELSE-->
<input id="r<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="REJECTED" />
<!--/TMPL_IF-->
</td>
<td>
<input id="d<!--TMPL_VAR name="ordernumber" -->" name="<!--TMPL_VAR name="ordernumber" -->" type="radio" value="delete" />
</td>
</tr>
<!-- /TMPL_LOOP --></tbody>
</table> <fieldset>
<div id="select-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
<label for="reason<!-- TMPL_VAR NAME="suggestiontype" -->all">Choose a reason for all marked entries:</label> <select id="reason<!-- TMPL_VAR NAME="suggestiontype" -->all" name="reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
<option value=""> -- Choose a reason -- </option>
<!--TMPL_LOOP Name="reasonsloop"-->
<option value="<!--TMPL_VAR Name="lib" -->"><!--TMPL_VAR Name="lib" --></option>
<!--/TMPL_LOOP-->
<option value="other">Others...</option>
</select> <a href="#markall" id="markallop<!-- TMPL_VAR NAME="suggestiontype" -->">Mark all with this reason</a>
</div>
<div id="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">
<label for="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all">Enter a reason for all marked entries:</label>
<input type="text" size="31" id="select-other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all" name="other-reason<!-- TMPL_VAR NAME="suggestiontype" -->all" value="please note your reason here..." /> <a href="#markall" id="markalltext<!-- TMPL_VAR NAME="suggestiontype" -->">Mark all with this reason</a> <a href="#back<!-- TMPL_VAR NAME="suggestiontype" -->all">Cancel</a>
<!--Add feature : choose librarian Choose supplier if accepted and allow order, Choose Budget Choose Branchcode--> </div>
</fieldset>
<fieldset class="action"><input type="submit" value="Change Status" /></fieldset>
</form>
<!-- TMPL_ELSE -->
<b>No <!--TMPL_VAR Name="suggestiontype"--> suggestions.</b>
<!-- /TMPL_IF -->
</div>
<!--/TMPL_LOOP-->
</div>
</div></div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->