Пример #1
0
 if (is_object($overlay) && ($more_tabs = $overlay->get_tabs('edit', $item))) {
     $panels = array_merge($panels, $more_tabs);
 }
 //
 // resources tab
 //
 $text = '';
 // resources attached to this anchor, but not on page creation
 if (isset($item['id'])) {
     // images
     $box = '';
     if ($cur_article->allows('creation', 'image')) {
         $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) {
Пример #2
0
Файл: edit.php Проект: rair/yacs
 }
 //
 // resources tab
 //
 $text = '';
 // splash message for new items
 if (!isset($item['id'])) {
     $text .= '<p>' . i18n::s('Submit the new item, and you will be able to add resources afterwards.') . '</p>';
 } else {
     // images
     $box = '';
     if (Images::allow_creation($item, $anchor, 'section')) {
         $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) {
Пример #3
0
Файл: edit.php Проект: rair/yacs
 $fields[] = array($label, $input);
 // build the form
 $text .= Skin::build_form($fields);
 $fields = array();
 // display in a separate panel
 if ($text) {
     $panels[] = array('information', i18n::s('Information'), 'information_panel', $text);
 }
 //
 // resources tab
 //
 $text = '';
 // splash message for new items
 if (!isset($item['id'])) {
     $text .= '<p>' . i18n::s('Submit the new item, and you will be able to add resources afterwards.') . '</p>';
 } elseif ($items = Images::list_by_date_for_anchor('file:' . $item['id'])) {
     $text .= Skin::build_box(i18n::s('Images'), Skin::build_list($items, 'decorated'), 'unfolded', 'edit_images');
 }
 // display in a separate panel
 if ($text) {
     $panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
 }
 //
 // options tab
 //
 $text = '';
 // associates may change the active flag: Yes/public, Restricted/logged, No/associates
 if (Surfer::is_member()) {
     $label = i18n::s('Access');
     $input = Skin::build_active_set_input($item);
     $hint = Skin::build_active_set_hint($anchor);
Пример #4
0
Файл: edit.php Проект: rair/yacs
 }
 //
 // resources tab
 //
 $text = '';
 // splash message for new items
 if (!isset($item['id'])) {
     $text .= '<p>' . i18n::s('Submit the new item, and you will be able to add resources afterwards.') . '</p>';
 } else {
     // images
     $box = '';
     if (Images::allow_creation($item, $anchor, 'category')) {
         $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) {