Changeset 7450 for main/waeup.sirp/branches
- Timestamp:
- 11 Jan 2012, 22:51:42 (13 years ago)
- Location:
- main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp
- Files:
-
- 2 added
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/layout.py
r7448 r7450 52 52 default_primary_nav_template.__grok_name__ = 'default_primary_nav' 53 53 54 55 54 class action(grok.action): 56 55 -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/resources.py
r7443 r7450 252 252 waeup_sirp, 'bootstrap.min.css') 253 253 254 dropdown = ResourceInclusion( 255 waeup_sirp, 'bootstrap-dropdown.js', 256 depends=[jquery]) 257 254 258 #: Register basic SIRP CSS (which is based on ``bootstrap.min.css`` and ``base`` 255 259 #: as a resource. 256 260 waeup_base_css = ResourceInclusion( 257 261 waeup_sirp, 'waeup-base.css', 258 depends=[ bootstrap_min, base])262 depends=[dropdown,bootstrap_min, base]) 259 263 260 264 #: The red SIRP theme registered as a resource. -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/static/bootstrap.min.css
r7442 r7450 1335 1335 height: 0; 1336 1336 display: inline-block; 1337 content: "↓ 1338 "; 1337 content: "↓"; 1339 1338 text-indent: -99999px; 1340 1339 vertical-align: top; -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/static/mobile.css
r7449 r7450 1 1 .container { 2 width: 4 20px;2 width: 480px; 3 3 } 4 4 5 5 body { 6 padding-top: 120px;6 padding-top: 60px; 7 7 } 8 9 select { 10 width: 60px; 11 } 12 13 .dataTables_length { 14 float: left; 15 width: 40%; 16 } 17 18 .dataTables_filter { 19 float: right; 20 text-align: right; 21 width: 60%; 22 } -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/static/waeup-base.css
r7449 r7450 9 9 body { 10 10 padding-top: 60px; 11 background-color: #EEEEEE; 12 } 13 14 .content { 15 background-color: #FFFFFF; 16 margin-left: -20px; 17 margin-right: -20px; 18 padding-bottom: 20px; 19 padding-left: 20px; 20 padding-right: 20px; 21 padding-top: 20px; 22 border-top-left-radius: 4px; 23 border-top-right-radius: 4px; 24 } 25 26 .well { 27 background-color: #FFFFFF; 28 } 29 30 .breadcrumb { 31 background-color: #FFFFFF; 32 background-image: None; 33 border: 0px; 11 34 } 12 35 … … 40 63 } 41 64 42 table.display{43 margin-top: 25px;65 .dataTables_filter { 66 margin-bottom: 20px; 44 67 } 45 68 46 69 /* SIRP stuff */ 70 71 .container { 72 width: 700px; 73 } 74 75 .actionbar { 76 margin-bottom: 20px; 77 } 47 78 48 79 .error { -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/actionbutton.pt
r7442 r7450 1 <a class="btn " tal:condition="viewlet/target_url"1 <a class="btn actionbar" tal:condition="viewlet/target_url" 2 2 tal:attributes="href viewlet/target_url"> 3 3 <img src="" alt="edit" -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/certificatepage.pt
r7446 r7450 31 31 </thead> 32 32 <tbody> 33 <tr tal:repeat="cc context/values" >33 <tr tal:repeat="cc context/values" class="gradeC"> 34 34 <td> 35 35 <span tal:content="cc/level"> -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/staffsitelayout.pt
r7449 r7450 71 71 </div> 72 72 </div> 73 <div class="span12" tal:condition="provider:actionbar"> 74 <span tal:replace="structure provider:actionbar" /> 75 <br /><br /> 76 </div> 73 <span tal:replace="structure provider:actionbar" /> 77 74 <div tal:content="structure view/content"> THE CONTENT 78 75 </div> -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/studentsitelayout.pt
r7449 r7450 10 10 <meta name="viewport" content="width=320, initial-scale=1, maximum-scale=1"/> 11 11 <link rel="stylesheet" media="only screen and (max-device-width: 480px)" 12 tal:attributes="href python: view.url(layout.site, '@@/waeup.sirp.browser/mobile.css')" type="text/css" /> 12 tal:attributes="href python: view.url(layout.site, '@@/waeup.sirp.browser/mobile.css')" 13 type="text/css" /> 13 14 <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" /> 14 15 <link rel="alternate" type="application/rss+xml" title="RSS" … … 52 53 </div> 53 54 </div> 54 <div tal:condition="provider:actionbar"> 55 <span tal:replace="structure provider:actionbar" /> 56 <br /><br /> 57 </div> 55 <span tal:replace="structure provider:actionbar" /> 58 56 <div tal:content="structure view/content"> THE CONTENT 59 57 </div> -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studycoursepage.pt
r7447 r7450 55 55 56 56 57 <table class="zebra">57 <table> 58 58 <thead> 59 59 <tr> … … 63 63 </thead> 64 64 <tbody> 65 <tr tal:repeat="value context/values">65 <tr class="gradeC" tal:repeat="value context/values"> 66 66 <td> <a tal:attributes="href value/__name__"> 67 67 <span tal:content="value/level">CODE</span></a></td> -
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/viewlets.py
r7442 r7450 60 60 url, self.text) 61 61 62 class StudentManageBaseLink(StudentManageLink):63 grok.order(1)64 link = 'index'65 text = u'Base Data'66 67 62 class StudentManageApplicationLink(StudentManageLink): 68 grok.order( 2)63 grok.order(1) 69 64 link = 'application_slip' 70 65 text = u'Application Slip' … … 75 70 if slip: 76 71 url = self.view.url(self.context,self.link) 77 return u'<li "><a href="%s">%s</a></li>' % (72 return u'<li><a href="%s">%s</a></li>' % ( 78 73 url, self.text) 79 74 return '' 75 76 class StudentManageBaseLink(StudentManageLink): 77 grok.order(2) 78 link = 'index' 79 text = u'Base Data' 80 80 81 81 class StudentManageClearanceLink(StudentManageLink): … … 111 111 text = u'History' 112 112 113 114 class StudentMenu(grok.ViewletManager):115 grok.name('top_student')116 117 class StudentLink(PlainActionButton):118 """A link displayed in the student box which shows up for StudentNavigation119 objects.120 121 """122 grok.baseclass()123 grok.viewletmanager(StudentMenu)124 grok.context(ISIRPObject)125 grok.view(Interface)126 grok.order(5)127 grok.require('waeup.viewStudent')128 129 link = 'index'130 text = u'Base Data'131 132 @property133 def target_url(self):134 """Get a URL to the target...135 """136 return self.view.url(self.context.getStudent(), self.link)137 138 class StudentBaseLink(StudentLink):139 grok.order(1)140 link = 'index'141 text = u'Base Data'142 143 class ApplicationSlipLink(StudentLink):144 grok.order(2)145 link = 'application_slip'146 text = u'Application Slip'147 148 @property149 def target_url(self):150 slip = getUtility(IExtFileStore).getFileByContext(151 self.context.getStudent(), attr=self.link)152 if slip:153 return self.view.url(self.context,self.link)154 return155 156 class StudentClearanceLink(StudentLink):157 grok.order(3)158 link = 'view_clearance'159 text = u'Clearance Data'160 161 class StudentPersonalLink(StudentLink):162 grok.order(4)163 link = 'view_personal'164 text = u'Personal Data'165 166 class StudentStudyCourseLink(StudentLink):167 grok.order(5)168 link = 'studycourse'169 text = u'Study Course'170 171 class StudentPaymentsLink(StudentLink):172 grok.order(6)173 link = 'payments'174 text = u'Payments'175 176 class StudentAccommodationLink(StudentLink):177 grok.order(7)178 link = 'accommodation'179 text = u'Accommodation'180 181 class StudentHistoryLink(StudentLink):182 grok.order(8)183 link = 'history'184 text = u'History'185 186 113 class StudentsTab(PrimaryNavTab): 187 114 """Students tab in primary navigation. … … 227 154 228 155 class MyStudentDataTab(PrimaryStudentNavTab): 229 """MyData -tab in primary navigation.156 """MyData dropdown tab in primary navigation. 230 157 """ 231 158 grok.order(3) 232 159 grok.require('waeup.viewMyStudentDataTab') 160 grok.template('mydatadropdowntabs') 233 161 pnav = 4 234 162 tab_title = u'My Data' 235 163 236 164 @property 237 def link_target(self): 238 rel_link = '/students/%s' % self.request.principal.id 239 return self.view.application_url() + rel_link 165 def active(self): 166 view_pnav = getattr(self.view, 'pnav', 0) 167 if view_pnav == self.pnav: 168 return 'active dropdown' 169 return 'dropdown' 170 171 @property 172 def targets(self): 173 student_url = self.view.application_url() + ( 174 '/students/%s' % self.request.principal.id) 175 #app_slip = getUtility(IExtFileStore).getFileByContext( 176 # self.context.getStudent(), 'application_slip') 177 targets = [] 178 #if app_slip: 179 # targets = [{'url':student_url + '/application_slip', 'title':'Application Slip'},] 180 targets += [ 181 {'url':student_url + '/index', 'title':'Base Data'}, 182 {'url':student_url + '/view_clearance', 'title':'Clearance Data'}, 183 {'url':student_url + '/view_personal', 'title':'Personal Data'}, 184 {'url':student_url + '/studycourse', 'title':'Study Course'}, 185 {'url':student_url + '/payments', 'title':'Payments'}, 186 {'url':student_url + '/accommodation', 'title':'Accommodation Data'}, 187 {'url':student_url + '/history', 'title':'History'}, 188 ] 189 return targets 240 190 241 191 def handle_file_delete(context, view, download_name):
Note: See TracChangeset for help on using the changeset viewer.