[open-ils-commits] r122 - in servres/trunk/conifer: static static/tango static/tango/big syrup templates templates/components (gfawcett)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Feb 14 17:21:55 EST 2009


Author: gfawcett
Date: 2009-02-14 17:24:17 -0500 (Sat, 14 Feb 2009)
New Revision: 122

Added:
   servres/trunk/conifer/static/menublocks.js
   servres/trunk/conifer/static/tango/big/
   servres/trunk/conifer/static/tango/big/folder.png
   servres/trunk/conifer/static/tango/document.png
   servres/trunk/conifer/static/tango/folder.png
Modified:
   servres/trunk/conifer/static/main.css
   servres/trunk/conifer/syrup/views.py
   servres/trunk/conifer/templates/components/item.xhtml
   servres/trunk/conifer/templates/course_detail.xhtml
   servres/trunk/conifer/templates/item_add_elec.xhtml
   servres/trunk/conifer/templates/item_add_heading.xhtml
   servres/trunk/conifer/templates/item_add_url.xhtml
   servres/trunk/conifer/templates/item_heading_detail.xhtml
   servres/trunk/conifer/templates/item_metadata.xhtml
   servres/trunk/conifer/templates/master.xhtml
Log:
mostly navigation and appearance changes.

- no longer showing an expanded tree of all course items; it's
  overwhelming in full sites. Only show first level elements;

- cleaned up the in-course breadcrumbs a bit;

- fixed page width to a 960px layout;

- put course-name and department information in a coloured band to
  separate from the course content.

- etc.


Modified: servres/trunk/conifer/static/main.css
===================================================================
--- servres/trunk/conifer/static/main.css	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/static/main.css	2009-02-14 22:24:17 UTC (rev 122)
@@ -4,11 +4,20 @@
 pre, code { font-family: monospace; }
 
 body, html { margin: 0; padding: 0; }
+
 body {  
+    background-color: #005; 
+    font-size: normal; 
+}
+
+div#outer {
     background-color: white; 
-    font-size: normal;
+    width: 960; margin-bottom: 50;
+    margin-left: auto; margin-right: auto;
 }
-#mainpanel {  background-color: white; padding: 0 12 24 12; }
+#mainpanel {  background-color: white; padding: 0 12 24 12; 
+min-height: 300; 
+}
 
 /* General headers and footers */
 
@@ -33,10 +42,11 @@
 #header a:hover { background-color: #fb7; color: black; text-decoration: none; }
 
 #footer {  
-    margin-top: 12;
+    margin: 12;
     padding-bottom: 12;
     background-color: #ddf; 
     color: black;
+    border-bottom: white 10px solid;
 }
 
 h1 { font-size: 150%;  }
@@ -88,14 +98,14 @@
 /* item trees (tree of headings and items in a course */
 
 .itemtree { 
-    margin-left: 30; 
+padding-left: 25;
     list-style-type: none; 
     list-style-position: inside;
 }
 
 .itemtree .itemtree { margin-left: 0;}
 
-.itemtree li { width: 400; }
+/* .itemtree li { width: 400; } */
 
 .itemtree .metalink { padding-left: 8; color: gray; }
 .itemtree .metalink a {
@@ -103,27 +113,29 @@
 }
 
 .itemtree .editlinks   { padding-left: 12; color: gray; 
-                         position: absolute; left: 0; 
 			 font-size: small;
 		     }
 .itemtree .editlinks a { color: navy; }
 
 .itemadd { 
-    margin-left: 30; /* should match .itemtree{margin-left} */
-    margin-top: 30; 
+    margin-top: 30; font-size: smaller;
+    padding: 10; background-color: #eef; 
 }
+.itemadd a { color: navy; }
 
+
 /* specialized display of items in tree, by type */
 
 .itemtree li.item_HEADING { 
+    list-style-image: url(tango/folder.png);
     margin-top: 4;
 }
 .itemtree li.item_HEADING > a { 
-    font-weight: bold; color: navy; 
+    color: navy; 
 }
 
 .itemtree li.item_ELEC { 
-    list-style-image: url(tango/view_detailed.png);
+    list-style-image: url(tango/document.png);
     margin-top: 4;
 }
 
@@ -168,3 +180,12 @@
 .newsitem { 
     max-width: 600;
 }
+
+.menublockopener { color: gray !important; font-weight: normal !important; }
+.menublock { background-color: #f0f0e0; font-size: 95%; padding: 1 4; }
+
+#coursebanner { background-color: #f2e4cc; margin: -12 -12 0 -12; padding: 8; }
+
+#coursebanner h1 { padding: 0; font-size: 110%; }
+
+.breadcrumbs { margin: 8 8 8 0; }

Added: servres/trunk/conifer/static/menublocks.js
===================================================================
--- servres/trunk/conifer/static/menublocks.js	                        (rev 0)
+++ servres/trunk/conifer/static/menublocks.js	2009-02-14 22:24:17 UTC (rev 122)
@@ -0,0 +1,20 @@
+function init_blocks() {
+    $('span.menublock').each(make_opener);
+}
+
+var blocknum = 0;
+function make_opener() {
+    var menublock = $(this);
+    var blockid = 'menublock' + (blocknum++);
+    menublock.attr('id', blockid);
+    var opener = '<a class="menublockopener" onmouseover="openblock(\'' + blockid + '\');" href="javascript:openblock(\'' + blockid + '\');">&raquo;</a>';
+    menublock.before(opener);
+    menublock.hide();
+}
+
+function openblock(bid) {
+    $('span.menublock').hide();
+    $('#' + bid).fadeIn('fast');
+}
+
+$(init_blocks);
\ No newline at end of file

Added: servres/trunk/conifer/static/tango/big/folder.png
===================================================================
--- servres/trunk/conifer/static/tango/big/folder.png	                        (rev 0)
+++ servres/trunk/conifer/static/tango/big/folder.png	2009-02-14 22:24:17 UTC (rev 122)
@@ -0,0 +1,13 @@
+‰PNG
+
+   
+IHDR           szzô   sBIT|dˆ  ®IDATX…í–¿oEÇ?³³{{¿1’+h\QQF‚))¨€6(BÔ‘(ÓàÿÀm”¿%É¢AP¥  Ò cr¿bßùööngæ=Šó^|^c_r–hò•ž47;;ßϼ73{ðVÿ³LÙxôèÑSïý½M^²Ö>MÓôÓýý}Ù .Þû{÷ïß'Ë2D!„€ˆ ª« xöìÙGƒÁà.ðôÖ ¢(Z¥ÇÇLjÞûH%D«ÕjŠÈ·
+བྷ²,#„P‰@D0ÆXc̃‡~c̲ŠevJ•¿­µ¾»@Uç½^¯Ñëõ!¬2Pš_ h6›­ÝÝ]:%DEcˆã˜8ŽQU 7xï¥ÝnÓívñÞ㽯d Œr…Y–1›ÍÖÌ­µ«8Ÿ7ݨ"’‡Cúýþ*—ÍC•
+yÑ<Š¢UXk1Æàœ‹¯t¾"¾ÙlÒívù}ñÓQûº÷6—ý ¹óíݵ
+bŒ9ýåɗﮨêl41èîðù'wøøÃ÷·ö¢”É2T”ý'?ÖËç+ çœOÓ”N§C˜6i5jüùÏ”§ùV 62”÷]½fÙÛ­EѸ ªÙx<f82·iÖ
+¿õEG–)pÞ0ÍsR>VCðÖÚå)05Zõ'Û”*“Ï=&2ƒ« ¦“É„““æÎÐH
+w; …N¨ÅùÂÐ^À9WXkét:8h¤1.l 
+·4HbÃlîÀËq9æâ8˲Œ³iì‘Äæ¼~ofìE)œ î‹š˜æEèß ç\¡ª¤­whiÂÙÜßh¢ÊÊ@—‹@¼z»1†iV(Ã
+@a’ç9ãÂÓnÆd T—»YT	¢kgûu$ªŒ³Ü«Ñ—€¢(æ"B\ï’¦5f‹€ŠJ›c]A”ñ´ÐHéW Dd’ç9§QAÔ2¼œäE¸ÛWrAÈæΤZjÈÂÖÛi°	y–«¾´ôM2ñ_å™ÂbîjŒ* ª:qΙ³…P,Ù<àü«™®5ÖëÆ,{
+0É=NBí×Ç_½„¯+ FDI»Ԑ;Y}rµ:ߥs¹³2D
+Œ&,ff5ËÚÇhQøh´¨ó^œ¬.Í´Ù==9CÕ?v€Ó5€~¿ÿ³ì}–8óü¿^Ã|s•Ñ‹ß~ø~­ïB»ìžÓ5€kÿJ½¦ @ô!çi»\<snÜ ’[p@ÜîÙ~«mõ/,¹Dݶõ    IEND®B`‚
\ No newline at end of file

Added: servres/trunk/conifer/static/tango/document.png
===================================================================
--- servres/trunk/conifer/static/tango/document.png	                        (rev 0)
+++ servres/trunk/conifer/static/tango/document.png	2009-02-14 22:24:17 UTC (rev 122)
@@ -0,0 +1,7 @@
+‰PNG
+
+   
+IHDR         óÿa   bKGD ÿ ÿ ÿ ½§“   	pHYs     šœ   tIMEÕ
+)¶T  IDAT8Ë­‘±JÄ@†¿Ir('["&xØÙYZ	‚Xø0‚!i|†_@±Ô÷•t§ÓDÄæÏ]¹#¹Äxÿjv˜ùç›Y–ÐN‡ažE‘i«(ŠÌÄÉ™yž£µ@D¦£&±ˆ`Û6®ë–P¦Zk’$)5%"ôz½Ê.NñA#Aœba‘`Vsø¾_3ñc°,«™ àä2m¼Ýñþjó
+ [kŸìlv¹y|!IÕ´ðþyô;ÀðvÈé "Œß®°—a©?ŸAúðÄ7Œ`ô˜ñÇc^énôk?¸²Bg}»TЙ¹D#ÁÑÞ
+"R¹D1÷£çyüEŽRê*ŽãÝ6MJ©3þK_U«t8F~Ç    IEND®B`‚
\ No newline at end of file

Added: servres/trunk/conifer/static/tango/folder.png
===================================================================
--- servres/trunk/conifer/static/tango/folder.png	                        (rev 0)
+++ servres/trunk/conifer/static/tango/folder.png	2009-02-14 22:24:17 UTC (rev 122)
@@ -0,0 +1,11 @@
+‰PNG
+
+   
+IHDR         óÿa   bKGD      ùC»   	pHYs  
+×  
+×B(›x   tIMEÕ
+9
+ùÝpP  IDAT8Ë¥‘MˆRQ†Ÿc*þ@¦‹ZA´‚™ šå,ãb´©ˆ ˆþ˜Ýlf¶³¢]P3Î*D¤eIP¶lF›ˆ"(±{GÏýfqí
+âÍ—œÃ÷¼/ïQ—.—¶ŠÅâ6S2ÆçÀÜÚÛÝB„ԝ{·åúÕ3µöx¶÷”^¯w¥Z©=”œ‹´>µ¢LxÛx3}õ¨Z©= ˆ¤ÓŽäò‘ çB)pS
+¥µÕû@ 0Æày.¯?öiv2Ì¥Ãgn:RHéÏa‚f'Ããu´±s1RÉCÜ}X?ð<€Ÿ¿5_Úçœ8š ¦µ&ž3úÅ\×
+üà_KM`­e‡¿ˆù "(¥DÀÁZah}ÌHŒ,C+ä²É	Àó\Žçtû†]Dá#Œ‘1Y™ ~uÚœ>{Ž_ÿŒ—wð"aª•“ê/_‘×ßËêüµ†›8¶¶hyÙá·÷ïÊ›«,«‡´Ê§°âø    IEND®B`‚
\ No newline at end of file

Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/syrup/views.py	2009-02-14 22:24:17 UTC (rev 122)
@@ -240,7 +240,7 @@
                     last_modified=datetime.now(),
                     url = url)
                 item.save()
-                return HttpResponseRedirect(item_url(item) + 'meta/')
+                return HttpResponseRedirect(item_url(item, 'meta/'))
         elif item_type == 'ELEC':
             title = request.POST.get('title', '').strip()
             upload = request.FILES.get('file')
@@ -257,7 +257,7 @@
             item.fileobj.save(upload.name, upload)
             item.save()
 
-            return HttpResponseRedirect(item_url(item) + 'meta/')
+            return HttpResponseRedirect(item_url(item, 'meta/'))
         else:
             raise NotImplementedError
 

Modified: servres/trunk/conifer/templates/components/item.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/item.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/components/item.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -7,32 +7,31 @@
   <ul py:def="show_tree(tree, edit=False)" py:if="tree" class="itemtree">
     <li py:for="item, subs in tree" class="item_${item.item_type}">
       <a href="${item_url(item)}">${item}</a> 
-      <span py:if="item.needs_meta_link()" class="metalink">
-	[<a href="${item_url(item, 'meta/')}">about</a>]
+      <span py:if="item.needs_meta_link()" class="menublock">
+	<a href="${item_url(item, 'meta/')}">about</a>
       </span>
-      <span class="editlinks" py:if="edit">
-	[<a href="${item_url(item, 'edit/')}">edit</a>]
-      </span>
-      ${show_tree(subs, edit)}
+      <!-- ${show_tree(subs, edit)} -->
     </li>
   </ul>
 
   <div py:def="nested_title(item)"
        py:with="hier=item.hierarchy()[:-1]; lastnum=len(hier)"
        class="nestedtitle">
-    <span><a href="${course_url(item.course)}">Top</a></span> &raquo; 
+    <div class="breadcrumbs">
+    <span><a href="${course_url(item.course)}">Top</a></span> &raquo;
     <span py:for="n, x in enumerate(hier)"><a href="${item_url(x)}">${x.title}</a> &raquo; </span>
-    <h2>${item.title}</h2>
+<b>${item.title}</b>
+    </div>
   </div>
 
-  <ul py:def="add_subs(parent=None)" class="itemadd">
-    <li>Add a new item...</li>
+  <div py:def="add_subs(parent=None)" class="itemadd">
+    <div>Add a new item:</div>
     <ul py:with="prefix = (not parent) and 'item/0/' or ''">
-      <li><a href="${prefix}add?item_type=HEADING">Add subheading</a></li>
-      <li><a href="${prefix}add?item_type=URL">Add URL</a></li>
-      <li><a href="${prefix}add?item_type=ELEC">Add Electronic Document</a></li>
-      <li><a href="${prefix}add?item_type=PHYS">Add Physical Book/Document</a></li>
+      <li><a href="${prefix}add/?item_type=HEADING">Subheading</a></li>
+      <li><a href="${prefix}add/?item_type=URL">URL</a></li>
+      <li><a href="${prefix}add/?item_type=ELEC">Electronic Document</a></li>
+      <li><a href="${prefix}add/?item_type=PHYS">Physical Book/Document</a></li>
     </ul>
-  </ul>
+  </div>
   
 </html>

Modified: servres/trunk/conifer/templates/course_detail.xhtml
===================================================================
--- servres/trunk/conifer/templates/course_detail.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/course_detail.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -10,10 +10,13 @@
   <xi:include href="components/item.xhtml"/>
   <head>
     <title>${title}</title>
+    <script type="text/javascript" src="/static/menublocks.js"/>
   </head>
   <body>
-    <p class="deptident">${course.department}</p>
+    <div id="coursebanner">
+    <div class="deptident">${course.department}</div>
     <h1>${title}</h1>
+    </div>
     <p py:if="not item_tree">
       There are no items associated with this course yet.
     </p>

Modified: servres/trunk/conifer/templates/item_add_elec.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_add_elec.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/item_add_elec.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -11,11 +11,12 @@
     <title>${title}</title>
   </head>
   <body>
-    <div class="courseident">
+    <div id="coursebanner">
       <div>${course.department}</div>
       <h1><a href="${course_url(course)}">${course_title}</a></h1>
+    </div>
       <div py:if="parent_item">${nested_title(parent_item)}</div>
-      <h2>${title}</h2>
+      <h3>${title}</h3>
       <form action=".?item_type=${item_type}" method="POST"
 	    enctype="multipart/form-data">
 	<table>
@@ -24,6 +25,5 @@
 	</table>
 	<p><input type="submit" value="Upload file and Create item"/></p>
       </form>
-    </div>
 </body>
 </html>

Modified: servres/trunk/conifer/templates/item_add_heading.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_add_heading.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/item_add_heading.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -12,10 +12,12 @@
   </head>
   <body>
     <div class="courseident">
+    <div id="coursebanner">
       <div>${course.department}</div>
       <h1><a href="${course_url(course)}">${course_title}</a></h1>
+    </div>
       <div py:if="parent_item">${nested_title(parent_item)}</div>
-      <h2>${title}</h2>
+      <h3>${title}</h3>
       <form action=".?item_type=${item_type}" method="POST">
 	<table>
 	  <tr><th>Heading</th><td><input type="text" name="title"/></td></tr>

Modified: servres/trunk/conifer/templates/item_add_url.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_add_url.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/item_add_url.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -12,10 +12,12 @@
   </head>
   <body>
     <div class="courseident">
+    <div id="coursebanner">
       <div>${course.department}</div>
       <h1><a href="${course_url(course)}">${course_title}</a></h1>
+    </div>
       <div py:if="parent_item">${nested_title(parent_item)}</div>
-      <h2>${title}</h2>
+      <h3>${title}</h3>
       <form action=".?item_type=${item_type}" method="POST">
 	<table>
 	  <tr><th>Title</th><td><input type="text" name="title"/></td></tr>

Modified: servres/trunk/conifer/templates/item_heading_detail.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_heading_detail.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/item_heading_detail.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -12,12 +12,15 @@
   <xi:include href="components/item.xhtml"/>
   <head>
     <title>${title}</title>
+    <script type="text/javascript" src="/static/menublocks.js"/>
   </head>
   <body>
+    <div id="coursebanner">
     <div class="courseident">
       <div>${course.department}</div>
       <h1><a href="${course_url(course)}">${course_title}</a></h1>
     </div>
+    </div>
     ${nested_title(item)}
     <!-- <p py:if="not item_tree"> -->
     <!--   There are no items associated in this subheading. -->

Modified: servres/trunk/conifer/templates/item_metadata.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_metadata.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/item_metadata.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -12,10 +12,12 @@
     <title>${title}</title>
   </head>
   <body>
+    <div id="coursebanner">
     <div class="courseident">
       <div>${course.department}</div>
       <h1><a href="${course_url(course)}">${course_title}</a></h1>
     </div>
+    </div>
     ${nested_title(item)}
 
     <table>

Modified: servres/trunk/conifer/templates/master.xhtml
===================================================================
--- servres/trunk/conifer/templates/master.xhtml	2009-01-27 02:28:30 UTC (rev 121)
+++ servres/trunk/conifer/templates/master.xhtml	2009-02-14 22:24:17 UTC (rev 122)
@@ -17,6 +17,7 @@
   </py:match>
   <py:match path="body" once="true">
     <body py:attrs="select('@*')">
+      <div id="outer">
       <div id="brandheader">
 	<div style="float: right; font-size: x-large; padding: 12; color: #888;">
 	  ${app_name}
@@ -67,6 +68,7 @@
     Syrup is a subproject of <a href="http://conifer.mcmaster.ca/">Project Conifer</a> &copy; 2009
     </div>
       </div>
+      </div>
     </body>
   </py:match>
 </html>



More information about the open-ils-commits mailing list