summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf
diff options
context:
space:
mode:
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf')
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html29
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html10
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html10
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html2
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html11
5 files changed, 59 insertions, 3 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html
index 9fd5dee1..17fb4b5a 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html
@@ -824,6 +824,35 @@
$drContainer.css("opacity", "1");
})
// ---END of search in the data-review
+ function deleteNode(oid)
+ {
+ $.ajax({
+
+ url:"{% url 'delete_resource' groupid %}",
+ type:'Get',
+ data:{
+ 'node_id':oid
+ },
+
+ success:function(data){
+ //updateContent();
+ var $resBlankRow = $("tr#blank-row-" + oid);
+ // fetching resource object VIEW row
+ var $resViewRow = $("tr#view-row-" + oid);
+ // fetching resource object EDIT row
+ var $resEditRow = $("tr#edit-row-" + oid);
+
+ $($resEditRow).add($resViewRow).add($resBlankRow).animate({
+ opacity: 0.1
+ }, 1000).fadeOut(1000);
+
+ setCurrNoneToEditRow(oid)
+ }
+
+
+ });
+
+ }
// </script>
{% endblock %}
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html
index 73131972..bf1807d8 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html
@@ -1,6 +1,5 @@
{% load cache %}
-
<table id="data-review-table" style="width:auto">
<!-- <table> -->
@@ -14,6 +13,9 @@
<th class="text-center right-border" colspan="3">Alignment & Level</th>
<th class="text-center right-border" colspan="7">Curate</th>
<th class="text-center right-border" colspan="3">Advance</th>
+ {% if user.is_superuser %}
+ <th class="text-center right-border" colspan="2">Admin</th>
+ {% endif %}
{% if title == "moderation" %}
<th class="text-center right-border" colspan="3">Moderation</th>
{% endif %}
@@ -65,7 +67,11 @@
<th class="expand-width-3">Reading Level</th>
<th>Time Required</th>
<th class="expand-width-3 right-border">Text Complexity</th>
-
+ <!-- Admin -->
+ {% if user.is_superuser %}
+ <th class="expand-width-3"> Purge </th>
+ <th class="expand-width-3"> Restore </th>
+ {% endif %}
<!-- moderation -->
{% if title == "moderation" %}
<th class="expand-width-2">Discuss</th>
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html
index 3c8d8a6f..d1d53140 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html
@@ -291,6 +291,16 @@
</option> -->
</select>
</td>
+ {% if user.is_superuser %}
+ <td class="deletedata">
+
+ <div class="button tiny exapnd" id = "{{resource.pk}}" onclick = "deleteNode('{{resource.pk}}')"> Delete </div>
+ </td>
+ <td>
+ <div class="button tiny exapnd" id = "{{resource.pk}}" onclick = "restoreNode('{{resource.pk}}')"> restore </div>
+ </td>
+ {% endif %}
+
{% if title == "moderation" %}
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 65484488..9ff7fb5b 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
@@ -1329,7 +1329,7 @@ ul#navigation li a.last {
<!-- Delete button if page created by user -->
{% if node.created_by == request.user.id %}
{% if node.member_of_names_list.0 == "Page" %}
- <a class="tiny alert round button" href="{% url 'page_delete' group_name_tag node %}">{% trans "Delete" %}</a>
+ <a class="tiny alert round button" href="{% url 'trash_resource' group_id node %}">{% trans "Delete" %}</a>
{% elif node.member_of_names_list.0 == "Term" %}
<a class="tiny alert round button" href="{% url 'term_delete' group_name_tag node %}">{% trans "Delete" %}</a>
{% endif %}
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html
index 0dc035ba..99234440 100644
--- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html
+++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html
@@ -44,6 +44,10 @@
.img-height {
height: 100%;
}
+ .fi-trash{
+ color:orange;
+
+ }
.div-height {
margin-bottom: 0.5em;
@@ -127,12 +131,19 @@
{% trans "Files uploaded" %}: &nbsp;{{file_count}}<br>
{% trans "Quiz" %}: {{quiz_count}}<br>
{% trans "Forum" %}: {{forum_count}}<br>
+
<!-- FOR AWARDS -->
<!-- {% if page_count > 1 %}
<img src="/static/ndf/images/close.png">
{% endif %} -->
</h5>
</div>
+
+ {% if user.is_superuser %}
+ <div class"trashdiv" style="position:absolute; float:right; right:11%; top:2%;">
+ <a href="/Trash/data-review" > <h5> <span class = "fi-trash"> </span> <b > Trash </b> </h5> </a>
+ </div>
+ {% endif %}
</div>
<br/>