Changeset 13513


Ignore:
Timestamp:
1 Dec 2015, 09:53:33 (9 years ago)
Author:
Henrik Bettermann
Message:

Add maintenance mode warning box which the enabler sees if logged in.

Location:
main/waeup.kofa/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/layout/rules.xml

    r11463 r13513  
    4848    <replace css:theme-children="ul.kofa-navbar-right"
    4949             css:content-children="ul.kofa-navbar-right" />
     50
     51    <!-- maintenance mode warning -->
     52    <drop css:theme="div.kofa-maintenance"
     53          css:if-not-content="div.maintenance-warning" />
     54    <replace css:theme-children="div.maintenance-warning"
     55             css:content-children="div.maintenance-warning" />
    5056
    5157    <!-- breadcrumbs -->
  • main/waeup.kofa/trunk/layout/static/css/base.css

    r12901 r13513  
    3232}
    3333
    34 .breadcrumb , .wfstatus {
     34.breadcrumb , .wfstatus, .maintenance-warning {
    3535    background-color: #fff;
    3636    margin-bottom: 0px;
     
    6969.kofa-breadcrumbs-box-short,
    7070.kofa-breadcrumbs-box-long,
    71 .kofa-student-status-box {
     71.kofa-student-status-box,
     72.kofa-maintenance {
    7273    padding: 0px 5px 0px 5px;
    7374}
     
    8586.kofa-breadcrumbs-box-short .well,
    8687.kofa-breadcrumbs-box-long .well,
    87 .kofa-student-status-box .well {
     88.kofa-student-status-box .well,
     89.kofa-maintenance .well {
    8890    padding: 5px 5px 5px 5px;
    8991}
     
    106108.kofa-student-status-box .well {
    107109    background-color: #909090;
     110}
     111
     112.maintenance-warning {
     113    text-align: center;
     114}
     115
     116.kofa-maintenance .well {
     117    background-color: red;
    108118}
    109119
  • main/waeup.kofa/trunk/layout/theme.html

    r12931 r13513  
    9090
    9191      <div class="row">
     92        <div class="col-md-12 container kofa-maintenance">
     93          <div class="well">
     94            <div class="maintenance-warning">
     95                M A I N T E N A N C E &nbsp;&nbsp;&nbsp; M O D E
     96            </div> <!-- /maintenance-warning -->
     97          </div> <!-- /well -->
     98        </div> <!-- /kofa-maintenance -->
     99      </div>
     100
     101      <div class="row">
    92102        <div class="col-md-12 container kofa-breadcrumbs-box-long">
    93103          <div class="well">
     
    115125            </ol><!-- /kofa-breadcrumbs -->
    116126          </div> <!-- /well -->
    117         </div> <!-- /kofa-breadcrumbs-box-short -->
     127        </div> <!-- /kofa-breadcrumbs-box-long -->
    118128      </div>
    119129
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r13198 r13513  
    240240        return usertitle != 'Unauthenticated User'
    241241
     242    def isMaintenanceMode(self):
     243        """Return True if portal is in maintenance mode.
     244        """
     245        if grok.getSite()['configuration'].maintmode_enabled_by:
     246            return True
     247        return False
     248
    242249    def getUserTitle(self):
    243250        """Return principal title of current user.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt

    r12901 r13513  
    6363      <tal:languages tal:content="structure langs" /> |
    6464    </span>
     65
     66    <!-- Diazo element-->
     67    <span tal:condition="layout/isMaintenanceMode">
     68      <div class="maintenance-warning" i18n:translate="">
     69          M A I N T E N A N C E &nbsp;&nbsp;&nbsp;
     70          M O D E &nbsp;&nbsp;&nbsp; O N
     71      </div>
     72    </span>
     73    <!-- /Diazo element-->
    6574
    6675    <!-- Diazo element-->
Note: See TracChangeset for help on using the changeset viewer.