summaryrefslogtreecommitdiff
path: root/gnowsys-ndf
diff options
context:
space:
mode:
authorKedar Aitawdekar <kedar2a@gmail.com>2015-06-21 23:46:48 +0530
committerKedar Aitawdekar <kedar2a@gmail.com>2015-06-21 23:46:48 +0530
commit5fa2ab4461759792fb118ec848e69616b99277e2 (patch)
treeb9d706931bee9e0e6076e32937595877e89cdbb5 /gnowsys-ndf
parentd19636c2fe4bb0a27ee306d2f22031a675c762ac (diff)
downloadgnowsys-5fa2ab4461759792fb118ec848e69616b99277e2.tar.gz
Hiding create/edit action buttons for underlying moderated groups
Diffstat (limited to 'gnowsys-ndf')
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
index 18432608..b4f94133 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html
@@ -1281,7 +1281,8 @@ ul#navigation li a.last {
<div class="medium-6 columns">
{% edit_policy groupid node request.user as status %}
- {% if user.is_authenticated and status == "allow" and user_access == "allow" %}
+
+ {% if user.is_authenticated and status == "allow" and user_access == "allow" and "Group" in group_object.member_of_names_list %}
{% get_edit_url node.pk as edit_url %}
{% check_group node as is_group %}
@@ -1296,11 +1297,13 @@ ul#navigation li a.last {
<a href="{% url edit_url group_id node %}" class="tiny round button edit"><i class="fi-pencil"></i> {% trans "Edit" %}</a>
{% endif %}
{% endif %}
+
</div>
<div class="medium-6 columns">
<!-- This button publishes the drafted resource -->
- {% if node %}
+
+ {% if node and "Group" in group_object.member_of_names_list %}
{% get_publish_policy request groupid node as group_policy %}
{% if group_policy == "allow" %}
@@ -1332,6 +1335,8 @@ ul#navigation li a.last {
</div>
<div class="medium-7 columns">
+
+
{% get_create_url node.pk as create_url %}
{% if is_group %}
@@ -1374,18 +1379,19 @@ ul#navigation li a.last {
{% endif %}
{% endif %}
{% endif %}
+
+ {% endif %}
</div>
<div class ="rows">
- {% if user.is_authenticated %}
+
+ {% if user.is_authenticated and "Group" in group_object.member_of_names_list%}
<div class= "medium-12 columns" >
<a href = "{% url 'node_version' groupid node.pk %}" class="tiny round button" > <label style = 'width:8%;'> History </label> </a>
</div>
{% endif %}
</div>
- {% endif %}
-
{% if node %}
{% check_group node as is_group %}
{% if is_group %}
@@ -1393,7 +1399,7 @@ ul#navigation li a.last {
{% get_group_policy node request.user as policy %}
{% get_prior_post_node group_id as groupname %}
- {% if group_object.edit_policy == 'EDITABLE_MODERATED' and "Group" in group_object.member_of_names_list %}
+ {% if "Group" in group_object.member_of_names_list %}
<input type="hidden" id="groupname" value="{{node}}">
{% if user.is_authenticated %}
{% if user_access == "allow" %}