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

Minor tweak; make it apparent when profile is not the most recent,

like the edit page does.
parent 186c6fcf
<?php <?php
# #
# Copyright (c) 2000-2017 University of Utah and the Flux Group. # Copyright (c) 2000-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -104,6 +104,9 @@ if ($profile->script() && $profile->script() != "") { ...@@ -104,6 +104,9 @@ if ($profile->script() && $profile->script() != "") {
if ($profile->repourl() && $profile->repourl() != "") { if ($profile->repourl() && $profile->repourl() != "") {
$defaults["profile_repourl"] = $profile->repourl(); $defaults["profile_repourl"] = $profile->repourl();
} }
$latest_profile = Profile::Lookup($profile->profile_uuid());
$defaults["latest_uuid"] = $latest_profile->uuid();
$defaults["latest_version"] = $latest_profile->version();
# Place to hang the toplevel template. # Place to hang the toplevel template.
echo "<div id='page-body'></div>\n"; echo "<div id='page-body'></div>\n";
......
...@@ -28,6 +28,12 @@ ...@@ -28,6 +28,12 @@
<% } else { %> <% } else { %>
<%- fields.profile_version %> <%- fields.profile_version %>
<% } %> <% } %>
<% if (version_uuid != fields.latest_uuid) { %>
(Latest:
<a href='show-profile.php?uuid=<%= fields.latest_uuid %>'>
<%- fields.latest_version %></a>)
<% } %>
</td> </td>
</tr> </tr>
<% } %> <% } %>
......
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