summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/priorpost.html
diff options
context:
space:
mode:
authoranujag <anujag@anujag-D630.(none)>2012-12-14 14:24:09 +0530
committeranujag <anujag@anujag-D630.(none)>2012-12-14 14:24:09 +0530
commitf5aa055c011c0cf60b7722da2a3d6192a233122d (patch)
treefb253681e989a1efc46999e198b2c5f9797758b3 /gstudio/templates/gstudio/priorpost.html
parent3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36 (diff)
downloadgnowsys-f5aa055c011c0cf60b7722da2a3d6192a233122d.tar.gz
Updated code with recent changes
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 0000000..49e4a8a
--- /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 %}
+