[open-ils-commits] r448 - in servres/trunk/conifer/templates: . components generic item phys (gfawcett)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun May 3 22:20:00 EDT 2009


Author: gfawcett
Date: 2009-05-03 22:19:58 -0400 (Sun, 03 May 2009)
New Revision: 448

Modified:
   servres/trunk/conifer/templates/components/course.xhtml
   servres/trunk/conifer/templates/course_invitation.xhtml
   servres/trunk/conifer/templates/course_join.xhtml
   servres/trunk/conifer/templates/edit_course.xhtml
   servres/trunk/conifer/templates/generic/delete.xhtml
   servres/trunk/conifer/templates/generic/edit.xhtml
   servres/trunk/conifer/templates/item/item_add_cat_search.xhtml
   servres/trunk/conifer/templates/item/item_add_elec.xhtml
   servres/trunk/conifer/templates/item/item_add_heading.xhtml
   servres/trunk/conifer/templates/item/item_add_url.xhtml
   servres/trunk/conifer/templates/item/item_delete_confirm.xhtml
   servres/trunk/conifer/templates/item/item_relocate.xhtml
   servres/trunk/conifer/templates/master.xhtml
   servres/trunk/conifer/templates/phys/checkout.xhtml
   servres/trunk/conifer/templates/phys/mark_arrived.xhtml
Log:
add more 'go back/cancel' links; put consistent wording on them all

Beta testers noted that there were many places where a Go-back or
Cancel link was desirable. I've tried to add one in all the obvious
places.


Modified: servres/trunk/conifer/templates/components/course.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/course.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/components/course.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -120,5 +120,6 @@
     <div py:def="offer_to_delete(item)" class="little_action_panel" py:if="item.id">
       <a href="../delete/">Delete this item</a>
     </div>
+
 </html>
 

Modified: servres/trunk/conifer/templates/course_invitation.xhtml
===================================================================
--- servres/trunk/conifer/templates/course_invitation.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/course_invitation.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -25,7 +25,7 @@
   <table class="metadata_table">
     <tr><th>Invitation Code:</th><td><input type="text" id="code" name="code" size="30" value="${code}"/></td></tr>
   </table>
-<p><input type="submit" value="Continue"/> <a style="margin-left: 12px;" href="../">or go back</a></p>
+<p><input type="submit" value="Continue"/> ${go_back_link()}</p>
   </form>
   <div class="gap"/>
 </body>

Modified: servres/trunk/conifer/templates/course_join.xhtml
===================================================================
--- servres/trunk/conifer/templates/course_join.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/course_join.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -17,7 +17,7 @@
     <p>If you choose to join this course, it will be added to your "My
     Courses" list.</p>
     <form action="." method="POST">
-      <p><input type="submit" value="Yes, join this course"/> <a style="margin-left: 12px;" href="../">or go back</a></p>
+      <p><input type="submit" value="Yes, join this course"/> ${go_back_link()}</p>
     </form>    
 
   </body>

Modified: servres/trunk/conifer/templates/edit_course.xhtml
===================================================================
--- servres/trunk/conifer/templates/edit_course.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/edit_course.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -36,7 +36,7 @@
     ${field_row(form.department)}
     <!-- <tr><th>Department</th><td>${Markup(form.department)} ${errorlist(form.department)}</td></tr> -->
   </table>
-  <p><input type="submit" value="Continue"/></p>
+  <p><input type="submit" value="Continue"/> ${go_back_link()}</p>
   </form>
   <div class="gap"/>
   <div py:if="instance.id">
@@ -45,7 +45,7 @@
       <p><input type="checkbox" name="confirm_delete" id="confirm_delete"/>
       <label for="confirm_delete">Yes, I want to delete this course site and all of its contents.</label>
       </p>
-      <p><input type="submit" value="Delete this course"/></p>
+      <p><input type="submit" value="Delete this course"/> ${go_back_link()}</p>
     </form>
   </div>
 </body>

Modified: servres/trunk/conifer/templates/generic/delete.xhtml
===================================================================
--- servres/trunk/conifer/templates/generic/delete.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/generic/delete.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -17,8 +17,7 @@
       <td>${instance}</td>
     </tr>
   </table>
-  <p><input type="submit" value="Delete"/></p>
-  <p><a href="../">Cancel</a></p>
+  <p><input type="submit" value="Delete"/>${go_back_link('../')}</p>
   </form>
 </body>
 </html>

Modified: servres/trunk/conifer/templates/generic/edit.xhtml
===================================================================
--- servres/trunk/conifer/templates/generic/edit.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/generic/edit.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -15,9 +15,8 @@
   <h1>${title}</h1>
   <form action="." method="POST">
   <table class="metadata_table">${Markup(form.as_table())}</table>
-  <p><input type="submit" value="Save changes"/></p>
-  <p><a href="../">Cancel changes</a></p>
-  <p><a href="delete">Delete this record</a></p>
+  <p><input type="submit" value="Save changes"/> ${go_back_link()}</p>
+  <p py:if="instance is not None"><a href="delete">Delete this record</a></p>
   </form>
 </body>
 </html>

Modified: servres/trunk/conifer/templates/item/item_add_cat_search.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_add_cat_search.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_add_cat_search.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -26,8 +26,10 @@
     <h2>${title}</h2>
     <form method="POST" action=".">
       <input type="text" id="query" name="query" value="${query}" 
-	     style="font-size: larger; width: 600;"/>
+	     style="font-size: larger; width: 600px;"/>
       <input type="submit" value="Search"/>
+	${go_back_link()}
+
     </form>
 
     <table class="pagetable" py:if="request.method == 'POST'">

Modified: servres/trunk/conifer/templates/item/item_add_elec.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_add_elec.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_add_elec.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -30,7 +30,9 @@
 	  <tr><th>File</th><td><input type="file" name="file"/></td></tr>
 	</table>
 	${item_metadata_formset()}
-	<p><input type="submit" value="Upload file and Create item"/></p>
+	<p><input type="submit" value="Upload file and Create item"/>
+	${go_back_link()}
+	</p>
       </form>
     </div>
 

Modified: servres/trunk/conifer/templates/item/item_add_heading.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_add_heading.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_add_heading.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -31,6 +31,7 @@
       <p>
 	<input py:if="not is_edit" type="submit" value="Add heading"/>
 	<input py:if="is_edit" type="submit" value="Update heading"/>
+	${go_back_link()}
       </p>
 
     </form>

Modified: servres/trunk/conifer/templates/item/item_add_url.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_add_url.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_add_url.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -29,6 +29,7 @@
       <p>
 	<input py:if="not is_edit" type="submit" value="Add URL"/>
 	<input py:if="is_edit" type="submit" value="Update URL"/>
+	${go_back_link('../meta')}
       </p>
     </form>
 </body>

Modified: servres/trunk/conifer/templates/item/item_delete_confirm.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_delete_confirm.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_delete_confirm.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -33,7 +33,7 @@
     <p>
     <form action="." method="POST">
       <input type="submit" name="yes" value="Yes, delete it" style="padding: 4 12; margin-right: 24;"/>
-      <input type="submit" name="no" value="Cancel"/>
+      ${go_back_link()}
     </form>
     </p>
   </body>

Modified: servres/trunk/conifer/templates/item/item_relocate.xhtml
===================================================================
--- servres/trunk/conifer/templates/item/item_relocate.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/item/item_relocate.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -30,7 +30,9 @@
 	  </tr>
 	  <tr>
 	    <th/>
-	    <td><input type="submit" value="Move item"/></td>
+	    <td><input type="submit" value="Move item"/>    
+	    ${go_back_link()}
+	    </td>
 	  </tr>
 	</tbody>
       </table>

Modified: servres/trunk/conifer/templates/master.xhtml
===================================================================
--- servres/trunk/conifer/templates/master.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/master.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -65,4 +65,9 @@
       </div>
     </body>
   </py:match>
+
+  <span py:def="go_back_link(url=None, msg=_('or Cancel'))" py:with="url=url or request.META.get('HTTP_REFERER', '../')">
+    <a style="margin-left: 12px;" href="${url}">${msg}</a>
+  </span>
+
 </html>

Modified: servres/trunk/conifer/templates/phys/checkout.xhtml
===================================================================
--- servres/trunk/conifer/templates/phys/checkout.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/phys/checkout.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -60,7 +60,7 @@
       </tr>
       <tr>
 	<th/>
-	<td><input type="submit" value="${step==3 and _('Check out another item') or _('Continue')}"/></td>
+	<td><input type="submit" value="${step==3 and _('Check out another item') or _('Continue')}"/> ${go_back_link()}</td>
       </tr>
       <tr py:if="step==3">
 	<th/>

Modified: servres/trunk/conifer/templates/phys/mark_arrived.xhtml
===================================================================
--- servres/trunk/conifer/templates/phys/mark_arrived.xhtml	2009-05-04 01:33:07 UTC (rev 447)
+++ servres/trunk/conifer/templates/phys/mark_arrived.xhtml	2009-05-04 02:19:58 UTC (rev 448)
@@ -28,7 +28,7 @@
       </tr>
       <tr>
 	<th/>
-	<td><input type="submit" value="${False and _('Check out another item') or _('Continue')}"/></td>
+	<td><input type="submit" value="${False and _('Check out another item') or _('Continue')}"/> ${go_back_link()}</td>
       </tr>
     </table>
   </div>



More information about the open-ils-commits mailing list