Changes in [1799:a5868fc53e27:1900:2f3810424936]
- Location:
- plugins/pages
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/pages/index.php
r1179 r1888 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 $act = (!empty($_REQUEST['act']) && $_REQUEST['act'] == 'page') ? 'page': 'list';14 $act = !empty($_REQUEST['act']) ? $_REQUEST['act'] : 'list'; 15 15 16 16 17 17 if ($act == 'page') { 18 18 include dirname(__FILE__).'/page.php'; 19 } else if ($act == 'actions') { 20 include dirname(__FILE__).'/pages_actions.php'; 19 21 } else { 20 22 include dirname(__FILE__).'/list.php'; 21 23 } 22 23 ?> -
plugins/pages/list.php
r1464 r1893 31 31 32 32 $html_block = 33 '<table class=" clear"><tr>'.34 '<th colspan=" 2">'.__('Title').'</th>'.33 '<table class="maximal dragable"><thead><tr>'. 34 '<th colspan="3">'.__('Title').'</th>'. 35 35 '<th>'.__('Date').'</th>'. 36 36 '<th>'.__('Author').'</th>'. … … 38 38 '<th>'.__('Trackbacks').'</th>'. 39 39 '<th>'.__('Status').'</th>'. 40 '</tr> %s</table>';40 '</tr></thead><tbody id="pageslist">%s</tbody></table>'; 41 41 42 42 if ($enclose_block) { … … 50 50 echo $blocks[0]; 51 51 52 $count = 0; 52 53 while ($this->rs->fetch()) 53 54 { 54 echo $this->postLine(); 55 echo $this->postLine($count); 56 $count ++; 55 57 } 56 58 … … 61 63 } 62 64 63 private function postLine( )65 private function postLine($count) 64 66 { 65 67 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; … … 100 102 101 103 $res .= 104 '<td class="nowrap handle minimal">'.form::field(array('order['.$this->rs->post_id.']'),2,3,$count+1,'position','',false,'title="'.sprintf(__('position of %s'),html::escapeHTML($this->rs->post_title)).'"').'</td>'. 102 105 '<td class="nowrap">'. 103 106 form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>'. … … 145 148 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 146 149 { 147 $combo_action[__('Publish')] = 'publish'; 148 $combo_action[__('Unpublish')] = 'unpublish'; 149 $combo_action[__('Schedule')] = 'schedule'; 150 $combo_action[__('Mark as pending')] = 'pending'; 151 } 152 if ($core->auth->check('admin',$core->blog->id)) { 153 $combo_action[__('Change author')] = 'author'; 150 $combo_action[__('Status')] = array( 151 __('Publish') => 'publish', 152 __('Unpublish') => 'unpublish', 153 __('Schedule') => 'schedule', 154 __('Mark as pending') => 'pending' 155 ); 156 } 157 $combo_action[__('Change')] = array( 158 __('Change language') => 'lang' 159 ); 160 if ($core->auth->check('admin',$core->blog->id)) 161 { 162 $combo_action[__('Change')] = array_merge($combo_action[__('Change')], array( 163 __('Change author') => 'author') 164 ); 154 165 } 155 166 if ($core->auth->check('delete,contentadmin',$core->blog->id)) 156 167 { 157 $combo_action[__('Delete')] = 'delete'; 168 $combo_action[__('Delete')] = array( 169 __('Delete') => 'delete' 170 ); 158 171 } 159 172 … … 167 180 <head> 168 181 <title><?php echo __('Pages'); ?></title> 169 <script type="text/javascript" src="js/_posts_list.js"></script> 182 <?php 183 echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 184 dcPage::jsLoad('index.php?pf=pages/list.js'); 185 ?> 170 186 <script type="text/javascript"> 171 187 //<![CDATA[ … … 190 206 # Show pages 191 207 $post_list->display($page,$nb_per_page, 192 '<form action="p osts_actions.php" method="post" id="form-entries">'.208 '<form action="plugin.php?p=pages&act=actions" method="post" id="form-entries">'. 193 209 194 210 '%s'. … … 202 218 form::hidden(array('post_type'),'page'). 203 219 form::hidden(array('redir'),html::escapeHTML($_SERVER['REQUEST_URI'])). 220 '</div>'. 204 221 $core->formNonce(). 205 '</div>'. 222 '<br class="clear"/>'. 223 '<input type="submit" value="'.__('Save categories order').'" name="reorder" class="clear"/>'. 206 224 '</form>'); 207 225 }
Note: See TracChangeset
for help on using the changeset viewer.