Changeset 1490:60501ef579eb for inc/admin/lib.dc.page.php
- Timestamp:
- 08/19/13 08:04:33 (12 years ago)
- Branch:
- twig
- Parents:
- 1489:f2398e7f3395 (diff), 1466:e67efe636ce1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/admin/lib.dc.page.php
r1461 r1490 49 49 50 50 # Top of admin page 51 public static function open($title='', $head='',$breadcrumb='')51 public static function open($title='', $head='') 52 52 { 53 53 global $core; … … 159 159 } 160 160 161 // Display breadcrumb (if given) before any error message162 echo $breadcrumb;163 164 161 if ($core->error->flag()) { 165 162 echo … … 213 210 } 214 211 215 public static function openPopup($title='', $head='',$breadcrumb='')212 public static function openPopup($title='', $head='') 216 213 { 217 214 global $core; … … 258 255 '<div id="content">'."\n"; 259 256 260 // display breadcrumb if given261 echo $breadcrumb;262 263 257 if ($core->error->flag()) { 264 258 echo … … 279 273 } 280 274 281 public static function breadcrumb($elements=null,$ with_home_link=true,$echo=false)275 public static function breadcrumb($elements=null,$no_home_link=false) 282 276 { 283 277 // First item of array elements should be blog's name, System or Plugins 284 $res = '<h2>'.($ with_home_link ?285 '< a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>' :286 '< img src="style/dashboard-alt.png" alt="" />');278 $res = '<h2>'.($no_home_link ? 279 '<img src="style/dashboard-alt.png" alt="" />' : 280 '<a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>'); 287 281 $index = 0; 288 282 foreach ($elements as $element => $url) { 289 $res .= ($with_home_link ? ($index == 1 ? ' : ' : ' › ') : ($index == 0 ? ' ' : ' › ')). 290 ($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 283 $res .= ($no_home_link ? ' ' : ($index == 1 ? ' : ' : ' › ')).($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 291 284 $index++; 292 285 } 293 286 $res .= '</h2>'; 294 if ($echo) {295 echo $res;296 }297 287 return $res; 298 288 } … … 365 355 { 366 356 $args = func_get_args(); 367 368 $args = new ArrayObject($args);369 370 # --BEHAVIOR-- adminPageHelpBlock371 $GLOBALS['core']->callBehavior('adminPageHelpBlock',$args);372 373 357 if (empty($args)) { 374 358 return; … … 476 460 self::jsVar('dotclear.msg.confirm_delete_post', 477 461 __("Are you sure you want to delete this entry?")). 478 self::jsVar('dotclear.msg.click_to_unlock',479 __("Click here to unlock the field")).480 462 self::jsVar('dotclear.msg.confirm_spam_delete', 481 463 __('Are you sure you want to delete all spams?')). … … 527 509 { 528 510 return 529 '<!--[if lt IE 9]>'."\n".530 self::jsLoad('js/ie7/IE 9.js').511 '<!--[if lt IE 8]>'."\n". 512 self::jsLoad('js/ie7/IE8.js'). 531 513 '<link rel="stylesheet" type="text/css" href="style/iesucks.css" />'."\n". 532 514 '<![endif]-->'."\n"; … … 730 712 '<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n". 731 713 714 '<script id="template-upload" type="text/x-tmpl"> 715 {% for (var i=0, file; file=o.files[i]; i++) { %} 716 <div class="template-upload fade"> 717 <div class="upload-file"> 718 <div class="upload-fileinfo"> 719 <span class="upload-filename">{%=file.name%}</span> 720 <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> 721 <span class="upload-filecancel cancel">'.__('Cancel').'</span> 722 {% if (!o.files.error && !i && !o.options.autoUpload) { %} 723 <input type="submit" class="button start" value="'.__('Send').'"/> 724 {% } %} 725 <span class="upload-filemsg"></span> 726 </div> 727 {% if (!o.files.error) { %} 728 <div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div> 729 {% } %} 730 </div> 731 {% } %} 732 </script> 733 <!-- The template to display files available for download --> 734 <script id="template-download" type="text/x-tmpl"> 735 {% for (var i=0, file; file=o.files[i]; i++) { %} 736 <div class="template-download fade"> 737 <div class="upload-file"> 738 <div class="upload-fileinfo"> 739 <span class="upload-filename">{%=file.name%}</span> 740 <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span> 741 <span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}"> 742 {% if (file.error) { %} 743 '.__('Error:').' {%=file.error%} 744 {% } else { %} 745 '.__('File successfully uploaded.').' 746 {% } %} 747 </span> 748 </div> 749 <div class="upload-progress"> 750 {% if (!file.error) { %} 751 <div class="bar" style="width:100%;">100%</div> 752 {% } %} 753 </div> 754 </div> 755 {% } %} 756 </script>'. 757 758 self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js'). 759 self::jsLoad('js/jsUpload/tmpl.js'). 760 self::jsLoad('js/jsUpload/load-image.js'). 761 self::jsLoad('js/jsUpload/jquery.iframe-transport.js'). 762 self::jsLoad('js/jsUpload/jquery.fileupload.js'). 763 self::jsLoad('js/jsUpload/jquery.fileupload-process.js'). 764 self::jsLoad('js/jsUpload/jquery.fileupload-resize.js'). 765 self::jsLoad('js/jsUpload/jquery.fileupload-ui.js'). 766 732 767 '<script type="text/javascript">'."\n". 733 768 "//<![CDATA[\n". … … 746 781 self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')). 747 782 self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')). 748 self::jsVar('dotclear.jsUpload.msg.send',__('Send')).749 self::jsVar('dotclear.jsUpload.msg.file_successfully_uploaded',__('File successfully uploaded.')).750 783 self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')). 751 784 self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')). … … 754 787 self::jsVar('dotclear.jsUpload.base_url',$base_url). 755 788 "\n//]]>\n". 756 "</script>\n". 757 758 self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js'). 759 self::jsLoad('js/jsUpload/tmpl.js'). 760 self::jsLoad('js/jsUpload/template-upload.js'). 761 self::jsLoad('js/jsUpload/template-download.js'). 762 self::jsLoad('js/jsUpload/load-image.js'). 763 self::jsLoad('js/jsUpload/jquery.iframe-transport.js'). 764 self::jsLoad('js/jsUpload/jquery.fileupload.js'). 765 self::jsLoad('js/jsUpload/jquery.fileupload-process.js'). 766 self::jsLoad('js/jsUpload/jquery.fileupload-resize.js'). 767 self::jsLoad('js/jsUpload/jquery.fileupload-ui.js'); 789 "</script>\n"; 768 790 } 769 791
Note: See TracChangeset
for help on using the changeset viewer.