Commit b694429b authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

UI tweaks requirested by Rob.

parent 33de154a
......@@ -16,6 +16,7 @@ function (_, sup, moment, ppstart,
guestInstantiateString, instantiateString, oopsString)
{
'use strict';
var profile_uuid = null;
var version_uuid = null;
var gotscript = 0;
var ajaxurl = "";
......@@ -29,6 +30,7 @@ function (_, sup, moment, ppstart,
{
window.APT_OPTIONS.initialize(sup);
version_uuid = window.VERSION_UUID;
profile_uuid = window.PROFILE_UUID;
ajaxurl = window.AJAXURL;
isppprofile = window.ISPPPROFILE;
......@@ -43,6 +45,8 @@ function (_, sup, moment, ppstart,
var show_html = showTemplate({
fields: fields,
version_uuid: version_uuid,
profile_uuid: profile_uuid,
history: window.HISTORY,
isadmin: window.ISADMIN,
});
$('#page-body').html(show_html);
......@@ -133,6 +137,11 @@ function (_, sup, moment, ppstart,
* ppstart js code.
*/
$('#profile_instantiate_button').click(function (event) {
if (true) {
window.location.replace("instantiate.php?profile=" +
version_uuid);
return;
}
if (isppprofile) {
ppstart({uuid : version_uuid,
registered : true,
......
......@@ -101,14 +101,13 @@ echo "<div class='row'>
col-sm-12 col-sm-offset-0
col-xs-12 col-xs-offset-0'>\n";
echo "<input class='form-control search' type='search'
echo "<input class='form-control search' type='search' data-column='all'
id='profile_search' placeholder='Search'>\n";
echo " <table class='tablesorter'>
<thead>
<tr>
<th>Name</th>
<th>&nbsp</th>
<th>&nbsp</th>\n";
if (isset($all) && ISADMIN()) {
echo " <th>Creator</th>";
......@@ -149,19 +148,15 @@ while ($row = mysql_fetch_array($query_result)) {
$desc = $parsed_xml->rspec_tour->description;
}
echo " <tr>
<td>$name</td>\n";
echo " <tr>";
if ($creator == $this_user->uid() || ISADMIN()) {
echo " <td style='text-align:center'>
<a class='btn btn-primary btn-xs' type='button'
href='manage_profile.php?action=edit&uuid=$uuid'>Edit</a>
<a href='manage_profile.php?action=edit&uuid=$uuid'>$name</a>
</td>\n";
}
else {
echo " <td style='text-align:center'>
<a class='btn btn-primary btn-xs' type='button'
href='manage_profile.php?action=copy&uuid=$uuid'>Copy</a>
<a href='show-profile.php?uuid=$uuid'>$name</a>
</td>\n";
}
echo "<td style='text-align:center'>
......
......@@ -249,7 +249,7 @@ class Profile
}
# And the URL of the profile itself.
function ProfileURL() {
global $APTBASE;
global $APTBASE, $ISVSERVER;
$uuid = $this->profile_uuid();
......
......@@ -5,9 +5,10 @@
col-sm-3'>
<div class='panel panel-default'>
<div class='panel-heading'>
<h4 class='panel-title'><%= title %></h4>
<h4 class='panel-title text-center'><%= title %></h4>
</div>
<div class='panel-body' style='overflow: hidden'>
<div class='panel-body'
style='overflow: hidden; padding-left: 5px; padding-right: 5px'>
<table class='table-condensed nospaceafter'
style='font-size:12px;'>
<tr>
......@@ -15,9 +16,14 @@
<td><%- formfields.profile_name %></td>
</tr>
<tr>
<td>Version:</td>
<td><%- formfields.profile_version %></td>
</tr>
<td>Version:</td><td>
<% if (history) { %>
<a href='profile-history.php?uuid=<%= profile_uuid %>'>
<%- formfields.profile_version %></a>
<% } else { %>
<%- formfields.profile_version %>
<% } %>
</td></tr>
<tr>
<td>Project:</td>
<td><%- formfields.profile_pid %></td>
......@@ -33,7 +39,7 @@
</tr>
<tr>
<td>Published:</td>
<td id='profile_published format-date'>
<td id='profile_published' class='format-date'>
<%- formfields.profile_published %></td>
</tr>
<tr>
......@@ -66,7 +72,7 @@
id='profile_history_button'
style='margin-right: 10px; font-size: 12px'
href='profile-history.php?uuid=<%= profile_uuid %>'
type='button'>History
type='button'>Version History
</a>
<% } %>
<% if (activity) { %>
......
......@@ -37,20 +37,24 @@
</tr>
<tr>
<td>Type</td>
<td><%- formfields.dataset_type %></td>
<td><%- formfields.dataset_type_string %></td>
</tr>
<tr>
<td>Created</td>
<td class='format-date'><%- formfields.dataset_created %></td>
</tr>
<tr>
<td>Expires</td>
<td class='format-date'><%- formfields.dataset_expires %></td>
</tr>
<tr>
<td>Last Used</td>
<td class='format-date'><%- formfields.dataset_lastused %></td>
</tr>
<% if (formfields.dataset_type != "imdataset") { %>
<tr>
<td>Expires</td>
<td class='format-date'><%- formfields.dataset_expires %>
</td>
</tr>
<tr>
<td>Last Used</td>
<td class='format-date'><%- formfields.dataset_lastused %>
</td>
</tr>
<% } %>
<tr>
<td>FS Type</td>
<td><%- formfields.dataset_fstype %></td>
......
<div class='row'>
<div class='col-lg-6 col-lg-offset-3
col-md-8 col-md-offset-2
col-sm-8 col-sm-offset-2
col-xs-12'>
<div class='col-lg-3
col-md-3
col-sm-3'>
<div class='panel panel-default'>
<div class='panel-body'>
<div class='panel-body'>
<table class='table table-condensed nospaceafter border-none'>
<div class='panel-heading'>
<h4 class='panel-title text-center'>Show Profile</h4>
</div>
<div class='panel-body'
style='overflow: hidden; padding-left: 5px; padding-right: 5px'>
<table class='table-condensed nospaceafter'
style='font-size:12px;'>
<tr>
<td>Name:</td>
<td><%- fields.profile_name %></td>
</tr>
<tr>
<td>Version:</td>
<td><%- fields.profile_version %></td>
<td>Version:</td><td>
<% if (history) { %>
<a href='profile-history.php?uuid=<%= profile_uuid %>'>
<%- fields.profile_version %></a>
<% } else { %>
<%- fields.profile_version %>
<% } %>
</td></tr>
<tr>
<td>Project:</td>
<td><%- fields.profile_pid %></td>
</tr>
<tr>
<td>Creator:</td>
<td><%- fields.profile_creator %></td>
</tr>
<tr>
<td>Created:</td>
......@@ -21,19 +37,30 @@
<%- fields.profile_created %></td>
</tr>
<tr>
<td>Description:</td>
<td>
<div id='profile_description' style='border: solid #000 1px;'>
</div>
</td>
</tr>
<tr>
<td>Instructions:</td>
<td>
<div id='profile_instructions' style='border: solid #000 1px;'>
</div>
</td>
<td>Published:</td>
<td id='profile_published' class='format-date'>
<%- fields.profile_published %></td>
</tr>
</table>
<% if (history) { %>
<a class='btn btn-info btn-xs pull-left'
id='profile_history_button'
style='margin-right: 10px; font-size: 12px'
href='profile-history.php?uuid=<%= profile_uuid %>'
type='button'>Version History
</a>
<% } %>
</div>
</div>
</div>
<div class='col-lg-9
col-md-9
col-sm-9
col-xs-12'>
<div class='panel panel-default'>
<div class='panel-body'>
<div class='panel-body'>
<table class='table nospaceafter border-none'>
<tr>
<td>Topology:</td>
<td>
......@@ -54,6 +81,26 @@
XML</button>
</td>
</tr>
<tr>
<td>Description:</td>
<td>
<div style='border: solid #000 1px;'>
<div id='profile_description'
style='padding-left: 2px; padding-right: 2px;'>
</div>
</div>
</td>
</tr>
<tr>
<td>Instructions:</td>
<td>
<div style='border: solid #000 1px;'>
<div id='profile_instructions'
style='padding-left: 2px; padding-right: 2px;'>
</div>
</div>
</td>
</tr>
</table>
<button class='btn btn-primary btn-sm pull-right'
id='profile_instantiate_button'
......@@ -83,7 +130,6 @@
rows=5><%- fields.profile_script %></textarea>
</div>
<!-- place to hang the modals -->
<div id='ppmodal_div'></div>
<div id='showtopomodal_div'></div>
<div id='editmodal_div'></div>
<div id='waitwait_div'></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment