All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit f760f0d6 authored by Leigh B Stoller's avatar Leigh B Stoller

Address Mike nits in issue #284 ...

parent 8ab4519f
......@@ -359,14 +359,16 @@ $(function ()
{
var modified = 0;
// Panel starts out collapsed and read only. When it is expanded,
// change the button to edit.
// Panel starts out collapsed.
$('#adminnotes-collapse').on('show.bs.collapse', function () {
$('#adminnotes-row .toggle').html('Hide');
});
$('#adminnotes-collapse').on('hide.bs.collapse', function () {
$('#adminnotes-row .toggle').html('View');
var label = "View";
if ($("#adminnotes-collapse textarea").val() == "") {
label = "Add";
}
$('#adminnotes-row .toggle').html(label);
});
$("#adminnotes-collapse textarea")
.on("change input paste keyup", function() {
......
......@@ -105,6 +105,7 @@ $(function ()
repourl: window.APT_OPTIONS.repourl,
reporef: window.APT_OPTIONS.reporef,
repohash: window.APT_OPTIONS.repohash,
hasnotes: window.APT_OPTIONS.hasnotes,
};
var status_html = statusTemplate(template_args);
$('#status-body').html(status_html);
......
......@@ -280,6 +280,8 @@ if (isset($maxextend) && $maxextend != "") {
else {
echo " window.APT_OPTIONS.MAXEXTEND = null;\n";
}
echo " window.APT_OPTIONS.hasnotes = " .
($instance->admin_notes() && $instance->admin_notes() != "" ? 1 : 0) . ";\n";
if ($instance->repourl()) {
echo " window.APT_OPTIONS.repourl = '" . $instance->repourl() . "';\n";
if ($instance->reporef()) {
......
......@@ -130,7 +130,9 @@
<a class='btn btn-primary btn-xs pull-right toggle'
href="#adminnotes-collapse"
data-toggle="collapse"
type='button'>View</a>
type='button'>
<% if (expinfo.admin_notes == "") { %>Add<% } else { %>View<% } %>
</a>
<a class='btn btn-danger btn-xs pull-right hidden' hidden
style="margin-right: 10px;"
id="adminnotes-save-button"
......@@ -141,7 +143,7 @@
class="panel-collapse collapse">
<div class='panel-body'>
<textarea style="width: 100%;" rows="3"
placeholder="Click Edit to add/change admin notes"
placeholder="Put admin notes here and click Save"
><%= expinfo.admin_notes %></textarea>
</div>
</div>
......
......@@ -276,6 +276,14 @@ pre {
<span <% if (paniced) { %>class="text-danger"<% } %> >
Quarantined</span></label>
</div>
<div class='pull-left
<% if (!hasnotes) { %>hidden<% } %>'
data-toggle='popover'
data-delay='{"hide":500, "show":500}'
data-content="This experiment has admin notes">
<a target="_blank"
href='adminextend.php?uuid=<%= uuid %>'>Admin Notes</a>
</div>
<% } %>
</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