Esempio n. 1
0
File: edit.php Progetto: rair/yacs
     }
     // 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) {
         $text .= Skin::build_box(i18n::s('Tables'), $box, 'folded');
     }
 }
 // display in a separate panel
 if ($text) {
     $panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
 }
 //
Esempio n. 2
0
File: edit.php Progetto: rair/yacs
     $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();
 }
 // display in a separate panel
 if ($text) {
     $panels[] = array('resources', i18n::s('Resources'), 'resources_panel', $text);
 }