Re-working virtual shelves interface to try to make it cleaner and make the steps more clear. Still a couple of bugs: some redirects need to change in the script (after adds, deletes, and edits), to match the changes in what displays at each step. Also, the toolbar delete button needs troubleshooting.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2007-10-27 14:14:50 -05:00 committed by Joshua Ferraro
parent 21eaccd48b
commit 83f2c12b21
3 changed files with 124 additions and 103 deletions

View file

@ -319,6 +319,7 @@ div.cmDiv
.clickMenu li.more li a { .clickMenu li.more li a {
background-image : none; background-image : none;
padding-right : 0; padding-right : 0;
white-space : nowrap;
} }
.clickMenu .clickMenu
@ -820,3 +821,7 @@ span.expired {
color : #990000; color : #990000;
font-style : italic; font-style : italic;
} }
div.help {
margin: .9em 0 0 0;
}

View file

@ -0,0 +1,33 @@
<div id="toolbar">
<script type="text/javascript">
//<![CDATA[
// prepare DOM for YUI Toolbar
$(document).ready(function() {
$("#deleteshelfc").empty();
yuiToolbar();
});
// YUI Toolbar Functions
function yuiToolbar() {
newshelfButton = new YAHOO.widget.Button("newshelf");
editshelfButton = new YAHOO.widget.Button("editshelf");
deleteshelfButton = new YAHOO.widget.Button({
id: "deleteshelf",
type: "button",
label: "Delete Shelf",
container: "deleteshelfc",
onclick: {fn:function(){confirmDelete("Are you sure you want to delete this shelf?")}}
});
}
//]]>
</script>
<ul class="toolbar">
<li><a id="newshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1">New Shelf</a></li>
<!-- TMPL_IF NAME="viewshelf" --><!-- TMPL_IF name="manageshelf" --><li><a id="editshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelfnumber" -->">Edit Shelf</a></li><li id="deleteshelfc"><a id="deleteshelf" href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&amp;DEL-<!-- TMPL_VAR NAME="shelfnumber" -->=1">Delete Shelf</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
</ul></div>

View file

@ -1,6 +1,7 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --> <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; <!-- TMPL_IF NAME="viewshelf" -->Virtual Shelves &rsaquo; Contents of <!-- TMPL_VAR NAME="shelfname" --><!-- TMPL_ELSE -->Virtual Shelves<!-- /TMPL_IF --></title> <title>Koha &rsaquo; <!-- TMPL_IF NAME="viewshelf" -->Virtual Shelves &rsaquo; Contents of <!-- TMPL_VAR NAME="shelfname" --><!-- TMPL_ELSE -->Virtual Shelves<!-- /TMPL_IF --><!-- TMPL_IF NAME="shelves" --> &rsaquo; Create New Virtual Shelf<!-- /TMPL_IF --><!-- TMPL_IF NAME="edit" --> &rsaquo; Edit virtual shelf <!-- TMPL_VAR name="shelfname"--><!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" --> <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="yui-toolbars.inc" -->
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.pack.js"></script> <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.checkboxes.pack.js"></script>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
@ -59,32 +60,29 @@ function confirmDelete(s){
//]]> //]]>
</script> </script>
</head> </head>
<body> <body class="yui-skin-sam">
<!-- TMPL_INCLUDE NAME="header.inc" --> <!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="cat-search.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/catalogue/search.pl">Catalogue</a> &rsaquo; <!-- TMPL_IF NAME="viewshelf" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Virtual Shelves</a> &rsaquo; Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i><!-- TMPL_ELSE -->Virtual Shelves<!-- /TMPL_IF --></div> <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <!-- TMPL_IF NAME="viewshelf" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Virtual Shelves</a> &rsaquo; Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i><!-- TMPL_ELSE --><a href="/cgi-bin/koha/virtualshelves/shelves.pl">Virtual Shelves</a><!-- /TMPL_IF --><!-- TMPL_IF NAME="shelves" --> &rsaquo; Create New Virtual Shelf<!-- /TMPL_IF --><!-- TMPL_IF NAME="edit" --> &rsaquo; Edit virtual shelf <i><!-- TMPL_VAR name="shelfname"--></i><!-- /TMPL_IF --></div>
<div id="doc3" class="yui-t2"> <div id="doc" class="yui-t7">
<div id="bd"> <div id="bd">
<div id="yui-main"> <div id="yui-main">
<div class="yui-b"> <div class="yui-g">
<!-- TMPL_INCLUDE NAME="virtualshelves-toolbar.inc" -->
<!-- TMPL_IF NAME="viewshelf" -->
<div id="action">
<!-- TMPL_IF name="manageshelf" --><ul>
<li><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelfnumber" -->">Edit this shelf</a></li>
</ul><!-- /TMPL_IF -->
</div> </div>
<fieldset> <!-- TMPL_IF NAME="viewshelf" -->
<legend>Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i></legend> <div class="yui-g">
<!-- TMPL_IF NAME="itemsloop" -->
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed"> <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post" class="checkboxed">
<input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" /> <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR NAME="shelfnumber" -->" />
<input type="hidden" name="modifyshelfcontents" value="1" /> <input type="hidden" name="modifyshelfcontents" value="1" />
<!-- TMPL_IF NAME="itemsloop" --> <fieldset>
<legend>Contents of <i><!-- TMPL_VAR NAME="shelfname" --></i></legend>
<table> <table>
<tr> <tr>
<th class="checkall"> <th class="checkall">
@ -97,12 +95,16 @@ function confirmDelete(s){
<th>&nbsp;</th> <th>&nbsp;</th>
</tr> </tr>
<!-- TMPL_LOOP NAME="itemsloop" --> <!-- TMPL_LOOP NAME="itemsloop" -->
<tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->> <!-- TMPL_IF name="color" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_IF -->
<td> <td>
<input type="checkbox" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->" /> <input type="checkbox" name="REM-<!-- TMPL_VAR NAME="biblionumber" -->" />
</td> </td>
<td> <td>
<img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" /> <img src="<!-- TMPL_VAR NAME="themelang" -->/../img/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
</td> </td>
<td> <td>
<!-- TMPL_IF name="BiblioDefaultViewmarc" --> <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
@ -125,30 +127,24 @@ function confirmDelete(s){
<td><!-- TMPL_VAR NAME="classification" --></td> <td><!-- TMPL_VAR NAME="classification" --></td>
<td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a></td> <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a></td>
</tr> </tr>
<!-- /TMPL_LOOP --> <!-- /TMPL_LOOP --><!-- /itemsloop -->
</table> </table>
<!-- TMPL_ELSE -->
<p><b>This shelf is empty.</b></p>
<!-- TMPL_UNLESS NAME="itemsloop" -->
<input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->" />
<input type="hidden" name="shelves" value="1" />
<input type="submit" value="Delete this shelf" onclick="return confirmDelete('Are you sure you want to delete this shelf?')" />
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
<!-- TMPL_IF name="manageshelf" --> <!-- TMPL_IF name="manageshelf" -->
<!-- TMPL_IF NAME="itemsloop" --> <!-- TMPL_IF NAME="itemsloop" -->
<b>With selected items :</b> <input type="submit" value="Remove selected Items" onclick="return confirmDelete('Are you sure you want to remove these items from the shelf?')" />
<input type="submit" value="Remove" onclick="return confirmDelete('Are you sure you want to remove these items from the shelf?')" style="display:inline;" /> <!-- /TMPL_IF --><!-- /itemsloop -->
<!-- /TMPL_IF --> <!-- /TMPL_IF --><!-- /manageshelf -->
<!-- /TMPL_IF -->
</fieldset> </fieldset>
</form> </form>
<!-- /TMPL_IF --><!-- /viewshelf -->
</div>
<div class="yui-g">
<!-- TMPL_IF name="manageshelf" --> <!-- TMPL_IF name="manageshelf" -->
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post"> <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
<fieldset> <fieldset class="brief">
<legend>Add an item to this shelf by barcode</legend> <legend>Add an item to <i><!-- TMPL_VAR NAME="shelfname" --></i></legend>
<ol> <ol>
<li> <li>
<label for="addbarcode">Barcode:</label> <label for="addbarcode">Barcode:</label>
@ -161,9 +157,13 @@ function confirmDelete(s){
</ol> </ol>
</fieldset> </fieldset>
</form> </form>
</div>
<!-- /TMPL_IF --> <!-- /TMPL_IF -->
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
<!-- TMPL_IF NAME="shelves" --> <!-- TMPL_IF NAME="shelves" -->
<div class="yui-ge">
<div class="yui-u first">
<!-- TMPL_IF NAME="already" --><p class="error">A virtual shelf with that name already exists!</p><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="status1" --> <!-- TMPL_IF NAME="status1" -->
<p class="error"><!-- TMPL_VAR NAME="string1" --></p> <p class="error"><!-- TMPL_VAR NAME="string1" --></p>
<!-- /TMPL_IF --> <!-- /TMPL_IF -->
@ -173,63 +173,44 @@ function confirmDelete(s){
<!-- /TMPL_IF --> <!-- /TMPL_IF -->
<!-- /TMPL_LOOP --> <!-- /TMPL_LOOP -->
<form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl"> <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
<input type="hidden" name="shelves" value="1"> <input type="hidden" name="shelves" value="1" />
<h3>Create a new virtual shelf</h3> <fieldset class="rows">
<table> <legend>Create a new virtual shelf</legend>
<tr><th scope="row"><label for="addshelf">Shelf name:</label> </th><td> <input id="addshelf" type="text" name="addshelf" size="25"></td></tr> <ol>
<tr><th scope="row"><label for="owner">Owner:</label> </th><td><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->"><!-- TMPL_VAR name="loggedinusername" --></td></tr> <li><label for="addshelf">Shelf name: </label> <input id="addshelf" type="text" name="addshelf" size="25" /></li>
<tr><th scope="row"><label for="category">Category:</label> </th><td><select name="category" id="category"> <li><span class="label">Owner: </span><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->" /><!-- TMPL_VAR name="loggedinusername" --></li>
<li><label for="category">Category: </label><select name="category" id="category">
<option value="1">Private</option> <option value="1">Private</option>
<option value="2">Public</option> <option value="2">Public</option>
<option value="3">Free</option> <option value="3">Free</option></select></li></ol></fieldset>
</select></td></tr></table>
<ul> <p><input type="submit" value="Save" /></p>
</form>
</div>
<div class="yui-u">
<div class="help"><ul>
<li>A <b>private</b> virtual shelf is managed by you and can be seen only by you.</li> <li>A <b>private</b> virtual shelf is managed by you and can be seen only by you.</li>
<li> A <b>public</b> virtual shelf can be seen by everybody, but managed only by you.</li> <li> A <b>public</b> virtual shelf can be seen by everybody, but managed only by you.</li>
<li> An <b>open</b> virtual shelf can be seen and managed by everybody.</li> <li> An <b>open</b> virtual shelf can be seen and managed by everybody.</li>
</ul> </ul></div>
<p><input type="submit" value="Add a new shelf"></p> </div>
</form> </div>
<!-- TMPL_IF NAME="numberCanManage" -->
<!-- TMPL_IF NAME="shelvesloop" -->
<form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" name="mainform">
<input type="hidden" name="shelves" value="1" />
<h3>Delete virtual shelves</h3>
<table>
<tr><th>&nbsp;</th><th>Shelf name</th><th>Contents</th></tr>
<!-- TMPL_LOOP NAME="shelvesloop" -->
<!-- TMPL_IF name="canmanage" -->
<tr>
<td>
<input type="checkbox" name="DEL-<!-- TMPL_VAR NAME="shelf" -->" />
</td>
<td>
<a href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=<!-- TMPL_VAR NAME="shelf" -->"><!-- TMPL_VAR NAME="shelfname" --></a>
</td>
<td>
<!-- TMPL_VAR NAME="shelfvirtualcount" --> item(s)
</td>
</tr>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</table>
<input type="submit" value="Delete shelves" /></form>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<p><form class="inline" action="/cgi-bin/koha/virtualshelves/shelves.pl" method="get"><input type="submit" value="Back to virtual shelves" /></form></p>
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
<!-- TMPL_IF name="edit" --> <!-- TMPL_IF name="edit" -->
<form method="post"> <div class="yui-ge">
<input type="hidden" name="op" value="modifsave"> <div class="yui-u first">
<input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->"> <!-- TMPL_IF NAME="already" --><p class="error">A virtual shelf with that name already exists!</p><!-- /TMPL_IF -->
<h3>Edit virtual shelf '<!-- TMPL_VAR name="shelfname"-->'</h3> <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl">
<table> <input type="hidden" name="op" value="modifsave" />
<tr><td><label for="shelfname">Shelf name: </label></td><td><input type="text" id="shelfname" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></td></tr> <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->" />
<tr><td><label for="owner">Owner: </label></td><td><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></td></tr> <fieldset class="rows"><legend>Edit virtual shelf <i><!-- TMPL_VAR name="shelfname"--></i></legend>
<tr><td><label for="category">Category: </label></td><td><select id="category" name="category"> <ol>
<li><label for="shelfname">Shelf name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></li>
<li><label for="owner">Owner: </label><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->" /><!-- TMPL_VAR NAME="loggedinusername" --></li>
<li><label for="category">Category: </label><select id="category" name="category">
<!-- TMPL_IF name="category1" --> <!-- TMPL_IF name="category1" -->
<option value="1" selected="selected">Private</option> <option value="1" selected="selected">Private</option>
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
@ -240,21 +221,25 @@ function confirmDelete(s){
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
<option value="2">Public</option> <option value="2">Public</option>
<!-- TMPL_IF NAME="category3" --> <!-- TMPL_IF NAME="category3" -->
<option value="3" selected="selected">Free</option> <option value="3" selected="selected">Open</option>
<!-- TMPL_ELSE --> <!-- TMPL_ELSE -->
<option value="3">Free</option> <option value="3">Open</option>
<!-- /TMPL_IF --> <!-- /TMPL_IF -->
</select></td></tr> </select></li>
</table> </ol></fieldset>
<p><input type="submit" value="Save changes" /></p>
</form>
</div>
<div class="yui-u">
<ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen <strong>only</strong> by you.</li> <ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen <strong>only</strong> by you.</li>
<li> A <strong>public</strong> virtual shelf can be seen by <strong>everybody</strong>, but managed only by you.</li> <li> A <strong>public</strong> virtual shelf can be seen by <strong>everybody</strong>, but managed only by you.</li>
<li> A <b>free</b> virtual shelf can be seen and managed by everybody.</li> <li> A <b>free</b> virtual shelf can be seen and managed by everybody.</li>
</ul> </ul></div>
<p><input type="submit" value="Save changes"></p> </div>
</form> <!-- /TMPL_IF --><!-- TMPL_ELSE -->
<!-- /TMPL_IF --> <!-- TMPL_IF NAME="shelvesloop" -->
<!-- /TMPL_IF -->
<h3>Virtual shelves</h3> <h3>Virtual shelves</h3>
<table> <table>
@ -266,20 +251,18 @@ function confirmDelete(s){
<td> <td>
<!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF --> <!-- TMPL_IF NAME="viewcategory1" -->Private<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF --> <!-- TMPL_IF NAME="viewcategory2" -->Public<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="viewcategory3" -->Free<!-- /TMPL_IF --> <!-- TMPL_IF NAME="viewcategory3" -->Open<!-- /TMPL_IF -->
</td> </td>
<td><!-- TMPL_VAR NAME="shelfvirtualcount" --> </td> <td><!-- TMPL_VAR NAME="shelfvirtualcount" --> </td>
<td><!-- TMPL_IF name="mine" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Edit</a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr> <td><!-- TMPL_IF name="mine" --><a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Edit</a> <a href="/cgi-bin/koha/virtualshelves/shelves.pl?shelves=1&amp;DEL-<!-- TMPL_VAR NAME="shelf" -->=1" onclick="return confirmDelete('Are you sure you want to remove this virtual shelf?')">Delete</a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
<!-- /TMPL_LOOP --> <!-- /TMPL_LOOP -->
</table> </table>
<p><form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or remove virtual shelves" /></form></p> <!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- /TMPL_IF --> <!-- /TMPL_IF -->
</div> </div>
</div> </div>
<div class="yui-b">
<!-- TMPL_INCLUDE NAME="cat-menu.inc" -->
</div>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" --> <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->