1 | {% extends "layout.html.twig" %} |
---|
2 | {% import "js_helpers.html.twig" as js %} |
---|
3 | {% block header %} |
---|
4 | {{ parent() }} |
---|
5 | {{ js.tool_bar }} |
---|
6 | <script type="text/javascript" src="{{theme_url}}js/_index.js"></script> |
---|
7 | {% endblock %} |
---|
8 | |
---|
9 | {% block content %} |
---|
10 | {{ parent() }} |
---|
11 | |
---|
12 | {% if current_user.default_blog != current_blog.id and blog_count > 1 %} |
---|
13 | <p><a href="index.php?default_blog=1" class="button">{{__('Make this blog my default blog')}}</a></p> |
---|
14 | {% endif %} |
---|
15 | |
---|
16 | {# Check if we need place for dashboard items #} |
---|
17 | {% set has_dashboard_items = updater is not empty or modules_errors is not empty or dashboard_doclinks is not empty or dsahboard_dcnews is not empty or dashboard_items is not empty %} |
---|
18 | |
---|
19 | <div id="dashboard-main"{% if not has_dashboard_items %} class="fullwidth"{% endif %}> |
---|
20 | <div id="icons"> |
---|
21 | {% for icon in dashboard_icons %} |
---|
22 | <p><a href="{{ icon[1] }}"><img src="{{ icon[2] }}" alt="" /> |
---|
23 | <br /><span>{{ icon[0] }}</span></a></p> |
---|
24 | {% endfor %} |
---|
25 | </div> |
---|
26 | |
---|
27 | {% if dashboard_quickentry %} |
---|
28 | <div id="quick"> |
---|
29 | <h3>{{__('Quick entry')}}</h3> |
---|
30 | {% form 'quickentry' %} |
---|
31 | <fieldset><legend>{{__('New entry')}}</legend> |
---|
32 | <p class="col">{{ form_field('post_title',{'class':'maximal'}) }}</p> |
---|
33 | <p class="area">{{ form_field('post_content',{'rows':current_user.options.edit_size,'cols':5}) }}</p> |
---|
34 | <p>{{ form_field('cat_id')}}</p> |
---|
35 | <p>{{ form_field('save')}}{{form_hidden()}}</p> |
---|
36 | </fieldset> |
---|
37 | {% endform %} |
---|
38 | </div> |
---|
39 | {% endif %} |
---|
40 | |
---|
41 | {% if dashboard_contents is not empty %} |
---|
42 | <div id="dashboard-contents"> |
---|
43 | {% for content in dashboard_contents %} |
---|
44 | {{ content }} |
---|
45 | {% endfor %} |
---|
46 | </div> |
---|
47 | {% endif %} |
---|
48 | </div> |
---|
49 | |
---|
50 | {% if has_dashboard_items %} |
---|
51 | <div id="dashboard-items"> |
---|
52 | {% if updater is not empty %} |
---|
53 | <div id="upg-notify" class="static-msg"> |
---|
54 | <p>{{ __('Dotclear %s is available!')|format(updater.new_version)}}</p> |
---|
55 | <ul> |
---|
56 | <li><strong><a href="update.php">{{__('Upgrade now')|format(updater.new_version)}}</a></strong></li> |
---|
57 | <li><a href="update.php?hide_msg=1">{{__('Remind me later')}}</a></li> |
---|
58 | {% if updater.version_info is not empty %} |
---|
59 | <li><a href="{{ updater.version_info }}">{{__('information about this version')}}</a></li> |
---|
60 | {% endif %} |
---|
61 | </ul> |
---|
62 | </div> |
---|
63 | {% endif %} |
---|
64 | {% if modules_errors is not empty %} |
---|
65 | <div id="module-errors" class="error"><p>{{__('Some plugins are installed twice:')}}</p> |
---|
66 | <ul> |
---|
67 | {% for error in modules_errors %} |
---|
68 | <li>{{ error }}</li> |
---|
69 | {% endfor %} |
---|
70 | </ul> |
---|
71 | </div> |
---|
72 | {% endif %} |
---|
73 | {% if dashboard_doclinks is not empty %} |
---|
74 | <div> |
---|
75 | <h3>{{__('Documentation and support')}}</h3> |
---|
76 | <ul> |
---|
77 | {% for title,link in dashboard_doclinks %} |
---|
78 | <li><a href="{{ link }}" title="{{ title }} {{__('(external link)')}}">{{ title }}</a></li> |
---|
79 | {% endfor %} |
---|
80 | </ul> |
---|
81 | </div> |
---|
82 | {% endif %} |
---|
83 | {% if dashboard_dcnews is not empty %} |
---|
84 | <div> |
---|
85 | <h3>{{__('Latest news')}}</h3> |
---|
86 | <dl id="news"> |
---|
87 | {% for news in dashboard_dcnews %} |
---|
88 | <dt>{% if news.link is not empty %}<a href="{{ news.link }}" title="{{ news.title }} {{__('(external link)')}}">{{ news.title }}</a>{% else %}{{ news.title }}{% endif %}</dt> |
---|
89 | {% if loop.index < 3 %} |
---|
90 | <dd><p><strong>{{ news.date }}</strong>: <em>{{ news.content|slice(0,120) }}...</em></p></dd> |
---|
91 | {% else %} |
---|
92 | <dd>{{ news.date }}</dd> |
---|
93 | {% endif %} |
---|
94 | {% endfor %} |
---|
95 | </dl> |
---|
96 | </div> |
---|
97 | {% endif %} |
---|
98 | {% if dashboard_items is not empty %} |
---|
99 | <div> |
---|
100 | {% for item in dashboard_items %} |
---|
101 | {{ item }} |
---|
102 | {% endfor %} |
---|
103 | </div> |
---|
104 | {% endif %} |
---|
105 | </div> |
---|
106 | {% endif %} |
---|
107 | {% endblock %} |
---|