Skip to content

Commit

Permalink
Changes done in image,video&document library
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhiru authored and Dhiru committed Aug 3, 2012
1 parent 3c6b520 commit a579626
Show file tree
Hide file tree
Showing 14 changed files with 738 additions and 264 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Expand Up @@ -13,7 +13,7 @@ parts = django
patch-nosedjango
develop = .
eggs = django
django-gstudio
gnowsys-studio
django-tagging
django-bitly
django-xmlrpc
Expand Down
5 changes: 4 additions & 1 deletion demo/settings.py
Expand Up @@ -34,11 +34,12 @@
MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '../demo/grappelli/static/grappelli/img')
MEDIA_ROOTNEW2 = os.path.join(os.path.dirname(__file__), '../demo/grappelli/static/grappelli/img')
MEDIA_ROOTNEW3 = os.path.join(os.path.dirname(__file__), '../gstudio/static/gstudio/documents')
MEDIA_ROOTNEW = os.path.join(os.path.dirname(__file__), '../media')
MEDIA_ROOTNEW = os.path.join(os.path.dirname(__file__), '../demo/media')
#MEDIA_ROOT = '/static'
#MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '../gstudio/static')
PYSCRIPT_URL_GSTUDIO = os.path.join(os.path.dirname(__file__), '../gstudio/createhtml.py')
PYSCRIPT_URL_OBJECTAPP = os.path.join(os.path.dirname(__file__), '../objectapp/createhtml.py')
VIDEO_PANDORA_URL = os.getenv("HOME")+"/.ox/client.json"
FILE_UPLOAD_MAX_MEMORY_SIZE= 524288000
JPEG_ROOT = None

Expand Down Expand Up @@ -98,6 +99,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'pagination.middleware.PaginationMiddleware',
)

ROOT_URLCONF = 'demo.urls'
Expand Down Expand Up @@ -148,6 +150,7 @@
'fourstore',
'HTTP4Store',
'html5lib',
'pagination',
# Uncomment the south entry to activate south for database migrations
# Please do install south before uncommenting
# command: sudo pip install south
Expand Down
2 changes: 1 addition & 1 deletion gstudio/models.py
Expand Up @@ -855,7 +855,7 @@ def get_at_url_add(self):
fl=1
"""
fl=0 means, Attribute for AT is not added, now show it as to be added
" " "
"""
if fl==0:
retats[each.title]=aturl

Expand Down
101 changes: 84 additions & 17 deletions 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:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type=file name="doc[]" multiple="multiple" /><br><br>
Description:&nbsp;&nbsp;<input type=textarea name="contenttext"/>
<input type="hidden" name="user" value={{user.username}}><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<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}}>&nbsp;
<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 %}

Expand All @@ -46,6 +86,8 @@ <h2 style="color: green;">{{document.title}}</a></h2>
<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 %}
Expand Down Expand Up @@ -89,8 +131,26 @@ <h2 style="color: green;">{{document.title}}</a></h2>
</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>
Expand All @@ -102,6 +162,13 @@ <h2 style="color: indigo;">Sorry you need to log in to see this content !</h2>

{% endif %}


<h2>
{% paginate %}</h2>





{% endblock %}

</body>
127 changes: 125 additions & 2 deletions 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: &nbsp;<font color = 'teal'> No rating yet </font></font>
{% else %}
<font color = 'black'>Current rating is: &nbsp; <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>
10 changes: 7 additions & 3 deletions 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">
Expand Down Expand Up @@ -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>
Expand All @@ -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>

Expand Down

0 comments on commit a579626

Please sign in to comment.