Changeset 2321:3ab5e6c3d301 for inc
- Timestamp:
- 10/09/13 15:21:14 (12 years ago)
- Branch:
- twig
- Location:
- inc/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/class.dc.admincontext.php
r1507 r2321 63 63 } 64 64 } 65 66 public function __isset($name) { 67 if ($this->isAllowed($name,$this->attributes)) { 68 return isset($this->object->$name); 69 } else { 70 return false; 71 } 72 } 73 65 74 66 75 public function __call($name,$args) { … … 258 267 $p = path::info($_SERVER['REQUEST_URI']); 259 268 $this->protected_globals['current_page'] = $p['base']; 260 $this->protected_globals['blog_count'] = $this->core->auth-> blog_count;269 $this->protected_globals['blog_count'] = $this->core->auth->getBlogCount(); 261 270 $this->protected_globals['rtl'] = l10n::getTextDirection( 262 271 $this->protected_globals['current_user']['lang']) == 'rtl'; … … 266 275 'nonce' => $this->core->getNonce() 267 276 ); 268 269 277 # Keep protected globals safe 270 278 return array_merge($this->globals,$this->protected_globals); … … 421 429 # Blogs list 422 430 $blogs = array(); 423 if ($this->core->auth->blog_count > 1 && $this->core->auth->blog_count < 20) { 431 $blog_count = $this->core->auth->getBlogCount(); 432 if ($blog_count > 1 && $blog_count < 20) { 424 433 $blog_id = $this->core->blog->id; 425 434 $rs_blogs = $this->core->getBlogs(array('order'=>'LOWER(blog_name)','limit'=>20)); … … 446 455 $sform 447 456 ->addField( 448 new dcFieldText('q ','',array(457 new dcFieldText('qx','',array( 449 458 'maxlength' => 255, 450 459 'label' => __('Search:')))) … … 460 469 protected function getCurrentBlog() 461 470 { 462 $this->protected_globals['current_blog'] = $this->core->auth-> blog_count?463 new dcProxy($this->core->blog,array( 471 $this->protected_globals['current_blog'] = $this->core->auth->getBlogCount() ? 472 new dcProxy($this->core->blog,array('attr' => array( 464 473 'id','name','desc','url','host','creadt','upddt' 465 )) : array(474 ))) : array( 466 475 'id' => '', 467 476 'name' => '', -
inc/admin/default-templates/js_helpers.html.twig
r2313 r2321 293 293 {% endmacro %} 294 294 295 {% macro toggles() %} 296 <script type="text/javascript"> 297 //<![CDATA[ 298 dotclear.unfolded_sections = { {% for section in unfolded_sections %} '{{section}}':true {% if not loop.last %},{% endif %}{% endfor %} }; 299 //]]> 300 </script> 301 {% endmacro %} 302 295 303 {% macro tool_man() %} 296 304 <!-- jsToolMan --> -
inc/admin/default-templates/layout.html.twig
r1517 r2321 5 5 {% block header %} 6 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 7 <title>{% block title %}{{ (page_title|last).title|striptags }} - {% if current_blog.name is not empty %}{{current_blog.name}} - {% endif %}{{vendor_name}} - {{version}}{% endblock %}</title>8 7 <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" /> 9 8 <meta name="GOOGLEBOT" content="NOSNIPPET" /> 10 9 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 10 <title>{% block title %}{{ (page_title|last).title|striptags }} - {% if current_blog.name is not empty %}{{current_blog.name}} - {% endif %}{{vendor_name}} - {{version}}{% endblock %}</title> 11 {{ js.load_IE7 }} 11 12 <link rel="stylesheet" href="{{theme_url}}style/default.css" type="text/css" media="screen" /> 12 13 <link rel="icon" type="image/png" href="images/favicon.png" /> … … 14 15 <link rel="stylesheet" href="{{theme_url}}style/default-rtl.css" type="text/css" media="screen" /> 15 16 {% endif %} 16 {{ js.load_IE7 }}17 17 {{ js.common }} 18 {{ js.toggles }} 18 19 {% endblock %} 19 20 </head> 20 21 21 <body id="dotclear-admin{% if safe_mode %} safe-mode{% endif %}"> 22 <body id="dotclear-admin{% if safe_mode %} safe-mode{% endif %}" class="no-js"> 23 {% block prelude %} 24 <ul id="prelude"> 25 <li><a href="#content">{{__('Go to the content')}}</a></li> 26 <li><a href="#main-menu">{{__('Go to the menu')}}</a></li> 27 <li><a href="#qx">{{__('Go to the search')}}</a></li> 28 <li><a href="#help">{{__('Go to help')}}</a></li> 29 </ul> 30 {% endblock %} 22 31 <div id="header"> 23 {% block prelude %} 24 <ul id="prelude"> 25 <li><a href="#content">{{__('To content')}}</a></li> 26 <li><a href="#main-menu">{{__('To menu')}}</a></li> 27 </ul> 28 {% endblock %} 29 <div id="top"><h1><a href="index.php">{{vendor_name}}</a></h1></div> 30 <div id="info-boxes"> 31 <div id="info-box1"> 32 {% form 'switchblog_menu' %} 33 34 {% if blog_count > 1 and blog_count < 20 %} 35 {{ form_field('switchblog',{},{'labelclass':'classic nomobile'}) }} 36 <noscript>{{ form_field('switchblog_submit') }}</noscript> 37 {% else %} 38 {{__('Blog:')}} <strong title="{{current_blog.url}}">{{current_blog.name}}</strong> 39 {% if blogs is not empty %} - <a href="blogs.php">{{__('Change blog')}}</a>{% endif %} 40 {% endif %} 41 <p class="nomobile"><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>{{form_hidden()}}</p> 42 {% endform %} 43 </div> 44 <div id="info-box2"> 45 <a class="smallscreen{%if current_page == 'index' %} active" {% endif %}" href="index.php">{{__('My dashboard')}}</a><span class="smallscreen"> | </span> 46 <a class="smallscreen{%if current_page == 'preferences' %} active" {% endif %}" href="preferences.php">{{__('My preferences')}}</a><span class="smallscreen"> | </span> 47 <a href="index.php?logout=1" class="logout">{{__('Logout %s')|format(current_user.id)}} <img src="{{theme_url}}images/logout.png" alt="" /></a> 48 </div> 32 <h1><a href="index.php"><span class="hidden">{{vendor_name}}</span></a></h1> 33 {% form 'switchblog_menu' with {"id":"top-info-blog"} %} 34 {% if blog_count > 1 and blog_count < 20 %} 35 <p>{{ form_field('switchblog',{},{'labelclass':'classic '}) }} {{ form_field('switchblog_submit', {"class":"hidden-if-js"}) }}</p> 36 {% else %} 37 {{__('Blog:')}} <strong title="{{current_blog.blog_url}}">{{current_blog.blog_name}}</strong> 38 {% if blogs is not empty %} - <a href="blogs.php">{{__('Change blog')}}</a>{% endif %} 39 {% endif %} 40 <p><a class="outgoing" href="{{current_blog.url}}" title="{{__('Go to site')}}">{{__('Go to site')}} <img src="{{theme_url}}images/outgoing.png" alt="" /></a>{{form_hidden()}}</p> 41 {% endform %} 42 <ul id="top-info-user"> 43 <li> <a class="smallscreen{%if current_page == 'index' %} active" {% endif %}" href="index.php">{{__('My dashboard')}}</a></li> 44 <li> <a class="smallscreen{%if current_page == 'preferences' %} active" {% endif %}" href="preferences.php">{{__('My preferences')}}</a></li> 45 <li><a href="index.php?logout=1" class="logout"><span class="nomobile">{{__('Logout %s')|format(current_user.id)}}</span> <img src="{{theme_url}}images/logout.png" alt="" /></a></li> 46 </ul> 47 </div> 48 <div id="wrapper" class="clearfix"> 49 <div class="hidden-if-no-js collapser-box"> 50 <a href="#" id="collapser"><img class="collapse-mm" src="images/collapser-hide.png" alt="{{ __('Hide main menu') }}" /> 51 <img class="expand-mm" src="images/collapser-show.png" alt="{{__('Show main menu') }}" /></a> 49 52 </div> 50 </div>51 <div id="wrapper">52 53 <div id="main"> 53 <div id="content" >54 <div id="content" class="clearfix"> 54 55 {% block content %} 55 56 {% if safe_mode %} 56 <div class=" error"><h3>{{__('Safe mode')}}</h3>57 <div class="warning"><h3>{{__('Safe mode')}}</h3> 57 58 <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> 58 59 </div> … … 100 101 {% block menus %} 101 102 {% form 'search-menu' with {'id':'search-menu'} %} 102 <p> {{ form_field('q ',{'size':30},{'labelclass':'hidden'}) }}103 <p> {{ form_field('qx',{'size':30},{'labelclass':'hidden'}) }} 103 104 {{ form_field('ok') }}{{form_hidden()}} 104 105 </p> … … 126 127 <div id="footer"> 127 128 {% block footer %} 128 <p>{{ __('Thank you for using %s.')|format(vendor_name) }}</p> 129 {% set text= __('Thank you for using %s.')|format(vendor_name~' '~version) %} 130 <a href="http://dotclear.org/" title="{{ text }}"> 131 <img src="style/dc_logos/w-dotclear90.png" alt="{{ text }}" /></a> 129 132 {% endblock %} 130 133 </div> 131 134 </div> 135 <!-- 136 137 ,;:'`':: 138 __|| 139 _____/LLLL\_ 140 \__________"| 141 ~^~^~^~^~^~^~^~^~^~ 142 --> 132 143 {#{% block debug %} 133 144 {% set debug_info = debug_info() %} -
inc/admin/default-templates/posts.html.twig
r1507 r2321 12 12 {{ js.page_tabs(default_tab) }} 13 13 {% endblock %} 14 { % block prelude %}14 {#{% block prelude %} 15 15 <ul id="prelude"> 16 16 <li><a href="#content">{{__('View this entry on site')}}</a></li> … … 19 19 {% endblock %} 20 20 21 21 #} 22 22 23 23 {% block content %}
Note: See TracChangeset
for help on using the changeset viewer.