summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/priorpost.html
diff options
context:
space:
mode:
authorgnowgi <nagarjun@gnowledge.org>2012-12-19 07:49:01 -0800
committergnowgi <nagarjun@gnowledge.org>2012-12-19 07:49:01 -0800
commit09ceb4b84ef4b56db42d24ba60e4c58bb9e0a951 (patch)
treee78056bee2300fab25cf675ccd989e46e103497a /gstudio/templates/gstudio/priorpost.html
parent3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36 (diff)
parentfb6d7b562bf6e2fad92a49061489af1abb92f2f6 (diff)
downloadgnowsys-master.tar.gz
Merge pull request #86 from anujag/masterHEADmaster
this commit, includes several unlisted features.
Diffstat (limited to 'gstudio/templates/gstudio/priorpost.html')
-rw-r--r--gstudio/templates/gstudio/priorpost.html68
1 files changed, 68 insertions, 0 deletions
diff --git a/gstudio/templates/gstudio/priorpost.html b/gstudio/templates/gstudio/priorpost.html
new file mode 100644
index 00000000..49e4a8af
--- /dev/null
+++ b/gstudio/templates/gstudio/priorpost.html
@@ -0,0 +1,68 @@
+{% load gstudio_tags %}
+{% load i18n %}
+<script type="text/javascript" >
+
+var availableObjects = [];
+$.merge(availableObjects, {% get_pri_post_page %})
+
+jQuery(document).ready(function($) {
+$("#addpriorpost").click(function(){
+
+var data
+data = $("#priorpage").attr('value');
+$.ajax({
+url: '/gstudio/resources/images/addpriorpost/',
+//type:"POST",
+data: {title:data,titleid:{{objectid}}},
+success: function(data){
+$('#priorpostpages').html(data);
+
+}
+});
+$("#priorpage").val("");
+});
+});
+
+$(document).ready(function(){
+$( "#priorpage" ).autocomplete({
+source: availableObjects
+});
+});
+
+</script>
+
+<div id = "priorpostpages">
+<br/>
+<strong>Prior Pages:</strong>
+{% for each in priorgbobject %}
+<a href="{{each.get_view_object_url}}">{{each}}</a>
+{% if not forloop.last %},{% endif %}
+{% empty %}
+ <span>No prior page</span>
+{% endfor %}
+<br/>
+<strong>Posterior Pages:</strong>
+{% for each in posteriorgbobject %}
+<a href="{{each.get_view_object_url}}">{{each}}</a>
+{% if not forloop.last %},{% endif %}
+{% empty %}
+ <span>No Posterior Page</span>
+{% endfor %}
+<br/>
+</div>
+
+{% if user.is_authenticated %}
+<!-- <form method="get" action=""> -->{% csrf_token %}
+
+<input type="hidden" name="docid" value={{objectid}}>
+<input id="priorpage" class="tagpriorpage" name="textpriorpage">
+<input type="button" class="priorpost" id="addpriorpost" value="Add Prior Page" name="addtags" />
+<br/><br/>
+<!-- <input type="button" id="titleeditcontent" name="" value="Edit a title"/>
+<input type="text" value="" name="texttags" id="texttagtitle" style="visibility:hidden" />
+<input type="button" class="titlecommentsavecontent" id="titlesave" value="Save" style="visibility:hidden" />
+<input type="hidden" name="titlecontenttext" id="titlecommenttext" style="visibility:hidden" />
+<input type="hidden" id="titleeditortext" style="visibility:hidden" value="{{ objecttitle }}">
+<!-- </form> -->
+{% endif %}
+