Fix Publish Layer button on layer detail

Show button only if user has appropriate permission, and remove the
duplicate button at the end of the page as it's unlikely to be useful.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2013-02-26 23:32:42 +00:00
parent 89d4f9ea6b
commit 1e3f451139

View File

@ -26,7 +26,7 @@
<div class="row-fluid">
<div class="page-header">
<h1>{{ layeritem.name }}
{% if user.is_authenticated %}
{% if user.is_authenticated and perms.layeritem.publish_layer %}
{% if layeritem.status = "N" %}
<a href="{% url publish layeritem.name %}" class="btn btn-primary pull-right">Publish layer</a>
{% endif %}
@ -186,16 +186,6 @@
</tbody>
</table>
</div>
<div class="row-fluid">
{% if user.is_authenticated %}
{% if layeritem.status = "N" %}
<a href="{% url publish layeritem.name %}" class="btn btn-primary pull-right">Publish layer</a>
{% endif %}
{% endif %}
</div>
</div>
{% endautoescape %}