Changeset 3530
- Timestamp:
- 30 Jun 2008, 17:01:14 (16 years ago)
- Location:
- waeup/trunk/src/waeup
- Files:
-
- 14 added
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/app.py
r3526 r3530 1 1 import grok 2 2 from grok import index 3 from zope.interface import Interface 3 4 from interfaces import IUniversity 4 5 from setup import app_setup 6 from viewlets import MainArea 5 7 6 8 class University(grok.Application, grok.Container): … … 12 14 app_setup.setup(self) 13 15 14 class Index(grok.View): 15 grok.context(University) 16 class Content(grok.Viewlet): 17 grok.viewletmanager(MainArea) 18 grok.context(IUniversity) 16 19 17 def getFacList(self):18 return [x for x in self.context.values()19 if IFaculty.providedBy(x)]20 20 21 21 class Edit(grok.EditForm): -
waeup/trunk/src/waeup/app_templates/content.pt
r3529 r3530 1 <html>2 <head>3 <link rel="stylesheet" type="text/css"4 tal:attributes="href static/simple.css" />5 </head>6 <body>7 1 <h1>Congratulations!</h1> 8 2 9 3 <h2>Your faculties:</h2> 10 4 11 <ul tal:repeat="fac context/values">12 <li >5 <ul> 6 <li tal:repeat="fac context/values"> 13 7 <a href="." 14 8 tal:content="fac/name" … … 20 14 <a href="@@studentsearch">Search</a> 21 15 </div> 22 23 </body>24 </html> -
waeup/trunk/src/waeup/app_templates/master.pt
r3521 r3530 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 4 lang="en"> 5 <head> 6 <meta tal:attributes="http-equiv string:Content-Type; 7 content string:text/html;;charset=utf-8" /> 8 <-- tal:head content="structure provider:head" / --> 9 </head> 10 <body> 11 12 <!-- div id="header"> 13 <tal:header content="structure provider:header" /> 14 </div> 15 <div id="left"> 16 <tal:left content="structure provider:left" /> 17 </div --> 18 <div id="main"> 19 <tal:main content="structure provider:main" /> 20 </div> 21 <div style="clear:both" /> 22 <!-- div id="footer"> 23 <tal:footer content="structure provider:footer" /> 24 </div --> 25 26 </body> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> 4 <head> 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 6 <meta name="robots" content="index, follow" /> 7 <tal:head content="structure provider:head" /> 8 <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.1/build/reset-fonts-grids/reset-fonts-grids.css" /> 9 <!-- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.1/build/base/base-min.css" /> --> 10 <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" /> 11 </head> 12 <body id="doc3" class="yui-t2"> 13 <div id="hd"> 14 <tal:header content="structure provider:header" /> 15 </div> 16 <div id="bd"> 17 <div id="yui-main"> 18 <div class="yui-b"> 19 <tal:main content="structure provider:main" /> 20 </div> 21 </div> 22 <div id="left" class="yui-b"> 23 <tal:left content="structure provider:left" /> 24 </div> 25 </div> 26 <div id="ft"> 27 <tal:footer content="structure provider:footer" /> 28 </div> 29 </body> 27 30 </html> -
waeup/trunk/src/waeup/basecontainer.py
r3529 r3530 1 1 import grok 2 2 from baseitem import BaseItem 3 from waeup.viewlets import MainArea 3 4 4 5 class BaseContainer(BaseItem, grok.Container): … … 12 13 specialActions = [] 13 14 14 class Index(grok.View): 15 class Content(grok.Viewlet): 16 grok.viewletmanager(MainArea) 15 17 """ 16 Base view 18 Base viewlet 17 19 """ 18 20 -
waeup/trunk/src/waeup/basecontainer_templates/content.pt
r3529 r3530 1 <html>2 <head>3 <link rel="stylesheet" type="text/css"4 tal:attributes="href static/simple.css" />5 </head>6 <body>7 1 <h1 tal:content="context/name"></h1> 8 2 <a href="" tal:attributes="href python:view.url(context.__parent__)">Up</a> … … 21 15 tal:attributes="href python:view.url(context, action)" 22 16 tal:content="action">Add</a> 23 </body>24 </html> -
waeup/trunk/src/waeup/baseitem.py
r3528 r3530 1 1 import grok 2 from waeup.viewlets import MainArea 2 3 3 4 class BaseItem(grok.Model): … … 12 13 grok.EditForm.update(self) 13 14 14 class Index(grok.DisplayForm): 15 16 def update(self): 17 self.form_fields = grok.AutoFields(self.context.__class__) 18 grok.DisplayForm.update(self) 15 #class Content(grok.Viewlet, grok.DisplayForm): 16 # grok.viewletmanager(MainArea) 17 # 18 # def update(self): 19 # self.form_fields = grok.AutoFields(self.context.__class__) 20 # grok.DisplayForm.update(self)
Note: See TracChangeset for help on using the changeset viewer.