diff options
Diffstat (limited to 'gstudio/templates/gstudio/fullscreen.html')
-rw-r--r-- | gstudio/templates/gstudio/fullscreen.html | 75 |
1 files changed, 59 insertions, 16 deletions
diff --git a/gstudio/templates/gstudio/fullscreen.html b/gstudio/templates/gstudio/fullscreen.html index 8c3efed..e08a09d 100644 --- a/gstudio/templates/gstudio/fullscreen.html +++ b/gstudio/templates/gstudio/fullscreen.html @@ -1,17 +1,47 @@ +{% extends "gstudio/base.html" %} {% load adminmedia grp_tags %} {% load i18n comments gstudio_tags %} {% load tagging_tags comments i18n %} - -<html> -<head> +{% block content %} +<script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> +<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/sets/org/set.js"></script> +<script type="text/javascript" src="{{STATIC_URL}}gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js"></script> + <script type="text/javascript" > + $(window).load(function() { + $("#content").css({ + "width": "600px",});}); +$(window).load(function() { + $("#chart").hide();}); +$(window).load(function() { + + $("#graphcss").hide(); + }); +jQuery(document).ready(function($) { + $("#editcontent").click(function(){ + document.getElementById('gnoweditor').style.visibility="visible"; + $("#gnoweditor").val($("#editortext").val()); + $("#gnoweditor").orgitdown(mySettings); + document.getElementById('save').style.visibility="visible"; + $("#editcontent").hide(); + + }); + $("#save").click(function(){ + var org_data = $("#gnoweditor").val(); + var encode_data = encodeURIComponent(org_data); + var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " ")); + $("#commenttext").val(decode_data); + + }); +}); +</script> +</script> <link href="{% admin_media_prefix %}css/base.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" media="screen, projection" href="{{ STATIC_URL }}gstudio/css/screen.css" /> <link rel="shortcut icon" href="{{ STATIC_URL }}gstudio/img/favicon.ico" /> -</head> -<body> <img src="{% admin_media_prefix %}img/{{image.image}}" > <br/> +<form method="post" action="">{% csrf_token %} <font color = 'black'>Name : </font><font color = 'teal'>{{image.title}}</font> <br/> <font color = 'black'>Posted By : </font> @@ -22,14 +52,34 @@ <font color = 'black'>Posted At : </font><font color = 'teal'>{{image.creation_date}}</font> <br/> -<font color = 'black'>Description:</font><font color = 'teal'>{{ image.content }}</font> -<br/> +<font color = 'black'>Description:</font><font color = 'teal'> +{%autoescape on%} +{% with image.html_content|safe as image_content %} + {{image_content}} +{% endwith %} +{% endautoescape%} +</font> + +{% for author in image.authors.all %} + {% ifequal author.username user.username %} +<input type="hidden" name="imgid" value={{image.id}}> +<input type="button" id="editcontent" value="Edit"/> + +<input type="submit" class="commentsavecontent" id="save" value="Save" style="visibility:hidden" /> +<input type="hidden" name="contenttext" id="commenttext" style="visibility:hidden" /> +<input type="hidden" id="editortext" style="visibility:hidden" value="{{image.content_org}}"> + {% endifequal %} +{% endfor %} +</form> + +<br/> {% ifequal image.rating.get_rating 0 %} <font color = 'black'>Current rating is: <font color = 'teal'> No rating yet </font></font> {% else %} -<font color = 'black'>Current rating is: <font color = 'teal'> {{ image.rating.get_rating }} </font></font> +<font color = 'black'>Average Current rating is: <font color = 'teal'> {{ image.rating.get_rating }} </font></font><br/> +<font color = 'black'>Total Number of votes is: <font color='teal'><b>{{ image.rating_votes }}</b></font> </font> {% endifequal %} <br> <form method="post" action=""> @@ -42,13 +92,6 @@ </br> <input type="hidden" name="imgid" value={{image.id}}> <input type="submit" value="Rate it!!!"> -<script type="text/javascript"> -function myFunction() -{ - document.this_form.action = "/gstudio/resources/images/"; -} -</script> -<input type="submit" value="Back" onclick()="myFunction()"> </form> <br/> @@ -124,4 +167,4 @@ function myFunction() <hr width="100%" style="height:5px;" color="black"/> <br> -</html></body> +{% endblock %} |