$bullet_item .= href(l_nodes(),"Nodes");
$bullet_item .= ul_start();
$bullet_item .= plc_my_node_links();
- $bullet_item .= leaf( href (l_register_node(),"Register Node"));
+ if (plc_is_admin() || plc_is_pi() || plc_is_tech())
+ $bullet_item .= leaf( href (l_register_node(),"Register Node"));
$bullet_item .= ul_end();
$items [] = expanded($bullet_item);
font-size: larger;
}
-div.slice_add {
- padding: 20px 40px;
-}
-div.slice_add p {
- font-size: larger;
-* text-align: center; */
-}
-div.slice_add * {
- font-style: italic;
-}
.bold {
font-weight: bold;
}
h3.node_download {
text-align: center;
}
-div#add_slice_in_site {
- text-align:center;
-}
-#add_slice_choose_site {
- margin:20px ;
-}
+/****************************************/
/* registrations */
div.site-register {
background-color: #c8c7de;
padding: 5px;
margin: 10px;
}
+
+/****************************************/
+/* slice creation page */
+#create-slice-choose-site {
+ margin:20px ;
+}
+div#create-slice-in-site {
+ text-align:center;
+}
+div.create-slice-instantiations {
+ padding: 5px 0px 0px 0px;
+/* font-size: larger; */
+ font-style: italic;
+}
+div#toggle-container-create-slice-details {
+ background-color: #e5dbb7;
+}
+div#toggle-area-create-slice-details {
+ padding: 20px 5px 5px 5px;
+}
+div#toggle-container-create-slice-persons {
+ background-color: #dfe6a1;
+}
+div#toggle-area-create-slice-persons {
+ padding: 20px 5px 5px 5px;
+}
+/* override details default */
+div#toggle-area-create-slice-details>table.plc_details {
+ margin:0 ;
+}
// the message button
$trunc_mess=htmlentities(truncate($event['message'],40),ENT_QUOTES);
$message="<input type=button name='message' value='" . $trunc_mess ."' onclick='alert(\"" . $text . "\")'";
- $details="<input type=button name='message' value='X' onclick='alert(\"" . $text . "\")'";
+ $details="<input type=button name='message' value='+' onclick='alert(\"" . $text . "\")'";
// $message=sprintf('<span title="%s">%s</span>',$message,$message);
$message=truncate($event['message'],40);
$table->row_start();
$peers->cell ($table,$slice['peer_id']);
$table->cell (l_slice_t ($slice['slice_id'],$slice['name']));
- # xxx l_sliver not implemented yet - what should we show exactly ?
$table->cell (l_sliver_t ($node_id,$slice['slice_id'],'sliver tags'));
$table->row_end();
}
$site_columns=array('name','login_base','site_id');
if (plc_is_admin ()) {
$multiple_sites=true;
- $filter=NULL;
+ $filter=array('-SORT'=>'name');
} else if (count (plc_my_site_ids()) > 1) {
$multiple_sites=true;
- $filter=plc_my_site_ids();
+ $filter=array('-SORT'=>'name','site_id'=>plc_my_site_ids());
}
if ($multiple_sites) {
- print "<div id='add_slice_in_site'>";
+ print "<div id='create-slice-in-site'>";
$other_sites=$api->GetSites($filter,$site_columns);
$selectors=array();
foreach ($other_sites as $other_site) {
$selector=array('display'=>$other_site['name'],
'value'=>$other_site['site_id']);
- if ($other_site['site_id']==$other_site_id) $selector['selected']='selected';
+ if ($other_site['site_id']==$site_id) $selector['selected']='selected';
$selectors []= $selector;
}
$site_form->start();
print $site_form->label_html('site_id','Or choose some other site');
print $site_form->select_html('site_id',$selectors,array('autosubmit'=>true,
- 'id'=>'add_slice_choose_site'));
+ 'id'=>'create-slice-choose-site'));
$site_form->end();
print "</div>";
}
print <<< EOF
-<div class='slice_add'>
+<div class='create-slice-instantiations'>
<p>You must provide a short description of the new slice
as well as a link to a project website before creating it.
<br/>
</div>
EOF;
+$toggle = new PlekitToggle ('create-slice-details','Slice Details',
+ array ('visible'=>get_arg('show_slice',true)));
$details = new PlekitDetails(TRUE);
$form_variables = array('site_id'=>plc_my_site_id());
$form = $details -> form_start("/db/slices/slice_add.php",$form_variables);
print $form->hidden_html("site_id",$site_id);
+$toggle->start();
$details->start();
$running=count($site['slice_ids']);
array('input_type'=>'select', 'value'=>$instantiation));
-$details->end();
-
-print <<< EOF
-<div class='slice_add'>
+$instantiation_text = <<< EOF
+<div class='create-slice-instantiations'>
<p>There are four possible "instantiation" states for a slice.</p>
<ul>
<li> <strong>PLC</strong> creates a slice with default settings. </li>
</div>
EOF;
+$details->tr($instantiation_text);
+
+$details->end();
+$toggle->end();
+
if ($persons) {
$title = count($persons) . " people can be added in slice";
- $toggle=new PlekitToggle ('persons',$title,
+ $toggle=new PlekitToggle ('create-slice-persons',$title,
array('visible'=>get_arg('show_persons',true)));
$toggle->start();
// (*) you need to tune the image size, which is wrong, as the image should rather be bottom-aligned
function plekit_linetabs ($tabs, $id=NULL) {
+ // do not output anything if $tabs has no entry (unpleasant rendering)
+ if (empty ($tabs)) return;
$active_line_tab=$_GET['active_line_tab'];
// need id to pass to the onclick function attached to the input buttons
$id="linetabs";