From 374eb2576ac59e0792349e97ab5f689671d8712a Mon Sep 17 00:00:00 2001 From: Dhiru Date: Tue, 14 Aug 2012 14:49:47 +0530 Subject: modifying the looks of image,video and document library --- gstudio/templates/gstudio/docu.html | 38 +++++++------ gstudio/templates/gstudio/image.html | 45 ++++++++++------ gstudio/templates/gstudio/video.html | 100 +++++++++++++++++++++++++---------- gstudio/views/video.py | 14 ++--- 4 files changed, 130 insertions(+), 67 deletions(-) (limited to 'gstudio') diff --git a/gstudio/templates/gstudio/docu.html b/gstudio/templates/gstudio/docu.html index dc9f151..58e6a44 100644 --- a/gstudio/templates/gstudio/docu.html +++ b/gstudio/templates/gstudio/docu.html @@ -23,32 +23,26 @@ $(window).load(function() { var i = 0; {% if user.is_authenticated %} {% autopaginate documents 8 %}

Document Library


-
-
{% csrf_token %} -
-Post File:       -

-Description:   -

-                         - -
-
+
@@ -67,6 +61,20 @@ Description:  
+ +
+
{% csrf_token %} +
+

Post File:

  +file: 

+Description:   +

+ + +
+
+ +



diff --git a/gstudio/templates/gstudio/image.html b/gstudio/templates/gstudio/image.html index 293b7ec..73d05da 100644 --- a/gstudio/templates/gstudio/image.html +++ b/gstudio/templates/gstudio/image.html @@ -29,38 +29,34 @@ background-color:#E8E8E8 ; background-color:white } -#divpost +#divsearch +{ +position:absolute; +} +#upperdiv { position:relative; +margin-bottom:35%; } -#divsearch +#divpost { position:absolute; -margin-left:61%; -margin-top:-35%; +margin-left:52%; } + {% if user.is_authenticated %} {% autopaginate images 10 %}

Image Library

-
-
-{% csrf_token %} +
+
-

Post Image:

-Title:             

-Image:         

-Description:   -

-                      - -
{% csrf_token %} -

Search Image:

+

Search Image:


@@ -72,8 +68,23 @@ Description:  
-
+
+
+{% csrf_token %} + +

Post Image:

+Title: 

+Image: 

+Description:   +

+ + + +
+
+
+

IMAGES

{% for image in images %} diff --git a/gstudio/templates/gstudio/video.html b/gstudio/templates/gstudio/video.html index f2ae11d..1a2f6bf 100644 --- a/gstudio/templates/gstudio/video.html +++ b/gstudio/templates/gstudio/video.html @@ -13,7 +13,7 @@ $(window).load(function() { $("#chart").hide();}); $(window).load(function() { - + $("#graphcss").hide(); }); var i = 0; @@ -27,15 +27,33 @@ background-color:#E8E8E8 ; { background-color:white } -#divpost +#divsearch +{ +position:absolute; +} +#upperdiv { position:relative; +margin-bottom:20%; } -#divsearch +#divpost { position:absolute; -margin-left:61%; -margin-top:-23%; +margin-left:52%; +} +#showingprocess +{ +width:371px; +height:38px; +border:solid 1px #B3B3B3; +} +#inner{ +width:10px; +height:36px; +border:solid 1px blue; +margin-top:1px; +background: green; + } @@ -46,28 +64,8 @@ margin-top:-23%;

Video Library


-
-
-{% csrf_token %} -

Submit Videos:

Video: 


-Description:   - - - -

              - - - - -
-
{% csrf_token %} @@ -79,7 +77,7 @@ document.getElementById("uploadid").setAttribute("value",prompta); - +
@@ -90,19 +88,63 @@ document.getElementById("uploadid").setAttribute("value",prompta);
+
+
+{% csrf_token %} +

Submit Videos:

Video: 


+Description:   + + +

+

Enter the password of wetube.gnowledge.org

+ +

+ + +
+
+
+





+ + {% if fav %}

Favourite Videos


{% else %}

List of Videos in the library


{% endif %} - +
{% for video in vids %} @@ -180,7 +222,7 @@ document.getElementById("divvideo").setAttribute("id","div2"); {% endfor %} - +

{% else %} diff --git a/gstudio/views/video.py b/gstudio/views/video.py index 668e77b..65e9d43 100644 --- a/gstudio/views/video.py +++ b/gstudio/views/video.py @@ -60,10 +60,9 @@ def video(request): mapname = request.POST.get("mapname","") wename = request.POST.get("wename","") titlename = request.POST.get("titlename","") - password = request.POST.get("upload","") addtags = request.POST.get("addtags","") texttags = request.POST.get("texttags","") - + password = request.POST.get("videopassword","") if rate == '0': rate = 'No rating yet' else : @@ -120,7 +119,6 @@ def video(request): if clip != "": - userauth = authenticate(username=user, password=password) api.signup({'username':user,'password':password,'email':useremail}) save_file(clip,user) clipname = clip._get_name() @@ -131,7 +129,7 @@ def video(request): i=i+1 y=str(dirname) x=str(clipname[0]).upper() - CreateConfig(user) + CreateConfig(user,password) # os.system("pandora_client config") os.system("pandora_client add_volume "+ user+" "+MEDIA_ROOTNEW+"/"+user ) os.system("pandora_client scan") @@ -146,6 +144,8 @@ def video(request): m.content=content m.status=2 m.save() + m.sites.add(Site.objects.get_current()) + m.save() m.objecttypes.add(Objecttype.objects.get(id=p.id)) m.save() a=Attribute() @@ -235,6 +235,8 @@ def video(request): m.content=content m.status=2 m.save() + m.sites.add(Site.objects.get_current()) + m.save() m.objecttypes.add(Objecttype.objects.get(id=p.id)) m.save() a=Attribute() @@ -322,10 +324,10 @@ def sort_video(video): -def CreateConfig(user): +def CreateConfig(user,password): myfile = open(VIDEO_PANDORA_URL,'w') myfile = open(VIDEO_PANDORA_URL,'a') - myfile.write('{ \n "username":"'+user+'", \n "url":"http://wetube.gnowledge.org/api/",\n"cache": "~/.ox/client.sqlite",\n"media-cache": "~/.ox/media",\n"volumes":{},\n"password":"wetube"\n }') + myfile.write('{ \n "username":"'+user+'", \n "url":"http://wetube.gnowledge.org/api/",\n"cache": "~/.ox/client.sqlite",\n"media-cache": "~/.ox/media",\n"volumes":{},\n"password":"'+password+'"\n }') myfile.close() -- cgit v1.1