Dotclear

source: inc/admin/default-templates/layout.html.twig @ 1089:049be1a46863

Revision 1089:049be1a46863, 5.6 KB checked in by JcDenis, 13 years ago (diff)
  • Better way to fill in complex page title
  • Group all types of messages
  • Fix aboutConfig form submit
  • Clean up uggly tabs on inline doc
Line 
1{% import "js_helpers.html.twig" as js %}
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{current_user.lang}}" lang="{{current_user.lang}}">
4<head>
5     {% block header %}
6     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7     <title>{% block title %}{% for part in page_title %}{{ part.title }} - {% endfor %}{% if current_blog.name is not empty %}{{current_blog.name}} - {% endif %}{{vendor_name}} - {{version}}{% endblock %}</title>
8     <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
9     <meta name="GOOGLEBOT" content="NOSNIPPET" />
10     <link rel="stylesheet" href="{{theme_url}}style/default.css" type="text/css" media="screen" />
11     {% if rtl is not empty %}
12     <link rel="stylesheet" href="{{theme_url}}style/default-rtl.css" type="text/css" media="screen" />
13     {% endif %}
14     {{ js.load_IE7 }}
15     {{ js.common }}
16     {% endblock %}
17</head>
18
19<body id="dotclear-admin{% if safe_mode %} safe-mode{% endif %}">
20     <div id="header">
21          <ul id="prelude">
22               <li><a href="#content">{{__('To content')}}</a></li>
23               <li><a href="#main-menu">{{__('To menu')}}</a></li>
24          </ul>
25          <div id="top"><h1><a href="index.php">{{vendor_name}}</a></h1></div>
26          <div id="info-boxes">
27               <div id="info-box1">
28                 {% form switchblog_menu %}
29                    {% if blog_count > 1 and blog_count < 20 %}
30                         <p>{{ form_field('switchblog') }}</p>
31                         <noscript><p>{{ form_field('switchblog_submit') }}</p></noscript>
32                    {% else %}
33                         <p>{{__('Blog:')}} <strong title="{{current_blog.url}}">{{current_blog.name}}</strong>
34                         {% if blogs is not empty %} - <a href="blogs.php">{{__('Change blog')}}</a>{% endif %}</p>
35                    {% endif %}
36                    <p><a href="{{current_blog.url}}" onclick="window.open(this.href);return false;" title="{{__('Go to site')}} ({{__('new window')}})">{{__('Go to site')}} <img src="{{theme_url}}images/outgoing.png" alt="" /></a></p>
37                 {% endform %}
38               </div>
39               <div id="info-box2">
40                    <a {%if current_page == 'index' %}class="active" {% endif %}href="index.php">{{__('My dashboard')}}</a><span> | </span>
41                    <a {%if current_page == 'preferences' %}class="active" {% endif %}href="preferences.php">{{__('My preferences')}}</a><span> | </span>
42                    <a href="index.php?logout=1" class="logout">{{__('Logout %s')|format(current_user.id)}} <img src="{{theme_url}}images/logout.png" alt="" /></a>
43               </div>
44          </div>
45     </div>
46     <div id="wrapper">
47          <div id="main">
48               <div id="content">
49                    {% block content %}
50                    {% if safe_mode %}
51                         <div class="error"><h3>{{__('Safe mode')}}</h3>
52                         <p>{{__('You are in safe mode. All plugins have been temporarily disabled. Remind to log out then log in again normally to get back all functionalities')}}</p>
53                         </div>
54                    {% endif %}
55                    <h2>
56                         {%- if not page_global %}{{current_blog.name}} &rsaquo; {% endif %}
57                         {%- for part in page_title %}
58                              {%- if loop.last %}<span class="page-title">{% endif %}
59                              {%- if part.link is not empty %}<a href="{{ part.link }}">{{ part.title }}</a>{% else %}{{ part.title }}{% endif %}
60                              {%- if loop.last %}</span>{% else %} &rsaquo; {% endif %}
61                         {%- endfor -%}
62                    </h2>
63                    {% if messages.static is not empty %}
64                         {% for message in messages.static %}
65                              <p class="static-msg">{{ message }}</p>
66                         {% endfor %}
67                    {% endif %}
68                    {% if messages.lists is not empty %}
69                         {% for title,messages in messages.lists %}
70                              <div class="static-msg">{{ title }}<ul>
71                              {% for message in messages %}
72                                   <li>{{ message }}</li>
73                              {% endfor %}
74                              </ul></div>
75                         {% endfor %}
76                    {% endif %}
77                    {% if messages.alert is not empty %}
78                         <p class="message">{{ messages.alert }}</p>
79                    {% endif %}
80                    {% if messages.errors is not empty %}
81                         <div class="error">
82                              <p><strong>Errors :</strong></p>
83                              <ul>
84                              {% for error in messages.errors %}
85                                   <li>{{ error }}</li>
86                              {% endfor %}
87                              </ul>
88                         </div>
89                    {% endif %}
90                    {% endblock %}
91
92               </div>
93          </div>
94          <div id="main-menu">
95               {% block menus %}
96               {% for menu in menus %}
97               {% if menu.items is not empty %}
98               <div id="{{menu.id}}">
99                    {% if menu.title is not empty %}<h3>{{menu.title}}</h3>{% endif %}
100                    <ul>
101                    {% for item in menu.items %}
102                    {% spaceless %}
103                    <li {% if item.active or item.class is not empty %} class="{% if item.active %}active {% endif %}{{item.class}}"{% endif %}
104                    {% if item.id is not empty %}id="{{item.id}}" {% endif %}
105                    {% if item.img is not empty %} style="background-image: url({{item.img}});"{% endif %}
106                    ><a href="{{item.link}}"{{item.ahtml}}>{{item.title}}</a>
107                    {% if loop.last %}{{menu.separator}}{% endif %}</li>
108                    {% endspaceless %}
109                    {% endfor %}
110                    </ul>
111               </div>
112               {% endif %}
113               {% endfor %}
114               {% endblock %}
115          </div>
116          <div id="footer">
117               {% block footer %}
118               <p>{{ __('Thank you for using %s.')|format(vendor_name) }}</p>
119               {% endblock %}
120          </div>
121     </div>
122     {% block debug %}
123       {% set debug_info = debug_info() %}
124       {% if debug_info is not empty %}
125          <div id="debug"><div>
126          <p>memory usage: {{ debug_info.memory.usage }} ({{ debug_info.memory.size }})</p>
127          {% if debug_info.xdebug is not empty %}
128            <p>Elapsed time: {{ debug_info.xdebug.elapse_time }} seconds</p>
129            {% if debug_info.xdebug.profiler_file is not empty %}
130               <p>Profiler file : {{ debug_info.xdebug.profiler_file }}</p>
131            {% else %}
132               <p><a href="{{ debug_info.xdebug.profiler_url }}">Trigger profiler</a></p>
133            {% endif %}
134          {% endif %}
135          <p>Global vars: {{ debug_info.global_vars }}</p>
136          </div></div>
137       {% endif %}
138     {% endblock %}
139     </body>
140</html>
Note: See TracBrowser for help on using the repository browser.

Sites map