diff options
author | Dhiru <dhiru@labadmin-P5E-Deluxe.(none)> | 2012-08-03 13:41:57 +0530 |
---|---|---|
committer | Dhiru <dhiru@labadmin-P5E-Deluxe.(none)> | 2012-08-03 13:41:57 +0530 |
commit | a5796265013443c349797508ef8066541c1a3a02 (patch) | |
tree | 87cf43ee35307906f77aa84f1c1ca273bd32208f /gstudio/templates/gstudio | |
parent | 3c6b52086767a59b83c51f88ea95f75d08f9f0fa (diff) | |
download | gnowsys-a5796265013443c349797508ef8066541c1a3a02.tar.gz |
Changes done in image,video&document library
Diffstat (limited to 'gstudio/templates/gstudio')
-rw-r--r-- | gstudio/templates/gstudio/docu.html | 101 | ||||
-rw-r--r-- | gstudio/templates/gstudio/fullscreen.html | 127 | ||||
-rw-r--r-- | gstudio/templates/gstudio/home.html | 10 | ||||
-rw-r--r-- | gstudio/templates/gstudio/image.html | 189 | ||||
-rw-r--r-- | gstudio/templates/gstudio/transcript.html | 118 | ||||
-rw-r--r-- | gstudio/templates/gstudio/video.html | 270 |
6 files changed, 598 insertions, 217 deletions
diff --git a/gstudio/templates/gstudio/docu.html b/gstudio/templates/gstudio/docu.html index 7be5aa7..dc9f151 100644 --- a/gstudio/templates/gstudio/docu.html +++ b/gstudio/templates/gstudio/docu.html @@ -1,37 +1,77 @@ + <html> + <body> {% extends "gstudio/base.html" %} -{% load i18n %} +{% load pagination_tags %} {% load adminmedia grp_tags %} +{% load i18n comments gstudio_tags %} +{% load i18n objectapp_tags %} {% block content %} +{% load tagging_tags comments i18n %} +<script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> + <script type="text/javascript" > + $(window).load(function() { + $("#content").css({ + "width": "600px",});}); +$(window).load(function() { + $("#chart").hide();}); +$(window).load(function() { + + $("#graphcss").hide(); + }); +var i = 0; +</script> +<style type="text/css"> +#divpost +{ +position:relative; +} +#divsearch +{ +position:absolute; +margin-left:61%; +margin-top:-26%; +} +</style> {% if user.is_authenticated %} -<h1 style="color: teal;">Welcome to the DocZilla</h1> -<p><img id="zoomable" src="{% admin_media_prefix %}img/docs.png" width="250" height="250" alt="{{ image.title }}" class="left" /></p> -<h2>Logged in as: {{user.username}}</h2> +{% autopaginate documents 8 %} +<h2 style="color: teal;">Document Library</h2> <br> -<form enctype="multipart/form-data" method="post" action=""> -{% csrf_token %} -<h4 style="color: black;">Post File:</h4> -<p><input type=file name="doc[]" multiple="multiple" /></p> -<input type="hidden" name="user" value={{user.username}}> +<div id="divpost"> +<form enctype="multipart/form-data" method="post" action="">{% csrf_token %} +<br/> +Post File: +<input type=file name="doc[]" multiple="multiple" /><br><br> +Description: <input type=textarea name="contenttext"/> +<input type="hidden" name="user" value={{user.username}}><br><br> + <input type="submit" value="Post"> </form> -<br> +</div> + +<div id="divsearch"> <form method="post" action=""> {% csrf_token %} +<br/> <h4 style="color: black;">Search File</h4> -<p><input type="text" name="sdoc" value={{val}}></p> -<h4 style="color: black;">Sort files by:</h4> -<p><div align="center"> -<select name="mydropdown"> +<input type="text" name="sdoc" value={{val}}> +<br/> +<br/> +<select name="mydropdown" style="margin:0"> <option value="title">Title</option> <option value="creation_date">Creation Date</option> </select> -</div> +<br/> +<br/> <input type="submit" value="Search"> </form> +</div> +<br> +<br> <br> -<h4 style="color: teal;">SHARE</h4> +<br> +<h4 style="color: teal;">Documents Listing</h4> {% for document in documents %} @@ -46,6 +86,8 @@ <br> <font color = 'black'>Posted At : </font><font color = 'teal'>{{document.creation_date}}</font> <br> +<font color = 'black'>Description:</font><font color = 'teal'>{{ document.content }}</font> +<br> <a href="{% admin_media_prefix %}img/{{document.title}}">Download now!!</a> <br> {% for author in document.authors.all %} @@ -89,8 +131,26 @@ </br> <input type="hidden" name="docid" value={{document.id}}> <input type="submit" value="Rate it!!!"> +</form><br> +<form method="post" action="">{% csrf_token %} +<input type="hidden" name="docid" value={{document.id}}> +<input type="text" value="" name="texttags" /> +<input type="submit" value="Add Tags" name="addtags" /> </form> <br> +<div class="tags"> + <p class="gbobject-tags span-16 last"> + <strong>{% trans "Tags" %}</strong> : + {% tags_for_object document 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/><br/> <hr width="100%" style="height:5px;" color="black"/> <br> {% endfor %}<br> @@ -102,6 +162,13 @@ {% endif %} - + <h2> +{% paginate %}</h2> + + + + + {% endblock %} + </body> diff --git a/gstudio/templates/gstudio/fullscreen.html b/gstudio/templates/gstudio/fullscreen.html index afc3746..8c3efed 100644 --- a/gstudio/templates/gstudio/fullscreen.html +++ b/gstudio/templates/gstudio/fullscreen.html @@ -1,4 +1,127 @@ -<html><body> {% load adminmedia grp_tags %} -<img src="{% admin_media_prefix %}img/{{image.title}}" > +{% load i18n comments gstudio_tags %} +{% load tagging_tags comments i18n %} + +<html> +<head> +<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/> +<font color = 'black'>Name : </font><font color = 'teal'>{{image.title}}</font> +<br/> +<font color = 'black'>Posted By : </font> +{% for author in image.authors.all %} + <font color = 'teal'>{{author}}</font> +{% endfor %} +<br> + +<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/> + +{% 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> +{% endifequal %} +<br> +<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="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/> + +<form method="post" action="">{% csrf_token %} +<input type="hidden" name="imgid" value={{image.id}}> +<input type="text" value="" name="texttags" /> +<input type="submit" value="Add Tags" name="addtags" /> +</form> +<br/> +<div class="tags"> + <p class="gbobject-tags span-16 last"> + <strong>{% trans "Tags" %}</strong> : + {% tags_for_object image 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/><br/> +{% block nodetype-comments %} +<div id="comments" class=""> + <h5>{% trans "Comments" %}</h5> + {% with image.comments as comment_list %} + {% if comment_list.count %} + <ol id="comment-list" class="span-15 last"> + {% for comment in comment_list %} + <li id="comment_{{ comment.pk }}" class="comment vcard {% cycle box1,box2 %}{% if comment.user in image.authors.all %} post-author{% endif %} span-15 last"> + <div class="span-2"> + <img src="{% get_gravatar comment.email 60 "G" %}" class="gravatar photo" alt="{{ comment.user_name }}"/> + </div> + <div class="comment-body span-13 last"> + <div class="comment-author span-13 last"> + {% if comment.url %} + <a href="{{ comment.url }}" class="fn url" title = "{{ comment.user_name }}">{{ comment.user_name }}</a> + {% else %} + {{ comment.user_name }} + {% endif %} + {% trans "on" %} {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-13 last"> + {{ comment.comment|linebreaks }} + </div> + </div> + </li> + {% endfor %} + </ol> + {% if not image.comments_are_open %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% else %} + {% if image.comments_are_open %} + <p>{% trans "No comments yet." %}</p> + {% else %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% endif %} + {% endwith %} +</div> +{% endblock %} + + +<div class="commentForm span-16 last"> + {% render_comment_form for image %} +</div> + + + + +<br> +<hr width="100%" style="height:5px;" color="black"/> +<br> + </html></body> diff --git a/gstudio/templates/gstudio/home.html b/gstudio/templates/gstudio/home.html index aec372d..8859bca 100644 --- a/gstudio/templates/gstudio/home.html +++ b/gstudio/templates/gstudio/home.html @@ -1,6 +1,6 @@ -{% load objectapp_tags i18n %} -{% load gstudio_tags i18n %} +{% load gstudio_tags i18n %} +{% load objectapp_tags i18n %} {% load adminmedia grp_tags %} <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}" version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml"> @@ -114,6 +114,10 @@ <div id="header" > {% include "gstudio/_header.html" %} </div> + <div class="tags"> + <h3>{% trans "Tags" %}</h3> + {% get_tag_cloud %} + </div> <div id="main"> <center><font size="23" color="#4d659e"><b>{{ site }}</b></font></center> @@ -128,7 +132,7 @@ <center><p style = " font-size : 19px ; color : #4d659e"><b>Let us collaboratively construct semantic knowledge networks with a special focus on education.<a href="/more/"><font color="red">more</font></a></b></p></center> <div class="bottom"> <div class="authors"> - <h3>{% trans "Recent Authors" %}</h3> + <h3>{% trans "Recents Authors" %}</h3> {% get_authors %} </div> diff --git a/gstudio/templates/gstudio/image.html b/gstudio/templates/gstudio/image.html index f70a24b..293b7ec 100644 --- a/gstudio/templates/gstudio/image.html +++ b/gstudio/templates/gstudio/image.html @@ -1,29 +1,69 @@ <html> <body> {% extends "gstudio/base.html" %} +{% load pagination_tags %} {% load adminmedia grp_tags %} {% load i18n %} {% block content %} +<script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> + <script type="text/javascript" > + $(window).load(function() { + $("#content").css({ + "width": "600px",});}); +$(window).load(function() { + $("#chart").hide();}); +$(window).load(function() { + + $("#graphcss").hide(); + }); + +var i = 0; +</script> +<style type="text/css"> +#div2 +{ +background-color:#E8E8E8 ; +} +#div1 +{ +background-color:white +} + +#divpost +{ +position:relative; +} +#divsearch +{ +position:absolute; +margin-left:61%; +margin-top:-35%; +} +</style> {% if user.is_authenticated %} -<h1 style="color: teal;">Welcome to the ImageNation</h1> -<p><img id="zoomable" src="{% admin_media_prefix %}img/imagenation.jpg" alt="{{ image.title }}" class="left" /></p> -<h2>Logged in as: {{user.username}}</h2> -<br> +{% autopaginate images 10 %} + +<h2 style="color: teal;">Image Library</h2> +<div id="divpost"> <form enctype="multipart/form-data" method="post" action=""> {% csrf_token %} -<h4 style="color: black;">Post Image:</h4> -<p>Title: <input type="text" name="title1"></p><br> -<p><input type=file name="image[]" multiple="multiple" /></p> -<input type="hidden" name="user" value={{user.username}}> -<input type="submit" value="Post"> + +<h1 style="color: black; margin-left: 0px;">Post Image:</h1> +Title: <input type="text" name="title1"><br/><br/> +Image: <input type=file name="image[]" multiple="multiple" /><br/><br/> +Description: <input type=textarea name="contenttext"/> +<input type="hidden" name="user" value={{user.username}}><br/><br/> + <input type="submit" value=" Post " size="900" name="post"> </form> -<br> +</div> + +<div id="divsearch"> <form method="post" action=""> {% csrf_token %} -<h4 style="color: black;">Search Image</h4> +<h1 style="color: black; margin-left: 0px;">Search Image:</h1> <p><input type="text" name="simg" value={{val}}></p> -<h4 style="color: black;">Sort images by:</h4> -<p><div align="center"> +<br/> +<p><div align="left"> <select name="mydropdown"> <option value="title">Title</option> <option value="creation_date">Creation Date</option> @@ -31,40 +71,61 @@ </div> <input type="submit" value="Search"> </form> +</div> <br> + + <div> <h4 style="color: teal;">IMAGES</h4> {% for image in images %} - <div class="gbobject-body span-16 last"> - <div class="gbobject-image"> - <p> -<img src="{% admin_media_prefix %}img/{{image.title}}" width="300" height="225" alt="{{ image.title }}" > + + + <div class="gbobject-image" id = "divimage"> +<script type="text/javascript"> +i = i+1; +if (i%2 == 0){ +document.getElementById("divimage").setAttribute("id","div1"); +} +else +{ +document.getElementById("divimage").setAttribute("id","div2"); +} + +</script> + <h2>{{image.title}}</h2> + <form method="post" action="">{% csrf_token %} + <input type="hidden" name="fulid" value={{image.id}}> + <input type="submit" value="Show" name="Show"> + + <!-- <p> --> +<!-- <img src="{% admin_media_prefix %}img/{{image.title}}" width="300" height="225" alt="{{ image.title }}" > --> - </p> - </div> - <div class="gbobject-content"> - <!-- {{ object_content }}--> - </div> - </div> -<h4>{{image.title}} -<form method="post" action=""> -{% csrf_token %} -<input type="hidden" name="fulid" value={{image.id}}> -<input type="submit" value="View Fullscreen"> -</form> -</h4> -<font color = 'black'>Posted By : </font> -{% for author in image.authors.all %} - <font color = 'teal'>{{author}}</font> -{% endfor %} -<br> -<font color = 'black'>Posted At : </font><font color = 'teal'>{{image.creation_date}}</font> -<br> +<!-- </p> --> + + <!-- <div class="gbobject-content"> --> +<!-- <\!-- {{ object_content }}-\-> --> +<!-- </div> --> +<!-- </div>--> +<!-- <h4>{{image.title}} --> +<!-- <form method="post" action=""> --> +<!-- {% csrf_token %} --> +<!-- <input type="hidden" name="fulid" value={{image.id}}> --> +<!-- <input type="submit" value="View Fullscreen"> --> +<!-- </form> --> +<!-- </h4> --> +<!-- <font color = 'black'>Posted By : </font> --> +<!-- {% for author in image.authors.all %} --> +<!-- <font color = 'teal'>{{author}}</font> --> +<!-- {% endfor %} --> +<!-- <br> --> +<!-- <font color = 'black'>Posted At : </font><font color = 'teal'>{{image.creation_date}}</font> --> +<!-- <font color = 'black'>Current rating is {{ image.rating.get_rating }} </font> --> + + + {% for author in image.authors.all %} - {% ifequal author.username user.username %} -<form method="post" action="" onclick="return makesure();"> -{% csrf_token %} + {% ifequal author.username user.username %} <input type="hidden" name="pict" value={{image.id}}> -<input type="submit" name="delete" value="Delete"> +<input type="submit" name="delete" value="Delete" onclick="return makesure();"> <input type="hidden" name="user" value={{user.username}}> </form> <script type="text/javascript"> @@ -86,34 +147,38 @@ </script> <input type="button" onclick="myFunction()" value="Delete" /> + </form> {% endifequal %} {% endfor %} -<br> -<font color = 'black'>Current rating is </font><h4>{{ image.rating.get_rating }}</h4> -<br> -<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="imgid" value={{image.id}}> -<input type="submit" value="Rate it!!!"> -</form> -<br> -<hr width="100%" style="height:5px;" color="black"/> -<br> -{% endfor %}<br> -<br><br> + + +<!-- <br> --> +<!-- <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="imgid" value={{image.id}}> --> +<!-- <input type="submit" value="Rate it!!!"> --> +<!-- </form> --> +<!-- <br> --> +<!-- <hr width="100%" style="height:5px;" color="black"/> --> +<!-- <br> --> +</div> + +{% endfor %} +</div> {% else %} <h2 style="color: indigo;">Sorry you need to log in to see this content !</h2> {% endif %} - - + <h2> +{% paginate %}</h2> + {% endblock %} </body> </html> diff --git a/gstudio/templates/gstudio/transcript.html b/gstudio/templates/gstudio/transcript.html index ff8dfad..7860061 100644 --- a/gstudio/templates/gstudio/transcript.html +++ b/gstudio/templates/gstudio/transcript.html @@ -1,13 +1,13 @@ -{% load gstudio_tags i18n %} -{% get_tags as nodetype_tags %} {% load adminmedia grp_tags %} - - - -<!doctype html> +{% load i18n comments gstudio_tags %} +{% load tagging_tags comments i18n %} + <html> <head> -<script src="http://code.jquery.com/jquery-1.7.2.js" type="text/javascript"></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" /> +<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/jquery.pandoravideo.js"></script> <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery.js"></script> <script type="text/javascript" src="{{STATIC_URL}}gstudio/js/jquery-ui-1.8.21.custom.min.js"></script> @@ -22,7 +22,111 @@ $('#pandoravideo').pandoravideo(); </head> <body> <div id="pandoravideo" data-pandora-id={{id}} data-pandora-layers="transcripts, descriptions, keywords, places"> + + +</div> +<font color='black'>Name:</font> +<font color='teal'>{{ titlename }}</font><br/> +<font color = 'black'>Posted By : </font> + + <font color = 'teal'>{{postedby}}</font> +<br> +<font color = 'black'>Posted At :</font> + <font color = 'teal'>{{date}}</font> + +<br> + <font color = 'black'>Location: </font> +<a href=http://maps.google.co.in/maps?hl=en&cp=43&gs_id=6&xhr=t&q={{map}}&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&biw=1304&bih=680&um=1&ie=UTF-8&sa=N&tab=wl target="_blank">{{we}}</a> +<br> +<font color = 'black'>Description:</font><font color = 'teal'>{{ contentname }}</font> +<br/> +<font color = 'black'>Current rating is: <font color='teal'><b>{{ rateby }}</b></font> </font> +<br> +<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"/> + +<input type="hidden" name="vidid" value={{vidid}}> +<input type="submit" value="Rate it!!!"> +</form> +<br> +<form method="post" action=""> +{% csrf_token %} +<input type="hidden" name="favid" value={{vidid}}> +<input type="hidden" name="favusr" value={{user.username}}> +<input type="submit" value="Add to favourites"> +</form><br> +<form method="post" action="">{% csrf_token %} +<input type="hidden" name="vidid" value={{vidid}}> +<input type="text" value="" name="texttags" /> +<input type="submit" value="Add Tags" name="addtags" /> +</form> +<br/> +<br/> +<div class="tags"> + <p class="gbobject-tags span-16 last"> + <strong>{% trans "Tags" %}</strong> : + {% tags_for_object video 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/><br/> +{% block nodetype-comments %} +<div id="comments" class=""> + <h5>{% trans "Comments" %}</h5> + {% with video.comments as comment_list %} + {% if comment_list.count %} + <ol id="comment-list" class="span-15 last"> + {% for comment in comment_list %} + <li id="comment_{{ comment.pk }}" class="comment vcard {% cycle box1,box2 %}{% if comment.user in video.authors.all %} post-author{% endif %} span-15 last"> + <div class="span-2"> + <img src="{% get_gravatar comment.email 60 "G" %}" class="gravatar photo" alt="{{ comment.user_name }}"/> + </div> + <div class="comment-body span-13 last"> + <div class="comment-author span-13 last"> + {% if comment.url %} + <a href="{{ comment.url }}" class="fn url" title = "{{ comment.user_name }}">{{ comment.user_name }}</a> + {% else %} + {{ comment.user_name }} + {% endif %} + {% trans "on" %} {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }} + </div> + <div class="span-13 last"> + {{ comment.comment|linebreaks }} + </div> + </div> + </li> + {% endfor %} + </ol> + {% if not video.comments_are_open %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% else %} + {% if video.comments_are_open %} + <p>{% trans "No comments yet." %}</p> + {% else %} + <p>{% trans "Comments are closed." %}</p> + {% endif %} + {% endif %} + {% endwith %} +</div> +{% endblock %} + + +<div class="commentForm span-16 last"> + {% render_comment_form for video %} </div> +<hr width="100%" style="height:5px;" color="black"/> +<br> </body> </html> diff --git a/gstudio/templates/gstudio/video.html b/gstudio/templates/gstudio/video.html index 644831a..f2ae11d 100644 --- a/gstudio/templates/gstudio/video.html +++ b/gstudio/templates/gstudio/video.html @@ -1,181 +1,199 @@ {% extends "gstudio/base.html" %} +{% load pagination_tags %} {% load i18n %} {% load adminmedia grp_tags %} +{% load i18n comments gstudio_tags %} + {% block content %} +<script src="{% admin_media_prefix %}jquery/jquery-1.6.2.min.js" type="text/javascript"></script> + <script type="text/javascript" > + $(window).load(function() { + $("#content").css({ + "width": "600px",});}); +$(window).load(function() { + $("#chart").hide();}); +$(window).load(function() { + + $("#graphcss").hide(); + }); +var i = 0; +</script> +<style type="text/css"> +#div2 +{ +background-color:#E8E8E8 ; +} +#div1 +{ +background-color:white +} +#divpost +{ +position:relative; +} +#divsearch +{ +position:absolute; +margin-left:61%; +margin-top:-23%; +} +</style> + {% if user.is_authenticated %} -<h1 style="color: teal;">Welcome to the VideoCore</h1> -<p><img id="zoomable" src="{% admin_media_prefix %}img/videos.jpg" alt="{{ image.title }}" class="left" /></p> -<h2>Logged in as: {{user.username}}</h2> -<br> + +{% autopaginate vids 10 %} + + +<h2 style="color: teal;">Video Library</h2> +<br/> +<div id="divpost"> <form enctype="multipart/form-data" method="post" action=""> {% csrf_token %} -<p><h4 style="color: black;">Post Video:</h4><input type="file" name="clip[]" multiple="multiple" /></p> +<p><h4 style="color: black;">Submit Videos:</h4>Video: <input type="file" name="clip" multiple="multiple" /></p><br/> +Description: <input type=textarea name="contenttext"/> <input type="hidden" name="user" value={{user.username}}> -<input type="submit" value="Upload"> +<input type="hidden" name="userpassword" value={{user.password}}> +<input type="hidden" name="useremail" value={{user.email}}> +<br/><br/> +<input type="submit" value="Upload" onclick="return myupload();" > +<input type="hidden" name="upload" id = "uploadid"> +<script type="text/javascript"> +function myupload() +{ + +var prompta = prompt("Enter your password") +document.getElementById("uploadid").setAttribute("value",prompta); +} +</script> + </form> -<br> +</div> +<div id="divsearch"> <form method="post" action=""> {% csrf_token %} -<h4 style="color: black;">Search Video</h4> +<h4 style="color: black;">Search Videos:</h4> <p><input type="text" name="svid" value={{val}}></p> -<h4 style="color: black;">Sort videos by:</h4> -<p><div align="center"> + + <select name="mydropdown"> <option value="title">Title</option> <option value="creation_date">Creation Date</option> </select> -</div> + <input type="submit" name="norm" value="Search"> <input type="submit" name="spe" value="Search by User"> </form> <br> -<form method="post" action=""> +<form method="post" action="/gstudio/resources/videos/"> {% csrf_token %} <input type="hidden" name="user" value={{user.username}}> <input type="submit" name="fav" value="View Favourites"> </form> - -<h4 style="color: teal;">VIDEOS</h4><br> -<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> - <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> - - <script> - - -$(function() { - - - - - - -$('#progressbar').progressbar({ value: 0.0001 }); - $pVal = $('.ui-progressbar-value').addClass('ui-corner-right'); - var pGress = setInterval(function() { //generate our endless loop - var pCnt = $pVal.width(); // get width as int - // generate a random number between our max 100 and it's half 50, - // this is optional, and make the bar move back and forth before - // we reach the end. - var rDom = Math.floor(Math.random() * (100 - 0 + 1) + 0); - var step = rDom >= 100 ? 100: rDom; // reached our max ? reset step. - doAnim(step); - },1000); - var doAnim = function(wD) { - // complete easing list http://jqueryui.com/demos/effect/easing.html - $pVal.stop(true).animate({width: wD + '%'},1000, 'easeOutBack'); - if (wD >= 100) clearInterval(pGress) /* run callbacks here */ - } - - var time = new Date().getTime(); - $(document.body).bind("mousemove keypress", function(e) { - time = new Date().getTime(); - }); - - function refresh() { - if(new Date().getTime() - time >= 200000) - window.location.reload(true); - else - setTimeout(refresh, 10000); - } - - setTimeout(refresh, 10000); - - - - - - -}); - - +</div> +<br/> +<br/> +<br/> +<br/> +<br/> +<br/> +{% if fav %} +<h2 style="color: teal;">Favourite Videos</h2><br/> +{% else %} +<h2 style="color: teal;">List of Videos in the library </h2><br/> +{% endif %} +{% for video in vids %} +<!--<iframe src="{{video.rurl}}/embed?in=0&out=10000&view=video" width="256" height="144" allowfullscreen></iframe>--> +<div id="divvideo"> +<script type="text/javascript"> +i = i+1; +if (i%2 == 0){ +document.getElementById("divvideo").setAttribute("id","div1"); +} +else +{ +document.getElementById("divvideo").setAttribute("id","div2"); +} </script> - - - <div id="progressbar"></div> - - - - - - - -<br> -{% if fav %} -<h4 style="color: teal;">Favourite Videos</h4> -{% endif %} -<br> - -{% for video in vids %} -<iframe src="{{video.rurl}}/embed?in=0&out=10000&view=video" width="256" height="144" allowfullscreen></iframe> -<h4>{{video.title}}</a></h4> +<font size="4">{{video.title}}</font> <form enctype="multipart/form-data" method="post" action="" target="_blank"> {% csrf_token %} <input type="hidden" name = "full" value ={{video.slug}}> -<input type="submit" value="FullScreen"> -</form> -<h4><a href={{video.rurl}} target="_blank">Right click to download</a></h4><br> -<font color = 'black'>Posted By : </font> +<input type="submit" value="Play"> + +<a href={{video.rurl}} target="_blank">Right click to download</a><br> +<!-- <font color = 'black'>Posted By : </font> --> {% for author in video.get_nbh.posted_by %} - <font color = 'teal'>{{author}}</font> + + <input type="hidden" name="authorname" value="{{ author }}" /> {% endfor %} -<br> -<font color = 'black'>Posted At :</font> + +<!-- <br> --> +<!-- <font color = 'black'>Posted At :</font> --> {% for date in video.get_nbh.creation_day %} - <font color = 'teal'>{{date}}</font> + <input type="hidden" name="datename" value="{{ date }}" /> {% endfor %} -<br> -{% for we in video.get_nbh.source %} - <font color = 'black'>Location: </font> + <input type="hidden" name="titlename" value="{{ video.title }}" /> + +<!-- <br> --> +{% for we in video.get_nbh.source %} + <!-- <font color = 'black'>Location: </font> --> {% for map in video.get_nbh.map_link %} - {% ifnotequal map '' %} - <a href=http://maps.google.co.in/maps?hl=en&cp=43&gs_id=6&xhr=t&q={{map}}&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&biw=1304&bih=680&um=1&ie=UTF-8&sa=N&tab=wl target="_blank">{{we}}</a> - {% endifnotequal %} + {% ifnotequal map '' %} + <input type="hidden" name="mapname" value="{{ map }}" /> + <input type="hidden" name="wename" value="{{ we }}" /> + <!-- <a href=http://maps.google.co.in/maps?hl=en&cp=43&gs_id=6&xhr=t&q={{map}}&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&biw=1304&bih=680&um=1&ie=UTF-8&sa=N&tab=wl target="_blank">{{we}}</a> --> + {% endifnotequal %} {% endfor %} {% endfor %} -<br> -<font color = 'black'>Current rating is </font><h4>{{ video.rating.get_rating }}</h4> -<br> -<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="contentname" value="{{ video.content }}" /> + <input type="hidden" name="ratename" value="{{ video.rating.get_rating }}" /> + +<!-- <br> --> +<!-- <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"/> --> <input type="hidden" name="vidid" value={{video.id}}> -<input type="submit" value="Rate it!!!"> </form> -<br> -<form method="post" action=""> -{% csrf_token %} -<input type="hidden" name="favid" value={{video.id}}> -<input type="hidden" name="favusr" value={{user.username}}> -<input type="submit" value="Add to favourites"> -</form><br> -<hr width="100%" style="height:5px;" color="black"/> -<br> -{% endfor %}<br> +<!-- <input type="submit" value="Rate it!!!"> --> +<!-- </form> --> +<!-- <br> --> +<!-- <form method="post" action=""> --> +<!-- {% csrf_token %} --> +<!-- <input type="hidden" name="favid" value={{video.id}}> --> +<!-- <input type="hidden" name="favusr" value={{user.username}}> --> +<!-- <input type="submit" value="Add to favourites"> --> +<!-- </form><br> --> +<!-- <hr width="100%" style="height:5px;" color="black"/> --> +<!-- <br> --> +</div> + +{% endfor %} -<br><br> -<a href="http://www.facebook.com" target="_blank">Follow us on Facebook</a> + +<br> {% else %} <h2 style="color: indigo;">Sorry you need to log in to see this content !</h2> {% endif %} +<h2> +{% paginate %}</h2> + {% endblock %} {% block chart %} -<br> <br><br><br><br><br><br><br><br><br><br><br><br><br> - -<br><br><br><br><br> +<br> <br> {% endblock %} |