예제 #1
0
파일: edit.php 프로젝트: rair/yacs
     $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');
 }
 // locations
 $box = '';
 if ($cur_article->allows('creation', 'location')) {
     $menu = array('locations/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add a location'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Locations::list_by_date_for_anchor('article:' . $item['id'], 0, 50, 'article:' . $item['id'])) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
     $text .= Skin::build_box(i18n::s('Locations'), $box, 'folded');
 }
 // tables
 $box = '';
 if ($cur_article->allows('creation', 'table')) {
     $menu = array('tables/edit.php?anchor=' . urlencode('article:' . $item['id']) => i18n::s('Add a table'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Tables::list_by_date_for_anchor('article:' . $item['id'], 0, 50, 'article:' . $item['id'])) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
예제 #2
0
파일: edit.php 프로젝트: rair/yacs
     $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) {
     $text .= Skin::build_box(i18n::s('Locations'), $box, 'folded');
 }
 // tables
 $box = '';
 if (Tables::allow_creation($item, $anchor, 'section')) {
     $menu = array('tables/edit.php?anchor=' . urlencode('section:' . $item['id']) => i18n::s('Add a table'));
     $box .= Skin::build_list($menu, 'menu_bar');
 }
 if ($items = Tables::list_by_date_for_anchor('section:' . $item['id'], 0, 50, 'section:' . $item['id'])) {
     $box .= Skin::build_list($items, 'decorated');
 }
 if ($box) {
예제 #3
0
파일: edit.php 프로젝트: rair/yacs
 // splash message for new items
 if (!isset($item['id'])) {
     $text .= Skin::build_box(i18n::s('Images'), '<p>' . i18n::s('Submit the new page, and you will be able to add images afterwards.') . '</p>', 'folded');
 } elseif ($items = Images::list_by_date_for_anchor('user:'******'id'])) {
     $text .= Skin::build_box(i18n::s('Images'), Skin::build_list($items, 'decorated'), 'unfolded', 'edit_images');
 }
 // if we are editing an existing profile
 if (isset($item['id'])) {
     // files are reserved to authenticated members
     if ($items = Files::list_embeddable_for_anchor('user:'******'id'], 0, 50)) {
         $text .= Skin::build_box(i18n::s('Files'), Skin::build_list($items, 'decorated'), 'unfolded');
     }
     // locations are reserved to authenticated members
     if (Locations::allow_creation($item, null)) {
         $menu = array('locations/edit.php?anchor=' . urlencode('user:'******'id']) => i18n::s('Add a location'));
         $items = Locations::list_by_date_for_anchor('user:'******'id'], 0, 50, 'user:'******'id']);
         $text .= Skin::build_box(i18n::s('Locations'), Skin::build_list($menu, 'menu_bar') . Skin::build_list($items, 'decorated'), 'folded');
     }
     // tables are reserved to associates
     if (Tables::allow_creation($item, null)) {
         $menu = array('tables/edit.php?anchor=' . urlencode('user:'******'id']) => i18n::s('Add a table'));
         $items = Tables::list_by_date_for_anchor('user:'******'id'], 0, 50, 'user:'******'id']);
         $text .= Skin::build_box(i18n::s('Tables'), Skin::build_list($menu, 'menu_bar') . Skin::build_list($items, 'decorated'), 'folded');
     }
     // pgp key
     // 		$label = i18n::s('PGP key or certificate');
     // 		$input = '<textarea name="pgp_key" rows="5" cols="50">'.encode_field(isset($item['pgp_key'])?$item['pgp_key']:'').'</textarea>';
     // add a folded box
     // 		$text .= Skin::build_box(i18n::s('Public key'), $label.BR.$input, 'folded');
     // 		$fields = array();
 }