[open-ils-commits] r121 - in servres/trunk/conifer: . static static/tango syrup templates templates/components
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jan 26 21:28:31 EST 2009
Author: gfawcett
Date: 2009-01-26 21:28:30 -0500 (Mon, 26 Jan 2009)
New Revision: 121
Added:
servres/trunk/conifer/static/tango/view_detailed.png
servres/trunk/conifer/templates/simplemessage.xhtml
Modified:
servres/trunk/conifer/genshi_namespace.py
servres/trunk/conifer/static/main.css
servres/trunk/conifer/static/tango/x-office-address-book.png
servres/trunk/conifer/syrup/models.py
servres/trunk/conifer/syrup/urls.py
servres/trunk/conifer/syrup/views.py
servres/trunk/conifer/templates/components/item.xhtml
servres/trunk/conifer/templates/item_metadata.xhtml
servres/trunk/conifer/templates/master.xhtml
Log:
minor UI tweaks; attachment-links now open directly
(rather than having to click on the About page and then click on
'download')
Modified: servres/trunk/conifer/genshi_namespace.py
===================================================================
--- servres/trunk/conifer/genshi_namespace.py 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/genshi_namespace.py 2009-01-27 02:28:30 UTC (rev 121)
@@ -11,11 +11,18 @@
# approach?
def item_url(item, suffix=''):
+ if item.item_type == 'ELEC' and suffix == '':
+ return item_download_url(item)
if item.item_type == 'URL' and suffix == '':
return item.url
else:
return '/syrup/course/%d/item/%d/%s' % (item.course_id, item.id, suffix)
+def item_download_url(item):
+ assert item.item_type == 'ELEC'
+ return '/syrup/course/%d/item/%d/dl/%s' % (
+ item.course_id, item.id, item.fileobj.name.split('/')[-1])
+
def course_url(course, suffix=''):
return '/syrup/course/%d/%s' % (course.id, suffix)
Modified: servres/trunk/conifer/static/main.css
===================================================================
--- servres/trunk/conifer/static/main.css 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/static/main.css 2009-01-27 02:28:30 UTC (rev 121)
@@ -122,6 +122,11 @@
font-weight: bold; color: navy;
}
+.itemtree li.item_ELEC {
+ list-style-image: url(tango/view_detailed.png);
+ margin-top: 4;
+}
+
.itemtree li.item_URL {
list-style-image: url(tango/applications-internet.png);
margin-top: 4;
Added: servres/trunk/conifer/static/tango/view_detailed.png
===================================================================
--- servres/trunk/conifer/static/tango/view_detailed.png (rev 0)
+++ servres/trunk/conifer/static/tango/view_detailed.png 2009-01-27 02:28:30 UTC (rev 121)
@@ -0,0 +1,9 @@
+PNG
+
+
+IHDR óÿa bKGD ÿ ÿ ÿ ½§ pHYs tIMEÔ%6NãUº âIDATxÚ¥ÍNTA
¿;ܹLÀÆè$D&Á%aé×¾¯â¸#qáÊ
>+÷È$31²Ð B¸?}»~\ôÌe@Ö¦ª:}ªÏ9ÕÙ³7?öV6\Ø(m£´µ¤PEÚpý\¢m6¿§ùÚþûaN];MmÔ¥SUF]9Ufô2ÃÌi£a=ÇrÃ=@Ë×WáÖú
+MeuåyÊýòz(` &óí{Îm0QP«:ʬh£#â:*ÆÛ=òõì>àaæª)2z¸àõp°G8ØÃëé-`ïÀWµ»¥¸áÕO êªäËçF£Üa<_8=EÕ0³«Ùò}¯& ´MÉþþ£°³³{«w'÷îB1XÅ=ÑT5¢?£nõÄÀéubk¿©{Þ'3 ÞÑ~xÈ<kÝ« ÅM¸;ù|àÓ£0ncfL&'×nn>AÕqgaý»`ÿácÎÏ«¿LQ Aãò³ËÈ×ÓSC$$sTQ1T
+MY
+sÇÍ1O?ñü2_¼O.V HSÝ
+Ú
+1¤^Eáßßþ;þ 2¿iPëcå IEND®B`
\ No newline at end of file
Modified: servres/trunk/conifer/static/tango/x-office-address-book.png
===================================================================
--- servres/trunk/conifer/static/tango/x-office-address-book.png 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/static/tango/x-office-address-book.png 2009-01-27 02:28:30 UTC (rev 121)
@@ -1,16 +1,10 @@
PNG
-IHDR óÿa bKGD ÿ ÿ ÿ ½§ pHYs tIMEÕ
-*(¹dºÊ 5tEXtComment (c) 2004 Jakub Steiner
+IHDR óÿa sRGB ®Îé bKGD ÿ ÿ ÿ ½§ pHYs tIMEÙ51±°¶Ò 5tEXtComment (c) 2004 Jakub Steiner
-Created with The GIMPÙo =IDAT8ËMOSAÞ¹÷ö¶`?PjbL1&Æhü
-`ÜâÂ
Á¤,Lü=`âÂ
-0V´T¡ -·íííôb¡ÂBO29ϼï9gÀTqaáßc~ñÕô,*.ÌH=óâùC<_ãµ:ZSóÚ H) Ç
-? ^YæÙ½"©ìäKyüèAFvÙTò>ÊCå=T«M¨"x£Zù8u ¤¶·ôÚpGààÐ#s¡Þ$]ªP»2JaùmR¥
-]81'è{± \Wß;_*ÔDzD¹Õ-üºV ùmÆóDíÎ ÀvlÂnØßíBÌZz!GâÇ>ÚµQMw|:j+1$æT¡
-F¤îb"ç¨ÚgÚ!9!Ä]TÃÇê½n+Û?©_Î÷ø$-DÜ,S»zu@[nIñdn¯7{ ¹) L6M½I~ßE5ZtmEõæĹÕS`@)t:ßÑäã$£\ëëJ
-hüà5Z¼Y~%
-¡é-
-B
-lA ºÝ¯åjoÉÏëë O-«[Ü¿ïíy!¥¤)Òlìr{üwÅX ^Ü
Â¥3âT×6wÎÁüûÍên5Ãj ]W¡;zÀðîLÞÉ¥ª8Ý79U\ýÏïÌâ«iðs»ÛÙj¾lÿ IEND®B`
\ No newline at end of file
+Created with The GIMPÙo 4IDAT8ËÉjTA
¿ª{ëÞÛCÒm&A¢®\H@ñ"nÔàÊ
_@Ì¢5.DÂMÈ>è(¸²q$0DÌС;Ôä¢;DÈ¢úªÎê 3³ós@¨D8ç^¼zzç1¦ñàþuÚ¡j
+cø³ÑDJAT(ÂîÖ[îN=¤6>ýH7®9ç<¶Ð×Êt2M`-.ÍsM^XÂ<G·Sj7©O³ûwñ¥ãXz`»ÙÆ:G{c (@¢Êq1°$D4ëm¨X[
+$õj dÜ^"= Qá¬,zëH*VC&ÇIÝVÀû¯Zðy©Ü(EjsD` ]XJ¥/%?Ö6ÐÆR:J <÷k´$qR1ª,Rà¨ì«GqD§Ä#PåSÕíV
+@òSqk¦»=ÇÑZÿAW[ªgg§@(¬óÇ[ÀR!õzL.#ÍaßÙèPi0?hwR^¿yG(=Î÷1!
+B k¿~oºÓÝü¾¼p;øôñW/VRü·¤tEB®»ÄþÃBf»Ãù!&'Ï9ØK¨§/«ëÇÖàÙÕÍI»n}³I¢0ÚeÿXÇôå1¿¸´)æ&gfç´÷´ðü øåëe2Ý IEND®B`
\ No newline at end of file
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/syrup/models.py 2009-01-27 02:28:30 UTC (rev 121)
@@ -329,7 +329,7 @@
def needs_meta_link(self):
"""Should an 'About' link be displayed for this item?"""
- return self.item_type == 'URL'
+ return self.item_type in ('ELEC', 'URL')
#------------------------------------------------------------
Modified: servres/trunk/conifer/syrup/urls.py
===================================================================
--- servres/trunk/conifer/syrup/urls.py 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/syrup/urls.py 2009-01-27 02:28:30 UTC (rev 121)
@@ -11,7 +11,7 @@
(r'^course/$', 'my_courses'),
(r'^browse/$', 'browse_courses'),
(r'^browse/(?P<browse_option>.*)/$', 'browse_courses'),
- (r'^join/$', 'join_course'),
+ (r'^prefs/$', 'user_prefs'),
(r'^opencourse/$', 'open_courses'),
(r'^search/$', 'search'),
(r'^instructors/$', 'instructors'),
Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/syrup/views.py 2009-01-27 02:28:30 UTC (rev 121)
@@ -76,8 +76,10 @@
page_num=page_num,
count=count)
-def join_course(request):
- return g.render('join_course.xhtml')
+def user_prefs(request):
+ return g.render('simplemessage.xhtml',
+ title='Sorry...',
+ content='The Preferences page isn\'t ready yet.')
def browse_courses(request, browse_option=''):
#the defaults should be moved into a config file or something...
Modified: servres/trunk/conifer/templates/components/item.xhtml
===================================================================
--- servres/trunk/conifer/templates/components/item.xhtml 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/templates/components/item.xhtml 2009-01-27 02:28:30 UTC (rev 121)
@@ -8,10 +8,10 @@
<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>]
+ [<a href="${item_url(item, 'meta/')}">about</a>]
</span>
<span class="editlinks" py:if="edit">
- [<a href="${item_url(item)}edit/">edit</a>]
+ [<a href="${item_url(item, 'edit/')}">edit</a>]
</span>
${show_tree(subs, edit)}
</li>
Modified: servres/trunk/conifer/templates/item_metadata.xhtml
===================================================================
--- servres/trunk/conifer/templates/item_metadata.xhtml 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/templates/item_metadata.xhtml 2009-01-27 02:28:30 UTC (rev 121)
@@ -25,7 +25,7 @@
<tr py:if="item.url"><th>URL</th><td><a href="${item.url}">${item.url}</a></td></tr>
</table>
<div py:if="item.item_type=='ELEC'">
- <p><a href="${item_url(item)}dl/${item.fileobj.name.split('/')[-1]}">Download</a></p>
+ <p><a href="${item_download_url(item)}">Download</a></p>
<table>
<tr><th>Content type</th><td>${item.fileobj_mimetype}</td></tr>
<tr><th>Content length</th><td>${item.fileobj.size}</td></tr>
Modified: servres/trunk/conifer/templates/master.xhtml
===================================================================
--- servres/trunk/conifer/templates/master.xhtml 2009-01-26 18:43:17 UTC (rev 120)
+++ servres/trunk/conifer/templates/master.xhtml 2009-01-27 02:28:30 UTC (rev 121)
@@ -40,7 +40,7 @@
<span py:if="user.is_authenticated()">
<strong style="padding-right: 18;">Welcome, ${user.first_name or user.username}!</strong>
<a href="/accounts/logout">Log Out</a>
- • <a href="/user/prefs">Preferences</a>
+ • <a href="/syrup/prefs/">Preferences</a>
• <a href="/admin/">Admin UI</a>
</span>
<span py:if="not user.is_authenticated()">
Added: servres/trunk/conifer/templates/simplemessage.xhtml
===================================================================
--- servres/trunk/conifer/templates/simplemessage.xhtml (rev 0)
+++ servres/trunk/conifer/templates/simplemessage.xhtml 2009-01-27 02:28:30 UTC (rev 121)
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:py="http://genshi.edgewall.org/">
+<xi:include href="master.xhtml"/>
+<head>
+ <title>${title}</title>
+</head>
+<body>
+ <h1>${title}</h1>
+ ${content}
+</body>
+</html>
More information about the open-ils-commits
mailing list