diff options
Diffstat (limited to 'gstudio/templates/metadashboard')
-rw-r--r-- | gstudio/templates/metadashboard/grpdashboard.html | 190 | ||||
-rw-r--r-- | gstudio/templates/metadashboard/pgedashboard.html | 94 | ||||
-rw-r--r-- | gstudio/templates/metadashboard/wikidashboard.html | 5 |
3 files changed, 195 insertions, 94 deletions
diff --git a/gstudio/templates/metadashboard/grpdashboard.html b/gstudio/templates/metadashboard/grpdashboard.html index 6ad36ac..8a1b335 100644 --- a/gstudio/templates/metadashboard/grpdashboard.html +++ b/gstudio/templates/metadashboard/grpdashboard.html @@ -4,7 +4,7 @@ {% load adminmedia grp_tags %} {% load i18n comments gstudio_tags %} {% load tagging_tags comments i18n %} - + {% block title %}{{meet_ob.title}}{% endblock %} {% block content %} <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" > @@ -21,6 +21,120 @@ $(".submitresponse").hide(); $("#editthreadsave").hide(); }); var i=0; +var availableTags = []; +$.merge(availableTags, {% get_add_tag %}) + +function notifedtdel() +{ + + +urlnot="/gstudio/group/notify/"+activity+"/"+not_obj+"/{{user.id}}" + +subactivity(urlnot,activity); +} + +function subactivity(urlnot,activity) +{ + if(activity=='added_response') + { + submitform(activity); + } + + if (activity != 'undefined') + { + + $.ajax({ + url: urlnot, + type:'GET', + success: function(){ + + submitform(activity); + } + }); + } + else + { + submitform(activity); + } +} + +function submitform(activity) +{ + + +if (activity=='edited_thread') +{ + +document.forms["threadform"].submit(); +} +if(activity=='edited_twist') +{ + + +$("#topicsubmit"+submtobj).trigger('click'); +} +if(activity=='added_response') +{ + +$("#topicsubmit"+submtobj).trigger('click'); +} +if(activity=='deleted_response') +{ + + document.forms["response"].submit(); +} +} + + + + + + + + +function Subscribeuser() +{ +if (confirm("{{user.username}},Do you want to Subscribe to get all alerts in your mail for this page")) +{ + +url = "/gstudio/group/notify/{{meet_ob.id}}/{{user.id}}" + +<!--alert(url);--> +<!-- $.get(url,function(){ --> +<!-- alert("notified user"); --> +<!-- }); --> +$.ajax({ + url: '/gstudio/group/notify/{{meet_ob.id}}/{{user.id}}', + success: function(){ + <!--alert('notified user');--> + } + }); +$("#sub2").val("UnSubscribe"); +$("#sub2").attr("onclick","UnSubscribeuser()"); +} +} + + + + + +function UnSubscribeuser() +{ +url = "/gstudio/group/notify/unsubscribe/{{meet_ob.id}}/{{user.id}}" + +<!--alert(url);--> +<!-- $.get(url,function(){ --> +<!-- alert("notified user"); --> +<!-- }); --> +$.ajax({ + url: '/gstudio/group/notify/unsubscribe/{{meet_ob.id}}/{{user.id}}', + success: function(){ + <!--alert('notified user');--> + } + }); +$("#sub1").val("Subscribe"); +$("#sub1").attr("onclick","Subscribeuser()"); +} </script> <style type="text/css"> #div2 @@ -36,17 +150,25 @@ var i=0; <!-- <input type="button" value="Home" onClick="location.href=parseURL('/gstudio/user/{{user.username}}');"> <h>Hello Welcome to the {{ meet_ob.title }}</h></br> --> - <font size ="3" > {{admin_m.username}}'s initial twist to the thread</font> - <!-- <h>You are logged in as <font color="blue">{{user.username}}</font></h> --> - </br> -<h2>{{meet_ob.title}}</h2> +<h2 style="line-height:1">{{meet_ob.title}}{% if user.is_authenticated %} {% edit_title meet_ob.id meet_ob.title %} {% endif %}</h2> +<font size ="3" > {{admin_m.username}}'s initial twist to the thread [ <a href="{{ meet_ob.get_absolute_url }}" title="{{ meet_ob.title }}" rel="bookmark">Show Graph</a> ] </font> +</br> +{% if user.is_authenticated %} + +{% check_subscribe meet_ob user as subscribe %} +{%if subscribe %} +<input type="button" id="sub1" value="UnSubscribe" name="edittitle" onclick="UnSubscribeuser()"> +{% else %} +<input type="button" id="sub2" value="Subscribe" name="edittitle" onclick="Subscribeuser()"> +{% endif %} +{% endif %} {% with meet_ob.html_content|safe as meet_ob_content %} <font size ="3" >{{meet_ob_content}} </font> {% endwith %} {% if user.is_authenticated %} -<form method="post" action=".">{% csrf_token %} +<form method="post" name="threadform" action=".">{% csrf_token %} <input type="hidden" id="threadid" value={{meet_ob.id}} style="visibility:hidden;" name="editiden"> <input type="hidden" id="threadedit{{meet_ob.id}}" style="visibility:hidden;" name="editval"> <input type="hidden" id="threadcontent{{meet_ob.id}}" value="{{meet_ob.content_org}}" style="visibility:hidden;" name="editcont"> @@ -54,7 +176,8 @@ var i=0; <br/> <input type="button" id="threadedit" value="Edit"> <input type="button" id="editthreadsave" value="Save"> -<input type="submit" id="subeditresp" value=Submit" style="visibility:hidden;"></br> +<input type="button" id="subeditresp" value="Submit" style="visibility:hidden;"> + </form> @@ -77,28 +200,13 @@ var i=0; {% endif %} </br> {% endif %} +{% endif %} - <form method="post" action="">{% csrf_token %} - <input type="hidden" name="docid" value={{meet_ob.id}}> - <input type="text" class="tagtext" value="" name="texttags" /> - <input type="submit" class="tag" value="Add Tags" name="addtags" /> - </form> - - <br> - <div class="tags"> - <p class="gbobject-tags span-16 last"> - <strong>{% trans "Tags" %}</strong> : - {% tags_for_object ot as tag_list %} - {% for tag in tag_list %} - <a href="{% url objectapp_tag_detail tag %}" - title="Tag {{ tag }}" rel="tag">{{ tag }}</a> - {% empty %} - <span>{% trans "No tags" %}</span> - {% endfor %} - </p> - </div> +<!--ADDING AND DISPLAY TAG--> +{% addtag ot meet_ob.id user %} <br/> +{% if user.is_authenticated %} <form method="post" action=".">{% csrf_token %} <!-- <input type="hidden" value="{{meet_ob.id}}" name = "meetid">--> <input type="button" id="twistaddbtn" value="Add your twist" onClick="location.href=parseURL('topicadd1/{{meet_ob.id}}');"> @@ -119,7 +227,7 @@ var i=0; --> </br> {% autoescape off %} {% for each in topic %} - <h4><font size="5" >{{each.title}}</font></h4> + <h4><font size="5" >{{each.title}}</font> [ <a href="{{ each.get_absolute_url }}" title="{{ each.title }}" rel="bookmark">Show Graph</a> ]</h4> Posted on : {{each.creation_date}} by : {% for author in each.authors.all %} @@ -141,10 +249,11 @@ var i=0; <input type="hidden" value="{{each.id}}" name = "iden"> <input type="hidden" value="{{user.id}}" name = "idusr"> <br/> {% if user.is_authenticated %} + <input type="button" class="editcontent" name="{{each.content_org}}" id="{{each.id}}" value="Edit"> <input type="button" class="editor" id="{{ each.id }}" value="Add Response"/> <input type="hidden" class="editval" id="edit{{each.id}}" name="edit" value="empty"> <input type="button" class="savecontent" id="save{{ each.id }}" value="Save" onclick="topicsaveclick(document.getElementById('hidden{{ each.id }}').value)"><br/> - <input type="button" class="editcontent" name="{{each.content_org}}" id="{{each.id}}" value="Edit"> + <input type="submit" class="submitresponse" id="topicsubmit{{ each.id }}" value="Submit"></br> {% endif %} {% ifequal user.id admin_id %} @@ -171,27 +280,10 @@ var i=0; <input type="submit" value="Rate it!!!"> --> </form> </div> - {% if user.is_authenticated %} - <form method="post" action="">{% csrf_token %} - <input type="hidden" name="docid" value={{each.id}}> - <input type="text" class="tagtext" value="" name="texttags" /> - <input type="submit" class="tag" value="Add Tags" name="addtags" /> - </form> - - <br> - <div class="tags"> - <p class="gbobject-tags span-16 last"> - <strong>{% trans "Tags" %}</strong> : - {% tags_for_object each as tag_list %} - {% for tag in tag_list %} - <a href="{% url objectapp_tag_detail tag %}" - title="Tag {{ tag }}" rel="tag">{{ tag }}</a> - {% empty %} - <span>{% trans "No tags" %}</span> - {% endfor %} - </p> - </div> - {% endif %} + +<!--ADDING AND DISPLAY TAG--> +{% addtag each each.id user %} + <br/> <p> Responses : diff --git a/gstudio/templates/metadashboard/pgedashboard.html b/gstudio/templates/metadashboard/pgedashboard.html index 1e48755..e20b93a 100644 --- a/gstudio/templates/metadashboard/pgedashboard.html +++ b/gstudio/templates/metadashboard/pgedashboard.html @@ -5,7 +5,7 @@ {% load pagination_tags %} {% load i18n objectapp_tags %} {% load tagging_tags comments i18n %} - +{% block title %}{{ page_ob.title }}{% endblock %} <!-- {% load i18n %} --> {% block content %} <style> @@ -14,6 +14,8 @@ </style> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" > +var availableTags = []; +$.merge(availableTags, {% get_add_tag %}) $(window).load(function() { $("#content").css({ "width": "1000px",});}); @@ -43,11 +45,11 @@ $(".savesubsec1").hide(); {% autopaginate section 1 %} <!-- <input type="button" value="Home" onClick="location.href=parseURL('/gstudio/user/wikipage/{{user.username}}');"> --> - <h1>{{ page_ob.title }}</h1> + <h1 style="line-height:0.5">{{ page_ob.title }} {% if user.is_authenticated %} {% edit_title page_ob.id page_ob.title %} {% endif %}</h1> Wikipage posted on : {{page_ob.creation_date}} by {% for author in page_ob.authors.all %} {{author}} - {% endfor %}</br></br> + {% endfor %} [ <a href="{{ page_ob.get_absolute_url }}" title="{{ page_ob.title }}" rel="bookmark">Show Graph</a> ] </br></br> {% with page_ob.html_content|safe as page_ob_content %} <font size="3"> @@ -64,37 +66,51 @@ $(".savesubsec1").hide(); <input type="button" class="savepagecontent" name="{{page_ob.id}}" value="Save"/></br> <input type="submit" class="pagedit" value="Submit"/> </form> + {% endif %} + <!-- Add relations for a page --> + + {% add_res_relation page_ob %} + <br/> - <form method="post" action="">{% csrf_token %} - <input type="hidden" name="docid" value={{page_ob.id}}> - <input type="text" class="tagtext" value="" name="texttags" /> - <input type="submit" class="tag" value="Add Tags" name="addtags" /> - </form> - {% endif %} - <br> - <div class="tags"> - <p class="gbobject-tags span-16 last"> - <strong>{% trans "Tags" %}</strong> : - {% tags_for_object ot as tag_list %} - {% for tag in tag_list %} - <a href="{% url objectapp_tag_detail tag %}" - title="Tag {{ tag }}" rel="tag">{{ tag }}</a> - {% empty %} - <span>{% trans "No tags" %}</span> - {% endfor %} - </p> - </div> - </br> + + <!--ADDING PRIOR PAGE--> + {% addpriorpost page_ob.id user %} + <!--ADDING AND DISPLAY TAG--> + {% addtag ot page_ob.id user %} + + {% ifequal document.rating.get_rating 0 %} + + <font color = 'black'>Current rating is: <font > No rating yet </font></font> + {% else %} + <font color = 'black'>Average Current rating is: </font><h4>{{ page_ob.rating.get_rating }}</h4> + <font color = 'black'>Total Number of votes is: <font ><b>{{ page_ob.rating_votes }}</b></font> </font> + {% endifequal %} + <br> + {% if user.is_authenticated %} + <form method="post" action=""> + {% csrf_token %} + <input name="star1" type="radio" value=1 class="star"/> + <input name="star1" type="radio" value=2 class="star"/> + <input name="star1" type="radio" value=3 class="star"/> + <input name="star1" type="radio" value=4 class="star"/> + <input name="star1" type="radio" value=5 class="star"/> + </br> + <input type="hidden" name="iden" value={{page_ob.id}}> + <input type="submit" value="Rate it!!!"> + </form><br> + {% endif %} + + {% if user.is_authenticated %} <form method="post" action=".">{% csrf_token %} - <input type="button" id="newsection1" value="Add a new Section" onClick="location.href=parseURL('sectionadd1/{{page_ob.id}}');"> + <!--<input type="button" id="newsection1" value="Add a new Section" onClick="location.href=parseURL('sectionadd1/{{page_ob.id}}');">--> <input type="hidden" id="pageid1" value="{{page_ob.id}}"/> </form> {% endif %} </br> {% autoescape off %} {% for each in section %} - <h4><font size="6">{{each.title}}</h4></font> + <h4><font size="6">{{each.title}} [ <a href="{{ each.get_absolute_url }}" title="{{ each.title }}" rel="bookmark">Show Graph</a> ]</h4></font> Posted on : {{each.creation_date}} by {% for author in each.authors.all %} {{author}} @@ -121,33 +137,21 @@ $(".savesubsec1").hide(); <input type="button" class="saveseccontent" name="{{each.id}}" value="Save"/> <input type="submit" class="submitresponse" value="Submit"/> </form> - <form method="post" action="">{% csrf_token %} - <input type="hidden" name="docid" value={{each.id}}> - <input type="text" class="tagtext" value="" name="texttags" /> - <input type="submit" class="tag" value="Add Tags" name="addtags" /> - </form> {% endif %} - <br> - <div class="tags"> - <p class="gbobject-tags span-16 last"> - <strong>{% trans "Tags" %}</strong> : - {% tags_for_object each as tag_list %} - {% for tag in tag_list %} - <a href="{% url objectapp_tag_detail tag %}" - title="Tag {{ tag }}" rel="tag">{{ tag }}</a> - {% empty %} - <span>{% trans "No tags" %}</span> - {% endfor %} - </p> - </div> + <br> + + <!--ADDING AND DISPLAY TAG--> + {% addtag each each.id user %} + + {% if user.is_authenticated %} <form method="post" action=".">{% csrf_token %}<br/> - Create Subsection: + <!-- Create Subsection:--> <input type="hidden" name = "replytosection" class="reptext" style="visibility:hidden;"/></br> <input type="hidden" value="{{each.id}}" name = "iden"> <input type="hidden" value="{{user.username}}" name ="usr"> <input type="hidden" value="{{user.id}}" name = "idusr"> - <input type="button" value="Create Subsection" class="createsubsection"> + <!--<input type="button" value="Create Subsection" class="createsubsection">--> <input type="hidden" value="empty" name = "edit" class="editval"/> <input type="button" value="save" class="savesubsec" name="{{each.id}}"> diff --git a/gstudio/templates/metadashboard/wikidashboard.html b/gstudio/templates/metadashboard/wikidashboard.html index 1af53ce..75382f2 100644 --- a/gstudio/templates/metadashboard/wikidashboard.html +++ b/gstudio/templates/metadashboard/wikidashboard.html @@ -1,6 +1,7 @@ {% extends "gstudio/base.html" %} {% load gstudio_tags %} {% load i18n %} +{% block title %}Wikipages{% endblock %} {% block content %} @@ -8,6 +9,10 @@ <p> Here is a list of all the pages:</p> </br> + {% if user.is_authenticated %} + <input type="button" value="Create a new page" onClick="location.href=parseURL('pageadd/');"> + <br/> + {% endif %} {% for each in pages.member_systems.all %} <a href="/gstudio/page/gnowsys-page/{{each.id}}/">{{each.title}}</a></br> {% endfor %} |