Beispiel #1
0
     $menu = array('images/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add an image'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Images::list_by_date_for_anchor('section:' . $item['id'])) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
     $text .= Skin::build_box(i18n::s('Images'), $box, 'folded');
 }
 // files
 $box = '';
 if (Files::allow_creation($item, $anchor, 'section')) {
     $menu = array('files/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add a file'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Files::list_embeddable_for_anchor('section:' . $item['id'], 0, 50)) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
     $text .= Skin::build_box(i18n::s('Files'), $box, 'folded');
 }
 // locations
 $box = '';
 if (Locations::allow_creation($item, $anchor, 'section')) {
     $menu = array('locations/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add a location'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Locations::list_by_date_for_anchor('section:' . $item['id'], 0, 50, 'section:' . $item['id'])) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
Beispiel #2
0
         $menu = array('images/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add an image'));
         $box .= Skin::build_list($menu, 'menu_bar');
     }
     if ($items = Images::list_by_date_for_anchor('article:' . $item['id'])) {
         $box .= Skin::build_list($items, 'decorated');
     }
     if ($box) {
         $text .= Skin::build_box(i18n::s('Images'), $box, 'folded');
     }
     // files
     $box = '';
     if ($cur_article->allows('creation', 'file')) {
         $menu = array('files/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add a file'));
         $box .= Skin::build_list($menu, 'menu_bar');
     }
     if ($items = Files::list_embeddable_for_anchor('article:' . $item['id'], 0, 50)) {
         $box .= Skin::build_list($items, 'decorated');
     }
     if ($box) {
         $text .= Skin::build_box(i18n::s('Files'), $box, 'folded');
     }
 }
 // display in a separate panel
 if ($text) {
     $panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
 }
 //
 // options tab is visible only to site associates
 //
 if (Surfer::is_associate()) {
     $text = '';
Beispiel #3
0
         $menu = array('images/edit.php?anchor=' . urlencode('category:' . $item['id']) => i18n::s('Add an image'));
         $box .= Skin::build_list($menu, 'menu_bar');
     }
     if ($items = Images::list_by_date_for_anchor('category:' . $item['id'])) {
         $box .= Skin::build_list($items, 'decorated');
     }
     if ($box) {
         $text .= Skin::build_box(i18n::s('Images'), $box, 'folded');
     }
     // files
     $box = '';
     if (Files::allow_creation($item, $anchor, 'category')) {
         $menu = array('files/edit.php?anchor=' . urlencode('category:' . $item['id']) => i18n::s('Add a file'));
         $box .= Skin::build_list($menu, 'menu_bar');
     }
     if ($items = Files::list_embeddable_for_anchor('category:' . $item['id'], 0, 50)) {
         $box .= Skin::build_list($items, 'decorated');
     }
     if ($box) {
         $text .= Skin::build_box(i18n::s('Files'), $box, 'folded');
     }
 }
 // display in a separate panel
 if ($text) {
     $panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
 }
 //
 // options tab
 //
 $text = '';
 // the active flag: Yes/public, Restricted/logged, No/associates --we don't care about inheritance, to enable security changes afterwards