summaryrefslogtreecommitdiff
path: root/gnowsys-ndf/gnowsys_ndf/ndf/templates
diff options
context:
space:
mode:
authormakfire <mukeshpandey15@hotmail.com>2015-07-09 16:43:42 +0530
committermakfire <mukeshpandey15@hotmail.com>2015-07-09 16:43:42 +0530
commit620bec6e6fafbaa6aa40bcb07898189e94263b94 (patch)
treebf873898e033c2911fd84efde99f5d796d4885fa /gnowsys-ndf/gnowsys_ndf/ndf/templates
parent62b7b318060b0bc32aaab0221f55df9d93a94906 (diff)
downloadgnowsys-620bec6e6fafbaa6aa40bcb07898189e94263b94.tar.gz
trash functionality done
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates')
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review.html19
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html12
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_tbody.html14
-rw-r--r--gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/uDashboard.html11
4 files changed, 41 insertions, 15 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 26e1d231..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,20 +824,29 @@
$drContainer.css("opacity", "1");
})
// ---END of search in the data-review
- function deleteNode(node_id)
+ function deleteNode(oid)
{
- a = node_id
- alert(a)
$.ajax({
url:"{% url 'delete_resource' groupid %}",
type:'Get',
data:{
- 'node_id':node_id
+ 'node_id':oid
},
success:function(data){
- alert(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)
}
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 8b6c9e55..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,7 +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>
- <th class="text-center right-border" colspan="2">Admin</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 %}
@@ -67,9 +68,10 @@
<th>Time Required</th>
<th class="expand-width-3 right-border">Text Complexity</th>
<!-- Admin -->
-
- <th class="expand-width-3"> Purge </th>
- <th class="expand-width-3"> Restore </th>
+ {% 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 8057b229..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,11 +291,15 @@
</option> -->
</select>
</td>
- <td class="deletedata">
-
- <div class="button tiny exapnd" id = "{{resource.pk}}" onclick = "deleteNode('{{resource.pk}}')"> Delete </div>
- <div class="button tiny exapnd" id = "{{resource.pk}}" onclick = "restoreNode('{{resource.pk}}')"> restore </div>
- </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/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/>