[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 + '\');">»</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_rhò47;;ßϼ73{ðVÿ³LÙxôèÑSïý½M^²Ö>MÓôÓýý}Ù .Þû{÷ïß'Ë2D! ª« xöìÙGÁà.ðôÖ ¢(Z¥ÇÇÇÞûH%D«ÕjÈ·
+ི,#P@D0ÆXcÌ~c̲evJ¿µ¾»@Uç½^¯Ñëõ!¬2P_ h6ÝÝ]:%DEcã8QU 7xï¥ÝnÓívñÞ㽯d r
Y1ÍÖ̵«87ݨ"Cúýþ*ÍC
+yÑ<¢UXk1Æà¯t¾"¾ÙlÒívù}ñÓQûº÷6ý ¹óíݵ
+b9ýåÉﮨêl41èîðù'wøøÃ÷·ö¢É2Tý'?ÖËç+ çOÓN§C6i5jüùϧùV 62÷]½fÙÛEѸ ªÙx<f82·iÖ
+¿õEG)pÞ0ÍsR>VCðÖÚå)05Zõ'Û*Ï=&2« ¦ÉæÎÐH
+w;
N¨ÅùÂÐ^À9WXkét:8h¤1.l
+·4HbÃlîÀËq9æâ8˲³iìÄæ¼~ofìE) îæEèß ç\¡ª¤whiÂÙÜßh¢ÊÊ@@¼z»1iV(Ã
+@aç9ãÂÓnÆd T»YT ¢kgûu$ª³Ü«Ñ¢(æ"B\ï¦5fJÂc]Añ´ÐHéW Ddç9§QAÔ2¼äE¸ÛWrAÈæΤZï½ÈÂÖÛi° y«¾´ôM2ñ_åÂbîj* ª:qγ
P,Ù<àü«®5ÖëÆ,{
+0É=NBí×Ç_½¯+ FDI»Ô;Y}rµ:ߥs¹³2D
+&,ff5ËÚÇhQøh´¨ó^¬.Í´Ù==9CÕ?vÓ5~¿ÿ³ì}8óü¿^Ã|sÑß~ø~ïB»ìÓ5kÿ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ÐNaEi«(ÌÄÉy£µ@D¦£&±`Û6®ëP¦Zk$)5%"ôz½Ê.NñA#Aba`Vsø¾_3ñc°,« àä2m¼Ýñþjó
+ [kìlv¹y|!IÕ´ðþyô;ÀðvÈé "ß®°a©?AúðÄ7`ôñÇc^énôk?¸²Bg}»TйD#ÁÑÞ
+"R¹D1÷£çyüERê*ãÝ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Ë¥MRQc*þ@¦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éÏaf'Ãã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> »
+ <div class="breadcrumbs">
+ <span><a href="${course_url(item.course)}">Top</a></span> »
<span py:for="n, x in enumerate(hier)"><a href="${item_url(x)}">${x.title}</a> » </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> © 2009
</div>
</div>
+ </div>
</body>
</py:match>
</html>
More information about the open-ils-commits
mailing list