Changeset 7447


Ignore:
Timestamp:
10 Jan 2012, 21:38:44 (13 years ago)
Author:
Henrik Bettermann
Message:

Backup

Location:
main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/accesscodes/browser.py

    r7321 r7447  
    3232    )
    3333from waeup.sirp.accesscodes.catalog import search
     34from waeup.sirp.browser.layout import action
    3435
    3536grok.context(ISIRPObject)
     
    6667    grok.require('waeup.manageACBatches')
    6768
    68     title = 'Create Access Code Batch'
     69    label = 'Create Access Code Batch'
    6970    pnav = 0
    7071
     
    7273        'prefix', 'entry_num', 'cost')
    7374
    74     @grok.action('Cancel')
     75    @action('Cancel')
    7576    def cancel(self, *args, **kw):
    7677        self.flash('Batch creation cancelled.')
    7778        self.redirect(self.url(self.context))
    7879
    79     @grok.action('Create batch')
     80    @action('Create batch')
    8081    def createBatch(self, **data):
    8182        creator = self.request.principal.id
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/accesscodes/browser_templates/admintaskacbatches.pt

    r5082 r7447  
    22<a href=""
    33   tal:attributes="href viewlet/link_target"
    4    tal:content="viewlet/link_title">Manage Users</a>
     4   tal:content="viewlet/link_title">Manage</a>
    55</p>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/accesscodes/browser_templates/batchcontainer.pt

    r7198 r7447  
    1515    </thead>
    1616    <tbody>
    17       <tr tal:repeat="batch context/values"
    18     tal:attributes="class python: repeat['batch'].odd() and 'even' or 'odd'">
     17      <tr tal:repeat="batch context/values">
    1918  <td>
    2019    <input type="checkbox" name="batches" value="batch/prefix"
     
    4241    </tbody>
    4342  </table>
    44   <input type="submit" name="archive" value="Archive" />
    45   <input type="submit" name="delete" value="Archive and Delete" />
     43  <input type="submit" class="btn" name="archive" value="Archive" />
     44  <input type="submit" class="btn" name="delete" value="Archive and Delete" />
    4645</form>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/accesscodes/browser_templates/reimportbatchpage.pt

    r7198 r7447  
    11<h3>Reimport Access Code Batches</h3>
    2 <p>
    3   Please select the files to reimport. Please note, that batches with
    4   same name have to be deleted before.
     2<p> Please select the files to reimport. Please note, that batches with  same name have to be deleted before.
    53</p>
    64<form method="POST">
     
    86    <thead>
    97      <tr>
    10         <th>&nbsp;</th>
    11   <th>File</th>
     8        <th>&nbsp;
     9        </th>
     10        <th>File
     11        </th>
    1212      </tr>
    1313    </thead>
    1414    <tbody>
    15       <tr tal:repeat="filename context/getImportFiles"
    16     tal:attributes="class python: repeat['filename'].odd() and 'even' or 'odd'">
    17   <td>
    18     <input type="checkbox" name="filenames" value="filename"
    19      tal:attributes="value filename" />
    20   </td>
    21   <td tal:content="filename">file.name</td>
     15      <tr tal:repeat="filename context/getImportFiles"  tal:attributes="class python: repeat['filename'].odd() and 'even' or 'odd'"> <td>
     16          <input type="checkbox" name="filenames" value="filename"  tal:attributes="value filename" /> </td>
     17        <td tal:content="filename">file.name</td>
    2218      </tr>
    2319      <tr tal:condition="python: len(list(context.getImportFiles())) == 0">
    24   <td colspan="5"><b>No import batches available</b></td>
     20        <td colspan="5"><b>No import batches available</b></td>
    2521      </tr>
    2622    </tbody>
    2723  </table>
    28 
    29   <input type="submit" name="cancel" value="Cancel" />
    30   <input type="submit" name="reimport" value="Reimport" />
     24  <input type="submit" class="btn primary" name="reimport" value="Reimport" />
     25  <input type="submit" class="btn" name="cancel" value="Cancel" />
    3126</form>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/accesscodes/browser_templates/searchpage.pt

    r7198 r7447  
    33<br />
    44
    5   <input type="submit" name="search" value="Search" />
     5  <input type="submit" class="btn primary" name="search" value="Search" />
    66  for access codes
    77
     
    4646      </tbody>
    4747    </table>
    48     <div class="actionButtons">
    49         <input type="submit" name="disable" value="Disable ACs" />
    50         <input type="submit" name="enable" value="Enable ACs" />
     48    <div>
     49      <input type="submit" class="btn" name="disable" value="Disable ACs" />
     50      <input type="submit" class="btn" name="enable" value="Enable ACs" />
    5151    </div>
    5252
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt

    r7254 r7447  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       class="edit-form" enctype="multipart/form-data">
     2      enctype="multipart/form-data">
    33
    44  <h2 i18n:translate=""
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/layout.py

    r7445 r7447  
    162162    def setUpWidgets(self,ignore_request=False):
    163163        super(SIRPForm,self).setUpWidgets(ignore_request)
     164        # Width parameters will be overridden by Bootstrap
     165        # so we have to set the css class
    164166        if self.widgets.get('subject'):
    165             self.widgets['subject'].displayWidth = 45
     167            self.widgets['subject'].cssClass = 'span9'
    166168        if self.widgets.get('body'):
    167169            self.widgets['body'].height = 10
    168170        if self.widgets.get('body'):
    169             self.widgets['body'].width = 35
     171            self.widgets['body'].cssClass = 'span9'
    170172
    171173class SIRPPage(UtilityView,Page):
     
    188190    def setUpWidgets(self,ignore_request=False):
    189191        super(SIRPEditFormPage,self).setUpWidgets(ignore_request)
     192        for widget in self.widgets:
     193            if widget.__class__.__name__ == 'TextWidget':
     194                widget.cssClass = 'span8'
     195            elif widget.__class__.__name__ == 'IntWidget':
     196                widget.cssClass = 'span2'
     197        #import pdb; pdb.set_trace()
    190198        if self.widgets.get('title'):
    191             self.widgets['title'].displayWidth = 80
     199            self.widgets['title'].cssClass = 'span12'
    192200        if self.widgets.get('frontpage'):
    193             self.widgets['frontpage'].width = 70
     201            self.widgets['frontpage'].cssClass = 'span12'
    194202        if self.widgets.get('phone'):
    195             self.widgets['phone'].displayWidth = 13
     203            self.widgets['phone'].cssClass = 'span4'
    196204        if self.widgets.get('notice'):
    197205            self.widgets['notice'].height = 3
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/static/waeup-base.css

    r7446 r7447  
    1919}
    2020
    21 .form-table {
    22   width: 100%;
    23 }
    24 
    25 .fieldname {
    26   width: 25%;
    27 }
    28 
    2921.form-table td {
    3022  padding: 5px 5px 4px;
     
    3628}
    3729
     30select {
     31  width: 180px;
     32}
     33
    3834
    3935 /* dataTables stuff */
     
    4339  margin-bottom: 50px;
    4440}
     41
     42 /* SIRP stuff */
     43
     44.form-table {
     45  width: 100%;
     46}
     47
     48.fieldname {
     49  width: 25%;
     50}
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/browser/templates/default_waeup_edit_form.pt

    r7446 r7447  
    1313        Form status summary
    1414      </span>
    15       <ul tal:condition="view/errors">
    16         <li tal:repeat="error view/error_views">
    17            <span tal:replace="structure error">Error Type</span>
    18         </li>
    19       </ul>
    2015  </div>
    2116
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/hostels/browser.py

    r7332 r7447  
    2929from waeup.sirp.browser.viewlets import (
    3030    ManageActionButton, PrimaryNavTab)
    31 from waeup.sirp.browser.layout import jsaction, JSAction
     31from waeup.sirp.browser.layout import jsaction, action
    3232from waeup.sirp.interfaces import ISIRPObject
    3333from waeup.sirp.hostels.vocabularies import NOT_OCCUPIED
     
    141141        return
    142142
    143     @grok.action('Add hostel', validator=NullValidator)
     143    @action('Add hostel', validator=NullValidator)
    144144    def addSubunit(self, **data):
    145145        self.redirect(self.url(self.context, 'addhostel'))
     
    158158    pnav = 5
    159159
    160     @grok.action('Create hostel')
     160    @action('Create hostel')
    161161    def addHostel(self, **data):
    162162        hostel = Hostel()
     
    230230        return
    231231
    232     @grok.action('Save')
     232    @action('Save')
    233233    def save(self, **data):
    234234        msave(self, **data)
    235235        return
    236236
    237     @grok.action('Update all beds')
     237    @action('Update all beds')
    238238    def updateBeds(self, **data):
    239239        removed, added, modified, modified_beds = self.context.updateBeds()
     
    245245        return
    246246
    247     @grok.action('Switch reservation of selected beds')
     247    @action('Switch reservation of selected beds')
    248248    def switchReservations(self, **data):
    249249        form = self.request.form
     
    273273        return
    274274
    275     @grok.action('Release selected beds')
     275    @action('Release selected beds')
    276276    def releaseBeds(self, **data):
    277277        form = self.request.form
     
    316316            self.context.__parent__.hostel_name, co[1], co[2], co[3])
    317317
    318     @grok.action('Save')
     318    @action('Save')
    319319    def save(self, **data):
    320320        msave(self, **data)
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/hostels/browser_templates/containermanagepage.pt

    r6959 r7447  
    11<h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
    2 <div class="form-status" tal:define="status view/status" tal:condition="status"> Form Status:
     2<div class="alert-message error" tal:define="status view/status" tal:condition="status"> Form Status:
    33  <span i18n:translate="" tal:content="view/status"> Form status summary
    44  </span>
    55</div>
    6 <form action="." tal:attributes="action request/URL" method="POST" class="edit-form" enctype="multipart/form-data">
    7   <table class="zebra">
     6<form action="." tal:attributes="action request/URL" method="POST" enctype="multipart/form-data">
     7  <table>
    88    <thead>
    99      <tr>
     
    2525    </tbody>
    2626  </table>
    27   <div class="actionButtons" tal:condition="view/availableActions">
     27  <div tal:condition="view/availableActions">
    2828    <span tal:repeat="action view/actions" tal:omit-tag="">
    2929      <input tal:replace="structure action/render"/>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/hostels/browser_templates/containerpage.pt

    r6959 r7447  
    55</div>
    66
    7 <table class="zebra">
     7<table>
    88  <thead>
    99    <tr>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/hostels/browser_templates/hostelmanagepage.pt

    r7068 r7447  
    33  tal:content="view/label">Label</h2>
    44
    5   <div class="form-status"
     5  <div class="alert-message error"
    66      tal:define="status view/status"
    77      tal:condition="status">
     
    1818
    1919  <form action="." tal:attributes="action request/URL" method="POST"
    20         class="edit-form" enctype="multipart/form-data">
     20        enctype="multipart/form-data">
    2121
    22   <div id="tabs">
    23     <ul>
    24       <li><a href="#tab-1"><span>Hostel Data</span></a></li>
    25       <li><a href="#tab-2"><span>Beds</span></a></li>
    26     </ul>
     22  <ul class="tabs" data-tabs="tabs">
     23    <li class="active"><a href="#tab-1"><span>Hostel Data</span></a></li>
     24    <li><a href="#tab-2"><span>Beds</span></a></li>
     25  </ul>
    2726
    28     <div id="tab-1">
    29       <table class="zebra">
     27  <div class="tab-content">
     28    <div id="tab-1" class="active">
     29      <table class="form-table">
    3030      <tbody>
    3131      <tal:block repeat="widget view/widgets">
    3232        <tr>
    33           <td class="label">
    34             <label tal:attributes="for widget/name">
    35               <span class="required" tal:condition="widget/required">*</span>
    36               <span i18n:translate="" tal:content="widget/label">label</span>:
    37             </label>
     33          <td class="fieldname">
     34            <span class="required" tal:condition="widget/required">*</span>
     35            <span i18n:translate="" tal:content="widget/label">label</span>:
    3836          </td>
    39           <td class="field">
     37          <td>
    4038            <span class="widget" tal:content="structure widget">
    4139              <input type="text" />
     
    4543            </tal:error>
    4644            <tal:hint tal:condition="widget/hint">
    47               <span class="hint" tal:content="structure widget/hint">hint</span>
     45              <span tal:content="structure widget/hint">hint</span>
    4846            </tal:hint>
    4947          </td>
     
    5250      </tbody>
    5351      </table>
    54       <div class="actionButtons" tal:condition="view/availableActions">
     52      <div tal:condition="view/availableActions">
    5553        <span tal:repeat="action view/actions"
    5654              tal:omit-tag="">
     
    9795      </table>
    9896
    99       <div class="actionButtons" tal:condition="view/availableActions">
     97      <div tal:condition="view/availableActions">
    10098        <span tal:repeat="action view/actions"
    10199              tal:omit-tag="">
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser.py

    r7446 r7447  
    754754        except KeyError:
    755755            self.flash('This level exists.')
     756        self.flash('Study level has been added.')
    756757        self.redirect(self.url(self.context, u'@@manage')+'#tab-2')
    757758        return
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/containermanagepage.pt

    r7364 r7447  
    44<br />
    55
    6   <input type="submit" name="search" value="Search" />
     6  <input class="btn primary" type="submit" name="search" value="Search" />
    77  for students
    88
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studenthistory.pt

    r6637 r7447  
    33    tal:content="view/label">Label</h2>
    44
    5 <div class="workflow">
     5<div class="alert-message block-message success">
     6  <font face="Courier">
    67  <div tal:repeat="msg context/history/messages">
    7     <span tal:replace="msg">message</span><br />
     8    <span tal:replace="msg">message</span>
    89  </div>
     10  </font>
    911</div>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studycoursemanagepage.pt

    r6794 r7447  
    33tal:content="view/label">Label</h2>
    44
    5 <div class="form-status"
     5<div class="alert-message error"
    66    tal:define="status view/status"
    77    tal:condition="status">
     
    1313
    1414<form action="." tal:attributes="action request/URL" method="POST"
    15       class="edit-form" enctype="multipart/form-data">
     15      enctype="multipart/form-data">
    1616
    17 <div id="tabs">
    18 <ul>
    19   <li><a href="#tab-1"><span>Study Course Data</span></a></li>
    20   <li><a href="#tab-2"><span>Study Levels</span></a></li>
    21 </ul>
    22    
    23 <div id="tab-1">       
    24   <table class="zebra">
    25   <tbody>
    26   <tal:block repeat="widget view/widgets">
    27     <tr>
    28       <td class="label">
    29         <label tal:attributes="for widget/name">
    30           <span class="required" tal:condition="widget/required">*</span>
    31           <span i18n:translate="" tal:content="widget/label">label</span>:
    32         </label>
    33       </td>
    34       <td class="field">
    35         <span class="widget" tal:content="structure widget">
    36           <input type="text" />
     17  <ul class="tabs" data-tabs="tabs">
     18    <li class="active"><a href="#tab-1"><span>Study Course Data</span></a></li>
     19    <li><a href="#tab-2"><span>Study Levels</span></a></li>
     20  </ul>
     21
     22  <div class="tab-content">
     23    <div id="tab-1" class="active">
     24      <table class="form-table">
     25      <tbody>
     26      <tal:block repeat="widget view/widgets">
     27        <tr>
     28          <td class="fieldname">
     29            <span class="required" tal:condition="widget/required">*</span>
     30            <span i18n:translate="" tal:content="widget/label">label</span>:
     31          </td>
     32          <td>
     33            <span tal:content="structure widget">
     34              <input type="text" />
     35            </span>
     36            <tal:error tal:condition="widget/error">
     37              <span tal:replace="structure widget/error">error</span>
     38            </tal:error>
     39            <tal:hint tal:condition="widget/hint">
     40              <span tal:content="structure widget/hint">hint</span>
     41            </tal:hint>
     42          </td>
     43        </tr>
     44      </tal:block>
     45      </tbody>
     46      </table>
     47      <div tal:condition="view/availableActions">
     48        <span tal:repeat="action view/actions"
     49              tal:omit-tag="">
     50          <input tal:condition="python:action.label in view.taboneactions"
     51                 tal:replace="structure action/render"/>
    3752        </span>
    38         <tal:error tal:condition="widget/error">
    39           <span tal:replace="structure widget/error">error</span>
    40         </tal:error>
    41         <tal:hint tal:condition="widget/hint">
    42           <span class="hint" tal:content="structure widget/hint">hint</span>
    43         </tal:hint>
    44       </td>
    45     </tr>
    46   </tal:block>
    47   </tbody>
    48   </table>
    49   <div class="actionButtons" tal:condition="view/availableActions">
    50     <span tal:repeat="action view/actions"
    51           tal:omit-tag="">
    52       <input tal:condition="python:action.label in view.taboneactions"
    53              tal:replace="structure action/render"/>
    54     </span>
     53      </div>
     54    </div>
     55
     56    <div id="tab-2">
     57      <h3>Study Levels (Course Lists)</h3>
     58      <table class="display dataTableManage">
     59        <thead>
     60          <tr>
     61            <th>&nbsp;</th><th>Level Code</th><th>Level Title</th>
     62          </tr>
     63        </thead>
     64        <tbody>
     65          <tr tal:repeat="cl context/values">
     66             <td>
     67              <input type="checkbox"
     68                         name="val_id"
     69                         tal:attributes="value cl/__name__" />
     70            </td>
     71            <td> <a tal:attributes="href cl/__name__">
     72              <span tal:content="cl/level">CODE</span></a>
     73            </td>
     74            <td>
     75              <span tal:content="cl/level_title">TITLE</span>
     76            </td>
     77          </tr>
     78        </tbody>
     79      </table>
     80
     81      <div tal:condition="view/availableActions">
     82        <span tal:repeat="action view/actions"
     83              tal:omit-tag="">
     84          <input tal:condition="python:action.label in view.tabtwoactions"
     85                 tal:replace="structure action/render"/>
     86        </span>
     87      </div>
     88      <br /><br /><br />
     89      <div>
     90        <span tal:condition="view/availableActions">
     91          <span tal:repeat="action view/actions"
     92                tal:omit-tag="">
     93            <input tal:condition="python:action.label in view.tabthreeactions"
     94                   tal:replace="structure action/render"/>
     95          </span>
     96        </span>
     97        <select id="addlevel" name="addlevel">
     98          <option tal:attributes="value level/code" tal:repeat="level view/level_dict">
     99            <span tal:replace="level/title">LEVELTITLE
     100          </span>
     101          </option>
     102        </select>
     103      </div>
     104    </div>
    55105  </div>
    56 </div>   
    57    
    58 <div id="tab-2">
    59   <h3>Study Levels (Course Lists)</h3>
    60   <table class="display dataTableManage">
    61     <thead>
    62       <tr>
    63         <th>&nbsp;</th><th>Level Code</th><th>Level Title</th>
    64       </tr>
    65     </thead>
    66     <tbody>
    67       <tr tal:repeat="cl context/values">
    68          <td>
    69           <input type="checkbox"
    70                  name="val_id"
    71                  tal:attributes="value cl/__name__" />
    72         </td>
    73         <td> <a tal:attributes="href cl/__name__">
    74           <span tal:content="cl/level">CODE</span></a>
    75         </td>
    76         <td>
    77           <span tal:content="cl/level_title">TITLE</span>
    78         </td>
    79       </tr>
    80     </tbody>
    81   </table>
    82 
    83   <div class="actionButtons" tal:condition="view/availableActions">
    84     <span tal:repeat="action view/actions"
    85           tal:omit-tag="">
    86       <input tal:condition="python:action.label in view.tabtwoactions"
    87              tal:replace="structure action/render"/>
    88     </span>
    89   </div>
    90   <br /><br /><br />
    91   <div>
    92     <span class="actionButtons" tal:condition="view/availableActions">
    93       <span tal:repeat="action view/actions"
    94             tal:omit-tag="">
    95         <input tal:condition="python:action.label in view.tabthreeactions"
    96                tal:replace="structure action/render"/>
    97       </span>
    98     </span>
    99     <select id="addlevel" name="addlevel">
    100       <option tal:attributes="value level/code" tal:repeat="level view/level_dict">
    101         <span tal:replace="level/title">LEVELTITLE
    102       </span>
    103       </option>
    104     </select>
    105   </div>
    106 
    107 
    108 
    109 </div>
    110 </div>
    111106</form> 
    112107
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studycoursepage.pt

    r7206 r7447  
    11<h2 tal:content="view/label">TITLE</h2>
    22
    3 <table class="zebra">
     3<table class="form-table">
    44<thead>
    55</thead>
     
    77  <tal:block repeat="widget view/widgets">
    88    <tr>
    9       <td>
    10         <label tal:attributes="for widget/name">
    11           <span i18n:translate=""
    12                          tal:content="widget/label">label</span>:
    13         </label>
     9      <td class="filedname">
     10        <span i18n:translate="" tal:content="widget/label">label</span>:
    1411      </td>
    15       <td class="field" tal:on-error="default">
     12      <td tal:on-error="default">
    1613        <div class="widget" tal:content="structure widget">
    1714          <input type="text" />
     
    2219    <tr>
    2320      <td>
    24         <label>
    2521          Study Mode:
    26         </label>
    2722      </td>
    2823      <td class="field">
     
    3429    <tr tal:condition="python: view.department is not None">
    3530      <td>
    36         <label>
    3731          Department:
    38         </label>
    3932      </td>
    4033      <td class="field">
     
    4740    <tr tal:condition="python: view.faculty is not None">
    4841      <td>
    49         <label>
    5042          Faculty:
    51         </label>
    5243      </td>
    5344      <td class="field">
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studyleveladdpage.pt

    r6806 r7447  
    33tal:content="view/label">Label</h2>
    44
    5 <div class="form-status"
     5<div class="alert-message error"
    66    tal:define="status view/status"
    77    tal:condition="status">
     
    1313
    1414<form action="." tal:attributes="action request/URL" method="POST"
    15       class="edit-form" enctype="multipart/form-data">
     15      enctype="multipart/form-data">
    1616
    1717  <p>Text to explain course registration procedure.</p>
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studyleveleditpage.pt

    r7310 r7447  
    33tal:content="view/label">Label</h2>
    44
    5 <div class="form-status"
     5<div class="alert-message error"
    66    tal:define="status view/status"
    77    tal:condition="status">
     
    1313
    1414<form action="." tal:attributes="action request/URL" method="POST"
    15       class="edit-form" enctype="multipart/form-data">
     15      enctype="multipart/form-data">
    1616
    1717  <h3>Course Tickets (Total Credits: <span tal:replace="view/total_credits">TOTAL</span>)</h3>
     
    4949  </table>
    5050
    51   <div class="actionButtons" tal:condition="view/availableActions">
     51  <div tal:condition="view/availableActions">
    5252    <span tal:repeat="action view/actions"
    5353          tal:omit-tag="">
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studylevelmanagepage.pt

    r7310 r7447  
    33tal:content="view/label">Label</h2>
    44
    5 <div class="form-status"
     5<div class="alert-message error"
    66    tal:define="status view/status"
    77    tal:condition="status">
     
    1313
    1414<form action="." tal:attributes="action request/URL" method="POST"
    15       class="edit-form" enctype="multipart/form-data">
     15      enctype="multipart/form-data">
    1616
    17 <div id="tabs">
    18 <ul>
    19   <li><a href="#tab-1"><span>Study Level Data</span></a></li>
    20   <li><a href="#tab-2"><span>Course Tickets</span></a></li>
    21 </ul>
    22    
    23 <div id="tab-1">       
    24   <table class="zebra">
    25   <tbody>
    26   <tal:block repeat="widget view/widgets">
    27     <tr>
    28       <td class="label">
    29         <label tal:attributes="for widget/name">
    30           <span class="required" tal:condition="widget/required">*</span>
    31           <span i18n:translate="" tal:content="widget/label">label</span>:
    32         </label>
    33       </td>
    34       <td class="field">
    35         <span class="widget" tal:content="structure widget">
    36           <input type="text" />
     17  <ul class="tabs" data-tabs="tabs">
     18    <li class="active"><a href="#tab-1"><span>Study Level Data</span></a></li>
     19    <li><a href="#tab-2"><span>Course Tickets</span></a></li>
     20  </ul>
     21
     22  <div class="tab-content">
     23    <div id="tab-1" class="active">
     24      <table class="form-table">
     25      <tbody>
     26      <tal:block repeat="widget view/widgets">
     27        <tr>
     28          <td class="fieldname">
     29            <span class="required" tal:condition="widget/required">*</span>
     30            <span i18n:translate="" tal:content="widget/label">label</span>:
     31          </td>
     32          <td>
     33            <span tal:content="structure widget">
     34              <input type="text" />
     35            </span>
     36            <tal:error tal:condition="widget/error">
     37              <span tal:replace="structure widget/error">error</span>
     38            </tal:error>
     39            <tal:hint tal:condition="widget/hint">
     40              <span tal:content="structure widget/hint">hint</span>
     41            </tal:hint>
     42          </td>
     43        </tr>
     44      </tal:block>
     45      </tbody>
     46      </table>
     47      <div tal:condition="view/availableActions">
     48        <span tal:repeat="action view/actions"
     49              tal:omit-tag="">
     50          <input tal:condition="python:action.label in view.taboneactions"
     51                 tal:replace="structure action/render"/>
    3752        </span>
    38         <tal:error tal:condition="widget/error">
    39           <span tal:replace="structure widget/error">error</span>
    40         </tal:error>
    41         <tal:hint tal:condition="widget/hint">
    42           <span class="hint" tal:content="structure widget/hint">hint</span>
    43         </tal:hint>
    44       </td>
    45     </tr>
    46   </tal:block>
    47   </tbody>
    48   </table>
    49   <div class="actionButtons" tal:condition="view/availableActions">
    50     <span tal:repeat="action view/actions"
    51           tal:omit-tag="">
    52       <input tal:condition="python:action.label in view.taboneactions"
    53              tal:replace="structure action/render"/>
    54     </span>
     53      </div>
     54    </div>
     55
     56    <div id="tab-2">
     57      <h3>Course Tickets</h3>
     58      <table class="display dataTableManage">
     59      <thead>
     60        <tr>
     61          <th>&nbsp;</th>
     62          <th>Sem.</th>
     63          <th>Code</th>
     64          <th>Title</th>
     65          <th>Department</th>
     66          <th>Faculty</th>
     67          <th>Credits</th>
     68          <th>Mandatory</th>
     69          <th>Score</th>
     70          <th>Auto</th>
     71        </tr>
     72      </thead>
     73      <tbody>
     74        <tr tal:repeat="value context/values">
     75          <td>
     76            <input type="checkbox" name="val_id"
     77                  tal:attributes="value value/__name__" />
     78          </td>
     79          <td tal:content="value/semester">SEMESTER</td>
     80          <td> <a tal:attributes="href value/__name__">
     81          <span tal:content="value/code">CODE</span>
     82          </a></td>
     83          <td tal:content="value/title">TITLE</td>
     84          <td tal:content="value/department">DEPARTMENT</td>
     85          <td tal:content="value/faculty">FACULTY</td>
     86          <td tal:content="value/credits">CREDITS</td>
     87          <td tal:content="value/core_or_elective">MANDATORY</td>
     88          <td tal:content="value/score">SCORE</td>
     89          <td tal:content="value/automatic">AUTO</td>
     90        </tr>
     91      </tbody>
     92      </table>
     93
     94      <div tal:condition="view/availableActions">
     95        <span tal:repeat="action view/actions"
     96              tal:omit-tag="">
     97          <input tal:condition="python:action.label in view.tabtwoactions"
     98                 tal:replace="structure action/render"/>
     99        </span>
     100      </div>
     101
     102    </div>
    55103  </div>
    56 </div>   
    57    
    58 <div id="tab-2">
    59   <h3>Course Tickets</h3>
    60   <table class="display dataTableManage">
    61   <thead>
    62     <tr>
    63       <th>&nbsp;</th>
    64       <th>Sem.</th>
    65       <th>Code</th>
    66       <th>Title</th>
    67       <th>Department</th>
    68       <th>Faculty</th>
    69       <th>Credits</th>
    70       <th>Mandatory</th>
    71       <th>Score</th>
    72       <th>Auto</th>
    73     </tr>
    74   </thead>
    75   <tbody>
    76     <tr tal:repeat="value context/values">
    77       <td>
    78         <input type="checkbox" name="val_id"
    79                   tal:attributes="value value/__name__" />
    80       </td>
    81       <td tal:content="value/semester">SEMESTER</td>
    82       <td> <a tal:attributes="href value/__name__">
    83       <span tal:content="value/code">CODE</span>
    84       </a></td>
    85       <td tal:content="value/title">TITLE</td>
    86       <td tal:content="value/department">DEPARTMENT</td>
    87       <td tal:content="value/faculty">FACULTY</td>
    88       <td tal:content="value/credits">CREDITS</td>
    89       <td tal:content="value/core_or_elective">MANDATORY</td>
    90       <td tal:content="value/score">SCORE</td>
    91       <td tal:content="value/automatic">AUTO</td>
    92     </tr>
    93   </tbody>
    94   </table>
    95 
    96   <div class="actionButtons" tal:condition="view/availableActions">
    97     <span tal:repeat="action view/actions"
    98           tal:omit-tag="">
    99       <input tal:condition="python:action.label in view.tabtwoactions"
    100              tal:replace="structure action/render"/>
    101     </span>
    102   </div>
    103 
    104 </div>
    105 </div>
    106104</form> 
    107105
  • main/waeup.sirp/branches/henrik-bootstrap/src/waeup/sirp/students/browser_templates/studylevelpage.pt

    r7310 r7447  
    11<h2 tal:content="view/label">TITLE</h2>
    22
    3 <table class="zebra">
     3<table class="form-table">
    44<thead>
    55</thead>
     
    77  <tal:block repeat="widget view/widgets">
    88    <tr>
    9       <td>
    10         <label tal:attributes="for widget/name">
    11           <span i18n:translate=""
    12                          tal:content="widget/label">label</span>:
    13         </label>
     9      <td class="fieldname">
     10        <span i18n:translate="" tal:content="widget/label">label</span>:
    1411      </td>
    15       <td class="field" tal:on-error="default">
     12      <td tal:on-error="default">
    1613        <div class="widget" tal:content="structure widget">
    1714          <input type="text" />
     
    2219  <tr>
    2320    <td>
    24       <label>Total Credits:</label>
     21      Total Credits:
    2522    </td>
    2623    <td>
Note: See TracChangeset for help on using the changeset viewer.