Changeset 1392:f654316f6e43 for plugins/attachments
- Timestamp:
- 08/16/13 10:39:47 (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/attachments/_admin.php
r1365 r1392 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 $core->addBehavior ('adminPostFormSidebar ',array('attachmentAdmin','adminPostFormSidebar'));14 $core->addBehavior ('adminPostFormSidebarItems',array('attachmentAdmin','adminPostFormSidebarItems')); 15 15 $core->addBehavior ('adminPostAfterForm',array('attachmentAdmin','adminPostAfterForm')); 16 $core->addBehavior('adminPostHeaders',array('attachmentAdmin','postHeaders')); 16 17 17 18 class attachmentAdmin 18 19 { 19 public static function adminPostFormSidebar($post) 20 public static function postHeaders() 21 { 22 return 23 '<script type="text/javascript" src="index.php?pf=attachments/js/post.js"></script>'; 24 } 25 public static function adminPostFormSidebarItems($items,$post) 20 26 { 21 27 if ($post !== null) … … 23 29 $core =& $GLOBALS['core']; 24 30 $post_media = $core->media->getPostMedia($post->post_id); 25 echo 26 '<h5 class="clear">'.__('Attachments').'</h5>'; 31 $item = '<h5 class="clear s-attachments">'.__('Attachments').'</h5>'; 27 32 foreach ($post_media as $f) 28 33 { … … 31 36 $ftitle = substr($ftitle,0,16).'...'; 32 37 } 33 echo34 '<div class="media-item ">'.38 $item .= 39 '<div class="media-item s-attachments">'. 35 40 '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'. 36 41 '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. … … 53 58 54 59 if (empty($post_media)) { 55 echo '<p class="form-note">'.__('No attachment.').'</p>';56 } else {57 }58 echo '<p><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>';60 $item .= '<p class="form-note s-attachments">'.__('No attachment.').'</p>'; 61 } 62 $item .= '<p class="s-attachments"><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>'; 63 $items['metas-box']['items']['attachments']= $item; 59 64 } 60 65 }
Note: See TracChangeset
for help on using the changeset viewer.