From 706119bbb8b23e6da6f1bbbcd91f914c76630c63 Mon Sep 17 00:00:00 2001 From: sunnychaudhari Date: Tue, 24 Mar 2015 18:20:29 +0530 Subject: new template added to create uploader form for uploading resource --- .../gnowsys_ndf/ndf/templates/ndf/Upload_File.html | 166 +++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html new file mode 100644 index 0000000..e9d99a0 --- /dev/null +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html @@ -0,0 +1,166 @@ +{% load i18n %} +{% load ndf_tags %} + +{% get_group_name groupid as group_name_tag %} +{% if user.is_authenticated %} + +
{% csrf_token %} + + +
+ {% trans "Upload File" %} +
+
+ + +
+
+ + +
+
+
+
+ {% trans "Enter Details" %} + +
+
+ Add Description + {% include "ndf/add_editor.html" with var_name="content_org" var_placeholder="Please enter question" %} +
+ +
+
+
+ Set Language + +
+
+ Add Tag + +
+
+ Set Privacy
+ + + + +
+
+
+ +
+ License + +
+
+ Source + +
+
+
+
+ Target Audience + {% get_metadata_values as metadata %} + {% for k,v in metadata.items %} + {% if k == "audience" %} + + {% endif %} + {% endfor %} +
+
+ File Type + {% get_metadata_values as metadata %} + {% for k,v in metadata.items %} + {% if k == "educationaluse" %} + + {% endif %} + {% endfor %} +
+
+
+
+ +
+
+ + +
+ + + + + + + +
+ + + +{% else %} +

{% trans "You are not an authorised user. Please login to upload files." %}

+{% endif %} + + + \ No newline at end of file -- cgit v1.1 From d87c082b58386504221f92296bc03ac24a66c91e Mon Sep 17 00:00:00 2001 From: sunnychaudhari Date: Tue, 24 Mar 2015 18:21:20 +0530 Subject: html form to take inputs from fields mentioned --- .../ndf/templates/ndf/Uploader_Form.html | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Uploader_Form.html (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Uploader_Form.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Uploader_Form.html new file mode 100644 index 0000000..c2a29dc --- /dev/null +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Uploader_Form.html @@ -0,0 +1,32 @@ +{% extends "ndf/base.html" %} +{% load i18n %} + +{% block title %} Upload Resource {% endblock %} + + +{% block meta_content %} + +

{% trans "Uploader Form" %}

+

{% trans "You can upload files of any format to your group library." %}

+ +{% endblock %} + + +{% block body_content %} + + {% include "ndf/Upload_File.html" %} + + +
+ + × + {% include "ndf/map_widget.html" with mode="edit" %} + + +
+ +{% endblock %} + + + + -- cgit v1.1 From 47dfbdd06be964a9b07e7d30a241a6d6fa96543f Mon Sep 17 00:00:00 2001 From: sunnychaudhari Date: Mon, 13 Apr 2015 15:48:07 +0530 Subject: added some fields in uploder form --- .../gnowsys_ndf/ndf/templates/ndf/Upload_File.html | 74 +++++++++++++++++----- 1 file changed, 58 insertions(+), 16 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html index e9d99a0..0b9cab5 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html @@ -53,21 +53,7 @@ -
- -
- License - -
-
- Source - -
-
+
Target Audience @@ -83,7 +69,9 @@ {% endif %} {% endfor %}
-
+ + {% comment %} + + {% endcomment %} + +
+ Subject + {% get_metadata_values as metadata %} + {% for k,v in metadata.items %} + {% if k == "educationalsubject" %} + + {% endif %} + {% endfor %} +
+ +
+ Educational Level + {% get_metadata_values as metadata %} + {% for k,v in metadata.items %} + {% if k == "educationallevel" %} + + {% endif %} + {% endfor %} +
+
+ +
+ +
+ License + +
+
+ Source + +
+
+ +
+
+ Based on url +
-- cgit v1.1 From 038013666fb19d3374679c62a5ffad60909e931b Mon Sep 17 00:00:00 2001 From: sunnychaudhari Date: Mon, 13 Apr 2015 15:50:03 +0530 Subject: uncommented the concept graph part for topic page --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') 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 0e00b9b..a9741df 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 @@ -867,7 +867,7 @@ ul#navigation li a.last {
× - + {% include "ndf/graph_concept.html" %}
{% endif %} -- cgit v1.1 From 1916909f18d384480491db5013989d843aa63038 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Sun, 28 Jun 2015 13:06:31 +0530 Subject: Updated Upload_File.html template --- .../gnowsys_ndf/ndf/templates/ndf/Upload_File.html | 254 +++++++++++++++++++-- 1 file changed, 232 insertions(+), 22 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html index 0b9cab5..06cb59b 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html @@ -1,49 +1,115 @@ {% load i18n %} {% load ndf_tags %} + + {% get_group_name groupid as group_name_tag %} {% if user.is_authenticated %}
{% csrf_token %} - +
{% trans "Upload File" %}
-
+
-
+
+ +
{% trans "Enter Details" %}
-
+
Add Description {% include "ndf/add_editor.html" with var_name="content_org" var_placeholder="Please enter question" %} + +
+ + {% trans "Add Tag" %}: + + +
+
+ +
+ + +
+
+ + {% trans 'Add Tag' %} + +
+ +
+ + +
+
{% trans 'Non empty tags can have only alphanumeric characters, dash(-) and spaces.' %}
+
+ + +
+
+ {% for each_tag in node.tags %} +
{{each_tag}}
+ {% endfor %} +
+
+ +
+ +
+
-
+
Set Language
- Add Tag - + Location +   {% trans "Add Location" %} +
Set Privacy
@@ -119,31 +185,32 @@
- -
+
License -
-
+
+ +
+
+ +
+
Source +
+
-
+
Based on url -
-
+
+
-
@@ -158,9 +225,16 @@

- - + +
+ + × + {% include "ndf/map_widget.html" with mode="edit" %} + + +
+ {% else %}

{% trans "You are not an authorised user. Please login to upload files." %}

@@ -201,8 +275,144 @@ alert("select a file"); return false; } + }); + + // --- tags --- + var tags = document.getElementById("tags_id"); + var addedTags = document.getElementById("added_tags"); + + function checkTag() + { + var textValue = tags.value.trim(); + // console.log(textValue.length); + + if(textValue.length < 1){ return false; } + + if(textValue.match(/[^A-Za-z0-9\-\ ]/g)) + { // having special characters + $('#tags_error').removeClass("hide"); + return false; + } + else + { // passed the test and now add tag label + $('#tags_error').addClass("hide") // fadeout fastly ongoing fadeout event + return true; + } + } + + tags.onchange = checkTag; + tags.onmouseup = checkTag; + tags.onkeyup = checkTag; + + function updateAllTags() { + + var tagsArr = new Array(); + + $("#added_tags").children("div.tags.label").each(function(){ + tagsArr.push(this.textContent.trim().toLowerCase()); + }); + + $("input:hidden[name='tags']").val(tagsArr.toString()); + // console.log(tagsArr) + } + + + function removeTag(){ + $(this).parent().fadeOut("slow", function(){ + $(this).detach(); + }); + + updateAllTags(); + }; + + $(".remove-tag").click(removeTag); + + $(".remove-tag").mouseenter(function(){ + $(this).parent("div.tags").css("text-decoration", "line-through"); + }); + + $(".remove-tag").mouseleave(function(){ + $(this).parent("div.tags").css("text-decoration", "none"); + }); + + function addTag() { + if(checkTag()) + { + var textValue = tags.value.trim().toLowerCase(); + tags.value = ''; + + var tagDiv = document.createElement("div"); + tagDiv.className = "tags label radius info"; + tagDiv.appendChild(document.createTextNode(textValue)); + // tagDiv.setAttribute("data-primary-type", selFieldPrimaryType); + + var closeBtn = document.createElement("i"); + closeBtn.className = "fi-x-circle remove-tag"; + closeBtn.title = "Remove this tag"; + closeBtn.onclick = removeTag; + + $(closeBtn).mouseenter(function(){ + $(this).parent("div.tags").css("text-decoration", "line-through"); + }); + + $(closeBtn).mouseleave(function(){ + $(this).parent("div.tags").css("text-decoration", "none"); + }); + + tagDiv.appendChild(closeBtn); + + addedTags.appendChild(tagDiv); + + updateAllTags(); + } + else + { + $('#tags_error').removeClass("hide"); + } + tags.focus(); + } + + var addTagBtn = document.getElementById("add-tag-btn"); + addTagBtn.onclick = addTag; + addTagBtn.onkeypress = addTag; + + + // --- map --- + $(document).on('open', '#view-map-edit-widget[data-reveal]', function () { + + $.ajax({ + url: "{% url 'get_visited_location' groupid %}", + success: function(data){ + + data = JSON.parse(data); + + var lastVisitedLocationVal = data; + + if(lastVisitedLocationVal){ + + if(lastVisitedLocationVal == "[]"){ + lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal); + } + if(lastVisitedLocationVal.length > 0){ + // lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal); + var zoom = lastVisitedLocationVal.pop(), + lng = lastVisitedLocationVal[1], + lat = lastVisitedLocationVal[0]; + map.setView([lat, lng], zoom); + } + } + else if( tempArr.length ) + { + var group = new L.featureGroup(tempArr) + map.fitBounds(group.getBounds()); + } + } + }); + }); + $(document).on('opened', '#view-map-edit-widget[data-reveal]', function () { + map.invalidateSize(); }); \ No newline at end of file -- cgit v1.1 From e22edc02872922ee0f690e7d800584c27fb896bd Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Mon, 29 Jun 2015 10:22:05 +0530 Subject: Updated upload_file.html that includes revised tags --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html index 06cb59b..d0775fa 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html @@ -224,7 +224,7 @@ {% trans "Please upload videos in webm format. If you upload videos of other formats, it will take longer to publish them." %}

- +
@@ -240,7 +240,6 @@

{% trans "You are not an authorised user. Please login to upload files." %}

{% endif %} - + + - - - - + + - - - - -- cgit v1.1 From 5207e8df300efebb915d46f7b7964298b230a75d Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Sun, 5 Jul 2015 22:24:45 +0530 Subject: Seperated from theme.html and Created new template for hieararchy tree --- .../ndf/templates/ndf/hierarchy_tree.html | 619 +++++++++++++++++++++ 1 file changed, 619 insertions(+) create mode 100644 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html new file mode 100644 index 0000000..ff7f674 --- /dev/null +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html @@ -0,0 +1,619 @@ +{% load i18n %} +{% load cache %} + +{% load ndf_tags %} +{% get_group_name groupid as group_name_tag %} + + + + + + + + {% if themes_hierarchy %} + +

{{node.name}}

+
+
+ + {% if user_access == "allow" %} + + + + Add Theme Item + + +
+ +

Add New Theme Item:

+ +
+ +

+ + + + × + +
+ {% endif %} +
+ + + +
+ {% if user.is_authenticated %} + {% if user_access == "allow" %} + + + Select All    + +
+ +

{% trans "Are you sure you want to delete? All of the related items for the following themes also will be deleted:" %}

+ + + +
+ × + +
+ + {% endif %} + {% endif %} +
+
+
+ + {% endif %} -- cgit v1.1 From ba1224791a1183fcf912863f997a4a9de265dafa Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Mon, 6 Jul 2015 17:59:40 +0530 Subject: Provided option for download of collapsible graph --- .../gnowsys_ndf/ndf/templates/ndf/theme.html | 59 ++++++++++++++-------- 1 file changed, 39 insertions(+), 20 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index 043eff3..8afc7e0 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -297,28 +297,28 @@ */ /* for reingold tilford tree -- end */ - .node { + /*.node { cursor: pointer; - } - + }*/ +/* .node circle { fill: #fff; stroke: steelblue; stroke-width: 1.5px; } - - .node text { +*/ + /*.node text { font-size:10px; font-family:sans-serif; - } - + }*/ +/* .link { fill: none; stroke: #ccc; stroke-width: 1.5px; } - - #theme-drag-zoom-tree{ +*/ + #theme-drag-zoom-tree-container{ border: medium dashed #D8BFD8; border-radius: 5px; } @@ -329,12 +329,24 @@ stroke-width: 3px; } */ - .ghostCircle.show{ + /*.ghostCircle.show{ display:block; - } - + }*/ +/* .ghostCircle, .activeDrag .ghostCircle{ display: none; + }*/ + + .download-graph{ + color: gray + } + .download-graph:hover { + color: black; + background-color: lightgray; + font-size: large; + cursor: pointer; + padding: 0.5em; + transition: all 1s; } @@ -402,7 +414,14 @@
-
+
+
+
+
+ Download "{{node.name}}" Collapsible Graph +
+
+
{% include 'ndf/theme_drag_zoom_d3tree.html' %} {% endcache %} @@ -585,13 +604,13 @@ {% if tree == "hierarchical" %} if({{unfold}}) { - $("#theme-drag-zoom-tree").addClass("hide") + $("#theme-drag-zoom-tree-container").addClass("hide") $(".themes").removeClass("hide"); plotHierarchyTree(true); } else { - $("#theme-drag-zoom-tree").addClass("hide") + $("#theme-drag-zoom-tree-container").addClass("hide") $(".themes").removeClass("hide"); plotHierarchyTree(false); } @@ -608,7 +627,7 @@ {% endif %} - $("#theme-drag-zoom-tree").removeClass("hide"); + $("#theme-drag-zoom-tree-container").removeClass("hide"); {% endif %} @@ -618,7 +637,7 @@ $(".fold").click(function() { - // $("#theme-drag-zoom-tree").addClass("hide") + // $("#theme-drag-zoom-tree-container").addClass("hide") // $(".themes").removeClass("hide"); // plotHierarchyTree(false); // $(function() { @@ -629,7 +648,7 @@ // script for unfold themes hierarchy $(".unfold").click(function() { - // $("#theme-drag-zoom-tree").addClass("hide") + // $("#theme-drag-zoom-tree-container").addClass("hide") // $(".themes").removeClass("hide"); // plotHierarchyTree(true); // $(function() { @@ -639,7 +658,7 @@ $(".tree_browser").click(function() { - // $("#theme-drag-zoom-tree").addClass("hide") + // $("#theme-drag-zoom-tree-container").addClass("hide") // $(".themes").removeClass("hide"); // plotHierarchyTree() // $(function() { @@ -660,7 +679,7 @@ // {% endif %} - // $("#theme-drag-zoom-tree").removeClass("hide") + // $("#theme-drag-zoom-tree-container").removeClass("hide") }); // $("#theme-drag-zoom-container").removeClass("hide"); -- cgit v1.1 From 899a10519a8153d5c03f9d88a570b83e68a7a87e Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Mon, 6 Jul 2015 18:00:58 +0530 Subject: styling of collapsible graph through d3 code only --- .../ndf/templates/ndf/theme_drag_zoom_d3tree.html | 49 +++++++++++++++------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html index a62f331..0e7186f 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html @@ -436,6 +436,7 @@ return "translate(" + source.y0 + "," + source.x0 + ")"; }) .attr("data-coll-node-id", function(d) {return d.id || (d.id = ++i); }) + .style("cursor", "pointer") .on('click', click); nodeEnter.append("circle") @@ -443,7 +444,9 @@ .attr("r", 0) .style("fill", function(d) { return d._children ? "lightsteelblue" : "#fff"; - }); + }) + .style("stroke-width", "1.5px") + .style("stroke", "steelblue"); nodeEnter.append("text") .attr("x", function(d) { @@ -457,21 +460,23 @@ .text(function(d) { return d.name; }) - .style("fill-opacity", 0); + .style("fill-opacity", 0) + .style("font-family", "sans-serif") + .style("font-size", "10px"); // phantom node to give us mouseover in a radius around it - nodeEnter.append("circle") - .attr('class', 'ghostCircle') - .attr("r", 30) - .attr("opacity", 0.2) // change this to zero to hide the target area - .style("fill", "red") - .attr('pointer-events', 'mouseover') - .on("mouseover", function(node) { - overCircle(node); - }) - .on("mouseout", function(node) { - outCircle(node); - }); + // nodeEnter.append("circle") + // .attr('class', 'ghostCircle') + // .attr("r", 30) + // .attr("opacity", 0.2) // change this to zero to hide the target area + // // .style("fill", "red") + // .attr('pointer-events', 'mouseover') + // .on("mouseover", function(node) { + // overCircle(node); + // }) + // .on("mouseout", function(node) { + // outCircle(node); + // }); // Update the text to reflect whether node has children or not. node.select('text') @@ -535,7 +540,10 @@ source: o, target: o }); - }); + }) + .style("stroke", "#ccc") + .style("stroke-width", "1.5px") + .style("fill", "none"); // Transition links to their new position. link.transition() @@ -636,6 +644,15 @@ // } - // expandHierarchy(selectedNodeData[0]); + // expandHierarchy(selectedNodeData[0]); + + function downloadCollapsibleGraph(filename) + { + var blob = new Blob([$("#theme-drag-zoom-tree").html()], {type: "image/svg+xml"}); + filename = filename.replace(/\ /g, '_'); + filename += "_collapsible_Graph.svg"; + saveAs(blob, filename); + } + -- cgit v1.1 From ebd6ef6ff10522b487b53424527b1637ec16bcee Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Mon, 6 Jul 2015 18:56:49 +0530 Subject: Showing blockui while loading the graph --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html | 5 ++++- .../gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index 8afc7e0..d1aaf1d 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -342,7 +342,7 @@ } .download-graph:hover { color: black; - background-color: lightgray; + background-color: #e5e5e5; font-size: large; cursor: pointer; padding: 0.5em; @@ -604,12 +604,14 @@ {% if tree == "hierarchical" %} if({{unfold}}) { + $("article").block({message: '

Building a graph...
Please hold on...

'}); $("#theme-drag-zoom-tree-container").addClass("hide") $(".themes").removeClass("hide"); plotHierarchyTree(true); } else { + $("article").block({message: '

Building a graph...
Please hold on...

'}); $("#theme-drag-zoom-tree-container").addClass("hide") $(".themes").removeClass("hide"); plotHierarchyTree(false); @@ -621,6 +623,7 @@ {% if node %} + $("article").block({message: '

Building a graph...
Please hold on...

'}); $.getJSON("{% url 'get_tree_hierarchy' group_id node.pk %}?collapsible=true", function(data){ treeData = data;}) .done(function(){plotDragZoomTree(treeData); }); diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html index 0e7186f..a130c48 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html @@ -649,8 +649,8 @@ function downloadCollapsibleGraph(filename) { var blob = new Blob([$("#theme-drag-zoom-tree").html()], {type: "image/svg+xml"}); - filename = filename.replace(/\ /g, '_'); - filename += "_collapsible_Graph.svg"; + filename = filename.replace(/\ /g, '-'); + filename += "-Collapsible-Graph.svg"; saveAs(blob, filename); } -- cgit v1.1 From 2bccc34943e6b174eacb40b8b50b8c931418eded Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Tue, 7 Jul 2015 08:36:12 +0530 Subject: Allowing only single file selection for file upload --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html index d0775fa..157f575 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html @@ -35,7 +35,7 @@
- +
@@ -189,7 +189,16 @@ License
- + + {% get_licence as licence %} +
-- cgit v1.1 From 4b176b6ef3a321f7fe19a2276bc9b1c9122bab89 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Tue, 7 Jul 2015 08:38:39 +0530 Subject: Showing 'based on url', 'source', 'license' fields in node_ajax_view.html --- .../gnowsys_ndf/ndf/templates/ndf/node_edit_base.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html index 64b3cdb..5a930fe 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html @@ -378,15 +378,28 @@ i.remove-tag{
{% endfor %} -
+
+
+ +
+
+ +
+
{% endcache %} -- cgit v1.1 From 6f841adaf8d0d0243d84e87e3f9d2a13d09848f1 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Tue, 7 Jul 2015 16:09:55 +0530 Subject: Handling css, cache and theme.html landing concequnces --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html | 8 ++++++-- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html index ff7f674..2864bba 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html @@ -1,19 +1,23 @@ {% load i18n %} -{% load cache %} {% load ndf_tags %} {% get_group_name groupid as group_name_tag %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index d1aaf1d..ce33fb1 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -408,7 +408,7 @@ {% if themes_hierarchy and node %} - {% cache 300 theme_tree node.pk request.LANGUAGE_CODE %} + {% cache 300 theme_tree node.pk request.LANGUAGE_CODE tree unfold %} {% include "ndf/hierarchy_tree.html" %}
@@ -599,7 +599,8 @@ // ------ jqtree tree ------ // script for fold themes_cards hierarchy - {% if node %} + // being the common template for all, to distinguish between the tree landing using following condition: + {% if node and tree %} {% if tree == "hierarchical" %} if({{unfold}}) -- cgit v1.1 From e4a31f388b272836e61494c01e7a00d28581875a Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Tue, 7 Jul 2015 16:41:44 +0530 Subject: Adding metadata to SVG and making SVG graphs as per standards --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html index a130c48..3710cda 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html @@ -150,6 +150,8 @@ .attr("width", viewerWidth) .attr("height", viewerHeight) .attr("class", "overlay") + .attr("version", "1.0") + .attr("xmlns", "http://www.w3.org/2000/svg") .call(zoomListener); // // Define the drag listeners for drag/drop behaviour of nodes. -- cgit v1.1 From c50a59db94a3997c42a96ce9e5d279861f10622a Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Tue, 7 Jul 2015 17:29:11 +0530 Subject: Showing teaches topics in the resource breadcrumb --- .../ndf/templates/ndf/node_ajax_view.html | 28 ++++++++-------------- 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') 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 bb3d0a0..6548448 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 @@ -303,7 +303,6 @@ ul#navigation li a.last {
- {% if breadcrumbs_list %} + {% elif node.teaches %} + + {% endif %} {% if node.status == 'MODERATION' %} @@ -559,23 +567,7 @@ ul#navigation li a.last { --> {% endcomment %} -
- {% get_teaches_list node as teaches_list %} - {% if teaches_list %} -
-
Resource for:
- {% for each_node in teaches_list %} - {% get_grid_fs_object each_node as grid_fs_obj %} - {% if each_node.mime_type %} - {{ each_node.name }},  - {% else %} - {{ each_node.name }} - {% if not forloop.last %},  {% endif %} - {% endif %} - {% endfor %} -
- {% endif %} -
+
-- cgit v1.1 From 46bb5930d2f476370d53a8b13a1bb1d191886790 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Wed, 8 Jul 2015 16:46:36 +0530 Subject: Showing course gst's info on LHS --- .../gnowsys_ndf/ndf/templates/ndf/course.html | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html index 6573df0..43a5da3 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html @@ -12,16 +12,27 @@ {% block meta_content %} -

{% trans "Courses" %}

- {% if user.is_authenticated %} - {% user_access_policy groupid request.user as user_access %} - {% if user_access == "allow" %} - -    {% trans "New" %} {{title}} - - {% trans "Announce" %} - {% endif %} + + +

+ {% if course_gst.altnames and course_gst.altnames != "None" %} + {{course_gst.altnames}} + {% else %} + {{course_gst.name}} + {% endif%} +

+ {{course_gst.content|safe}} +
+ + {% if user.is_authenticated %} + {% user_access_policy groupid request.user as user_access %} + {% if user_access == "allow" %} + +    {% trans "New" %} {{title}} + + {% trans "Announce" %} {% endif %} + {% endif %} {% endblock %} -- cgit v1.1 From 83eb43b26bb2824a1c97f277ce1fca72ef4940d1 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Wed, 8 Jul 2015 16:48:35 +0530 Subject: Showing theme gst's info on LHS --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index ce33fb1..0f0d237 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -364,7 +364,16 @@ {% endcomment %} {% block meta_content %} -

{% trans "Themes" %}

+ +

+ {% if theme_GST.altnames and theme_GST.altnames != "None" %} + {{theme_GST.altnames}} + {% else %} + {{theme_GST.name}} + {% endif%} +

+
+ {{theme_GST.content|safe}} {% endblock %} {% block related_content %} @@ -374,17 +383,17 @@
    - {% get_memberof_objects_count theme_GST_id groupid as count %} + {% get_memberof_objects_count theme_GST.pk groupid as count %}
  • {% if user_access == "allow" %} - + + Add {% endif %} - + Theme ({{count}}) -- cgit v1.1 From a6b3209c78d2abcd3e53014bc0f3c9faa1bd8ba6 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Wed, 8 Jul 2015 16:49:43 +0530 Subject: Showing ebook gst's info on LHS --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html index b1a184f..44cd105 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html @@ -4,6 +4,21 @@ {% block title %} Repository {% endblock %} + +{% block meta_content %} + +

    + {% if ebook_gst.altnames and ebook_gst.altnames != "None" %} + {{ebook_gst.altnames}} + {% else %} + {{ebook_gst.name}} + {% endif%} +

    +
    + {{ebook_gst.content|safe}} +{% endblock %} + + {% block body_content %}
    -- cgit v1.1 From 90da3f8ba6f480b0b422dd8a950270fec8c9fe4b Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Wed, 8 Jul 2015 17:52:55 +0530 Subject: Not showing None if no content --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html | 2 +- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html | 2 +- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html | 2 +- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html index 43a5da3..bed3a68 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course.html @@ -21,7 +21,7 @@ {{course_gst.name}} {% endif%} - {{course_gst.content|safe}} + {{course_gst.content|default_if_none:""|safe}} {% if user.is_authenticated %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html index 44cd105..4b969ba 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ebook.html @@ -15,7 +15,7 @@ {% endif%} - {{ebook_gst.content|safe}} + {{ebook_gst.content|default_if_none:""|safe}} {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html index ba8b5be..3cf5c35 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html @@ -53,7 +53,7 @@ {{app_gst.name}} {% endif%} - {{app_gst.content|safe}} + {{app_gst.content|default_if_none:""|safe}} {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index 0f0d237..7fa7240 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -373,7 +373,7 @@ {% endif%} - {{theme_GST.content|safe}} + {{theme_GST.content|default_if_none:""|safe}} {% endblock %} {% block related_content %} -- cgit v1.1 From 64d799f6ed83de26b032237f177acc249ec79a50 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Thu, 9 Jul 2015 00:48:24 +0530 Subject: Reduced top space in hierarchy and removed commented (shifted) code --- .../ndf/templates/ndf/hierarchy_tree.html | 76 +--- .../gnowsys_ndf/ndf/templates/ndf/theme.html | 402 +++++---------------- 2 files changed, 92 insertions(+), 386 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html index 2864bba..26aa45d 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html @@ -5,25 +5,23 @@ - - - {% if themes_hierarchy %} - -

    {{node.name}}

    -
    -
    - - {% if user_access == "allow" %} - - - + Add Theme Item - - -
    - -

    Add New Theme Item:

    - -
    - -

    - - - - × - -
    - {% endif %} -
    - - - -
    - {% if user.is_authenticated %} - {% if user_access == "allow" %} - - - Select All    - -
    - -

    {% trans "Are you sure you want to delete? All of the related items for the following themes also will be deleted:" %}

    - - - -
    - × - -
    - - {% endif %} - {% endif %} -
    -
    -
    - - {% endif %} + diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index 7fa7240..33ac64b 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -21,325 +21,17 @@ - {% endblock%} - + {% block meta_content %} @@ -400,12 +107,61 @@
- +
{% endif %} +
+
+ {% if user_access == "allow" %} + + + + Add Theme Item + + +
+ +

Add New Theme Item:

+ +
+ +
+
+ + + + × + +
+ + {% endif %} + +
+ +
+ {% if user.is_authenticated %} + {% if user_access == "allow" %} + + Select All + + +
+ +

{% trans "Are you sure you want to delete? All of the related items for the following themes also will be deleted:" %}

+ + + +
+ × + +
+ + {% endif %} + {% endif %} +
+ {% endblock %} @@ -413,9 +169,29 @@ {% user_access_policy groupid request.user as user_access %} - {% if themes_hierarchy and node %} +
{{node.name}}
+ + + +
+
{% cache 300 theme_tree node.pk request.LANGUAGE_CODE tree unfold %} -- cgit v1.1 From cc5be08728173f0b57f250ee1cad5af8eeaf8db9 Mon Sep 17 00:00:00 2001 From: Kedar Aitawdekar Date: Thu, 9 Jul 2015 16:58:59 +0530 Subject: Making first child of hierarchy open in collapsible tree --- gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html | 8 -------- .../gnowsys_ndf/ndf/templates/ndf/moderation_data_review.html | 2 +- .../gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html | 6 +++++- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/templates') diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html index 26aa45d..bc9ff32 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/hierarchy_tree.html @@ -129,9 +129,7 @@ if (node.node_type == "Topic"){ location.href = "/{{group_name_tag}}/topic_details/"+node.id+"?nav_li="+nav_list+""; } - } - } ); @@ -156,16 +154,11 @@ alert("Topic "+node.name+" deleted successfully"); location.reload(true); }, - }); - } {% endif %} - } ); - - }; @@ -549,5 +542,4 @@ }); - diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/moderation_data_review.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/moderation_data_review.html index 06505c0..7676a47 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/moderation_data_review.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/moderation_data_review.html @@ -42,7 +42,7 @@ function approveResource (oid) { alert("Resource is successfully approved from this group."); // fetching resource blank seperator row - var $resBlankRow = $("tr#blank-row-" + "5577ed2b90b5502857a8e67d"); + var $resBlankRow = $("tr#blank-row-" + oid); // fetching resource object VIEW row var $resViewRow = $("tr#view-row-" + oid); // fetching resource object EDIT row diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html index 3710cda..a7fdb0c 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme_drag_zoom_d3tree.html @@ -579,7 +579,6 @@ // Define the root root = treeData; - aaa = root; root.x0 = viewerHeight / 2; root.y0 = 0; @@ -589,6 +588,11 @@ update(root); centerNode(root); + setTimeout(function () { + firstChild = root.children[0]; + click(firstChild); + }, 1500); + // recursive function needed to get data for {{selected}} node // result = "" // function getData (d) { -- cgit v1.1