summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/docu.html
diff options
context:
space:
mode:
authorAnkita <ankita@ankita-Inspiron-N5010.(none)>2012-07-13 12:31:27 +0530
committerAnkita <ankita@ankita-Inspiron-N5010.(none)>2012-07-13 12:31:27 +0530
commit527ab688a8608ded5fc854cf8641228181efa981 (patch)
tree825f17422ce610922f8f34854c5e54db7a7f35ad /gstudio/templates/gstudio/docu.html
parentef3793b349be5744d6ef98a034f0c009159ed85b (diff)
downloadgnowsys-527ab688a8608ded5fc854cf8641228181efa981.tar.gz
this patch was added for metastudio by BITS Pilani team in 2012.
Diffstat (limited to 'gstudio/templates/gstudio/docu.html')
-rw-r--r--gstudio/templates/gstudio/docu.html107
1 files changed, 107 insertions, 0 deletions
diff --git a/gstudio/templates/gstudio/docu.html b/gstudio/templates/gstudio/docu.html
new file mode 100644
index 0000000..7be5aa7
--- /dev/null
+++ b/gstudio/templates/gstudio/docu.html
@@ -0,0 +1,107 @@
+<html>
+<body>
+{% extends "gstudio/base.html" %}
+{% load i18n %}
+{% load adminmedia grp_tags %}
+{% block content %}
+{% 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>
+<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}}>
+<input type="submit" value="Post">
+</form>
+<br>
+<form method="post" action="">
+{% csrf_token %}
+<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">
+<option value="title">Title</option>
+<option value="creation_date">Creation Date</option>
+</select>
+</div>
+<input type="submit" value="Search">
+</form>
+<br>
+<h4 style="color: teal;">SHARE</h4>
+
+{% for document in documents %}
+
+ <div class="gbobject-content">
+ <!-- {{ object_content }}-->
+ </div>
+<h2 style="color: green;">{{document.title}}</a></h2>
+<font color = 'black'>Posted By : </font>
+{% for author in document.authors.all %}
+ <font color = 'teal'>{{author}}</font>
+{% endfor %}
+<br>
+<font color = 'black'>Posted At : </font><font color = 'teal'>{{document.creation_date}}</font>
+<br>
+<a href="{% admin_media_prefix %}img/{{document.title}}">Download now!!</a>
+<br>
+{% for author in document.authors.all %}
+ {% ifequal author.username user.username %}
+<form method="post" action="" onclick="return makesure();">
+{% csrf_token %}
+<input type="hidden" name="dn" value={{document.id}}>
+<input type="submit" name="delete" value="Delete">
+</form>
+<script type="text/javascript">
+ function makesure() {
+ if (confirm('Are you sure you want to delete this file?')) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+{% else %}
+ <script type="text/javascript">
+ function myFunction()
+ {
+ alert("You are not authorised to delete other users file!");
+ }
+ </script>
+
+ <input type="button" onclick="myFunction()" value="Delete" />
+ {% endifequal %}
+{% endfor %}
+</script>
+<br>
+<font color = 'black'>Current rating is </font><h4>{{ document.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="docid" value={{document.id}}>
+<input type="submit" value="Rate it!!!">
+</form>
+<br>
+<hr width="100%" style="height:5px;" color="black"/>
+<br>
+{% endfor %}<br>
+
+
+{% else %}
+
+<h2 style="color: indigo;">Sorry you need to log in to see this content !</h2>
+
+{% endif %}
+
+
+{% endblock %}
+</body>