Changeset 1822:3d35d7f9cf37 for admin/post.php
- Timestamp:
- 09/08/13 13:33:57 (12 years ago)
- Branch:
- Ticket #1539
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post.php
r1816 r1822 51 51 52 52 # Getting categories 53 $categories_combo = array(' ' => ''); 54 try { 55 $categories = $core->blog->getCategories(array('post_type'=>'post')); 56 while ($categories->fetch()) { 57 $categories_combo[] = new formSelectOption( 58 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 59 $categories->cat_id 60 ); 61 } 62 } catch (Exception $e) { } 63 64 # Status combo 65 foreach ($core->blog->getAllPostStatus() as $k => $v) { 66 $status_combo[$v] = (string) $k; 67 } 53 $categories_combo = dcAdminCombos::getCategoriesCombo( 54 $core->blog->getCategories(array('post_type'=>'post')) 55 ); 56 57 $status_combo = dcAdminCombos::getPostStatusesCombo(); 58 68 59 $img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />'; 69 60 70 61 # Formaters combo 71 foreach ($core->getFormaters() as $v) { 72 $formaters_combo[$v] = $v; 73 } 62 $formaters_combo = dcAdminCombos::getFormatersCombo(); 74 63 75 64 # Languages combo 76 65 $rs = $core->blog->getLangs(array('order'=>'asc')); 77 $all_langs = l10n::getISOcodes(0,1); 78 $lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1)); 79 while ($rs->fetch()) { 80 if (isset($all_langs[$rs->post_lang])) { 81 $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang; 82 unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]); 83 } else { 84 $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang; 85 } 86 } 87 unset($all_langs); 88 unset($rs); 66 $lang_combo = dcAdminCombos::getLangsCombo($rs,true); 89 67 90 68 # Validation flag … … 305 283 306 284 # Getting categories 307 $categories_combo = array(__('(No cat)') => ''); 308 try { 309 $categories = $core->blog->getCategories(array('post_type'=>'post')); 310 if (!$categories->isEmpty()) { 311 while ($categories->fetch()) { 312 $catparents_combo[] = $categories_combo[] = new formSelectOption( 313 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 314 $categories->cat_id 315 ); 316 } 317 } 318 } catch (Exception $e) { } 319 285 $categories_combo = dcAdminCombos::getCategoriesCombo( 286 $core->blog->getCategories(array('post_type'=>'post')) 287 ); 320 288 /* DISPLAY 321 289 -------------------------------------------------------- */ … … 446 414 '</p>'. 447 415 '<p class="format_control control_wiki">'. 448 '<a id="convert-xhtml" class="button maximal'.($post_id && $post_format != 'wiki' ? 'hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'.416 '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? 'hide' : '').'" href="post.php?id='.$post_id.'&xconv=1">'. 449 417 __('Convert to XHTML').'</a></p></div>')), 450 418 'metas-box' => array( … … 517 485 518 486 "post_excerpt" => 519 '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').' <span class="form-note">'.487 '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').' <span class="form-note">'. 520 488 __('Introduction to the post.').'</span></label> '. 521 489 form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). … … 529 497 530 498 "post_notes" => 531 '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').' <span class="form-note">'.499 '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').' <span class="form-note">'. 532 500 __('Unpublished notes.').'</span></label>'. 533 501 form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). … … 580 548 581 549 foreach ($sidebar_items as $id => $c) { 582 echo '<div id="'.$id.'" class=" box">'.550 echo '<div id="'.$id.'" class="sb-box">'. 583 551 '<h4>'.$c['title'].'</h4>'; 584 552 foreach ($c['items'] as $e_name=>$e_content) { … … 633 601 634 602 echo 635 '<div id="comments" class=" multi-part" title="'.__('Comments').'">';603 '<div id="comments" class="clear multi-part" title="'.__('Comments').'">'; 636 604 637 605 # --BEHAVIOR-- adminCommentsActionsCombo … … 640 608 $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty()); 641 609 echo 642 '<p class="top-add"><a class="button add onblog_link" href="#comment-form">'.__('Add a comment').'</a></p>';610 '<p class="top-add"><a class="button add" href="#comment-form">'.__('Add a comment').'</a></p>'; 643 611 644 612 if ($has_action) {
Note: See TracChangeset
for help on using the changeset viewer.