diff options
author | Kedar Aitawdekar <kedar2a@gmail.com> | 2015-07-09 23:35:51 +0530 |
---|---|---|
committer | Kedar Aitawdekar <kedar2a@gmail.com> | 2015-07-09 23:35:51 +0530 |
commit | a5afb5e9877e2961c93ae14d03650f64a6842f94 (patch) | |
tree | 67b512ae54e2e26c0604ac0bae8273e904317071 /gnowsys-ndf/gnowsys_ndf/ndf/templates | |
parent | 96f4edd74ecd0c00ce31bdde3a3c353b9256d2b2 (diff) | |
parent | 19db303ab93bb19290036c3ad380ff3a4501d0a9 (diff) | |
download | gnowsys-a5afb5e9877e2961c93ae14d03650f64a6842f94.tar.gz |
Merge pull request #1203 from makfire/delete_groupmongokit
Delete group
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates')
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 9fd5dee..17fb4b5 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 7313197..bf1807d 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 3c8d8a6..d1d5314 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 8fd75c5..24d4328 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 @@ -1327,7 +1327,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 0dc035b..9923444 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" %}: {{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/> |