[Oi-commits] r1465 - in branches/stable: docs st tema tema/templatetags templates templates/forum templates/game templates/howto templates/news templates/package templates/tema

oi-commits at pardus.org.tr oi-commits at pardus.org.tr
Thu Jun 5 17:17:33 EEST 2008


Author: jnmbk
Date: Thu Jun  5 17:17:32 2008
New Revision: 1465

Added:
   branches/stable/templates/tema/message.html
      - copied unchanged from r1464, trunk/templates/tema/message.html
   branches/stable/templates/tema/themeitem_change.html
      - copied unchanged from r1464, trunk/templates/tema/themeitem_change.html
Removed:
   branches/stable/tema/templatetags/
Modified:
   branches/stable/docs/oi.xmi
   branches/stable/st/signals.py
   branches/stable/tema/feeds.py
   branches/stable/tema/forms.py
   branches/stable/tema/models.py
   branches/stable/tema/urls.py
   branches/stable/tema/views.py
   branches/stable/templates/404.html
   branches/stable/templates/footer.html
   branches/stable/templates/forum/forum_footer.html
   branches/stable/templates/game/game_detail.html
   branches/stable/templates/howto/howto_detail.html
   branches/stable/templates/news/news_detail.html
   branches/stable/templates/package/package_detail.html
   branches/stable/templates/tema/base.html
   branches/stable/templates/tema/themeitem_detail.html
   branches/stable/templates/tema/themeitem_list.html
Log:
merge

Modified: branches/stable/docs/oi.xmi
=================================================================
Suppressed!
	Too long (more than 250 lines) diff output suppressed...
Modified: branches/stable/st/signals.py
=================================================================
--- branches/stable/st/signals.py	(original)
+++ branches/stable/st/signals.py	Thu Jun  5 17:17:32 2008
@@ -53,6 +53,8 @@
                                 text=instance.text
                                )
             post.save()
+            topic.topic_latest_post = post
+            topic.save()
 
         else:
             return
@@ -66,6 +68,8 @@
                                   title=instance.title #news title
                                  )
                     topic.save()
+                    for tag in instance.tags.all():
+                        topic.tags.add(tag)
 
                     post = Post(topic=topic,
                                 author=user[0],

Modified: branches/stable/tema/feeds.py
=================================================================
--- branches/stable/tema/feeds.py	(original)
+++ branches/stable/tema/feeds.py	Thu Jun  5 17:17:32 2008
@@ -8,7 +8,7 @@
 from django.contrib.syndication.feeds import Feed
 from django.utils.feedgenerator import Atom1Feed
 
-from oi.tema.models import ThemeItem, Category
+from oi.tema.models import ThemeItem, ParentCategory
 from oi.settings import SITE_NAME, WEB_URL, SITE_DESC
 
 from django.contrib.syndication.feeds import FeedDoesNotExist
@@ -42,7 +42,7 @@
         if not len(bits)==1:
             raise ObjectDoesNotExist
 
-        return Category.objects.get(id=bits[0])
+        return ParentCategory.objects.get(id=bits[0])
 
     def title(self,obj):
         return SITE_NAME + " Tema Kategori : %s" % obj.category

Modified: branches/stable/tema/forms.py
=================================================================
--- branches/stable/tema/forms.py	(original)
+++ branches/stable/tema/forms.py	Thu Jun  5 17:17:32 2008
@@ -21,4 +21,4 @@
 class ThemeItemForm(forms.ModelForm):
     class Meta:
         model = ThemeItem
-        exclude = ("author", "rating", "download_count", "submit_date", "edit_date", "approved")
+        exclude = ("parentcategory", "author", "rating", "download_count", "submit_date", "edit_date", "approved")

Modified: branches/stable/tema/models.py
=================================================================
--- branches/stable/tema/models.py	(original)
+++ branches/stable/tema/models.py	Thu Jun  5 17:17:32 2008
@@ -9,17 +9,17 @@
 from django.contrib.auth.models import User
 from oi.st.models import License
 
-class Category(models.Model):
-    "Each theme item belongs to a Category"
+class ParentCategory(models.Model):
+    "Each theme item belongs to a ParentCategory and a SubCategory"
 
-    name=models.CharField(max_length=100, verbose_name="Kategori adı",unique=True)
-    slug=models.SlugField(verbose_name="SEF Başlık",prepopulate_from=("name",))
+    name = models.CharField(max_length=100, verbose_name="Kategori adı", unique=True)
+    slug = models.SlugField(verbose_name="SEF Başlık", prepopulate_from=("name",), unique=True)
 
     def __unicode__(self):
         return self.name
 
     def get_absolute_url(self):
-        return "/tema/kategori/%s/" % (self.slug)
+        return "/tema/listele/%s/tumu/tarih/" % (self.slug)
 
     class Admin:
         list_display = ('name',)
@@ -30,11 +30,36 @@
         verbose_name="Kategori"
         verbose_name_plural="Kategoriler"
 
+
+class SubCategory(models.Model):
+    "Each theme item belongs to a ParentCategory and a SubCategory"
+
+    parent = models.ForeignKey(ParentCategory)
+    name = models.CharField(max_length=100, verbose_name="Kategori adı")
+    slug = models.SlugField(verbose_name="SEF Başlık", prepopulate_from=("name",), unique=True)
+
+    def __unicode__(self):
+        return u"%s > %s" % (self.parent.name, self.name)
+
+    def get_absolute_url(self):
+        return "/tema/listele/%s/%s/tarih/" % (self.parent.slug, self.slug)
+
+    class Admin:
+        list_display = ("name", "parent")
+        search_fields = ["name", "parent"]
+        ordering=["name"]
+
+    class Meta:
+        verbose_name="Alt Kategori"
+        verbose_name_plural="Alt Kategoriler"
+
+
 class ThemeItem(models.Model):
     "A theme item mainly consists of screenshots and files to download"
 
     name = models.CharField(max_length=100, unique=True, verbose_name="Başlık", help_text="Buraya, ekleyeceğiniz içeriğin ismini yazın.")
-    category = models.ForeignKey(Category, verbose_name="Kategori")
+    parentcategory = models.ForeignKey(ParentCategory, verbose_name="Üst Kategori")
+    category = models.ForeignKey(SubCategory, verbose_name="Kategori")
     author = models.ForeignKey(User)
     license = models.ForeignKey(License, verbose_name="Lisans")
     description = models.TextField(blank=False, verbose_name="Tanım", help_text="Ekleyeceğiniz dosyalar hakkındaki açıklamalarınızı bu bölümde belirtebilirsiniz.")
@@ -44,6 +69,7 @@
     submit_date = models.DateTimeField(auto_now_add=True, verbose_name="Oluşturulma Tarihi")
     edit_date = models.DateTimeField(auto_now_add=True, verbose_name="Düzenlenme Tarihi")
     comment_enabled = models.BooleanField(default=True,verbose_name="Yoruma Açık", help_text="Diğer üyelerin bu içeriğe yorum yapıp yapamayacağını buradan belirtebilirsiniz.")
+    #TODO: change this to False before we're on air
     approved = models.BooleanField(default=True, verbose_name="Kabul Edilmiş")
 
     class Meta:
@@ -60,7 +86,7 @@
                     }),
                 ("Diğer", {
                     "classes": "collapse",
-                    "fields": ("author", "license", "rating", "download_count", "submit_date", "edit_date", "comment_enabled")
+                    "fields": ("author", "license", "rating", "download_count", "submit_date", "edit_date", "comment_enabled", "parentcategory")
                     })
                 )
         list_display = ("name", "license", "category", "approved")
@@ -73,7 +99,11 @@
         verbose_name_plural="Sanat Birimleri"
 
     def get_absolute_url(self):
-        return "/tema/dosya/%s/" % (self.id)
+        return "/tema/goster/%s/%s/%s/" % (self.parentcategory.slug, self.category.slug, self.id)
+
+    def get_change_url(self):
+        return "/tema/duzenle/%s/%s/%s/" % (self.parentcategory.slug, self.category.slug, self.id)
+
 
 class File(models.Model):
     "File for download"

Modified: branches/stable/tema/urls.py
=================================================================
--- branches/stable/tema/urls.py	(original)
+++ branches/stable/tema/urls.py	Thu Jun  5 17:17:32 2008
@@ -18,9 +18,9 @@
 
 urlpatterns = patterns ('oi.tema.views',
         #the first page listing
-        (r'^goster/(?P<sort_by>(son|begenilen|indirilen))/$','themeitem_list'),
-        (r'^kategori/(?P<category>[a-z-]+)/$','list_category'),
-        (r'^dosya/(?P<item_id>[0-9]+)/$','themeitem_detail'),
+        (r'^listele/(?P<parentcategory>[a-z0-9-_]+)/(?P<subcategory>[a-z0-9-_]+)/(?P<order_by>(alfabe|puan|indirilme|tarih))/$','themeitem_list'),
+        (r'^goster/(?P<parentcategory>[a-z0-9-_]+)/(?P<subcategory>[a-z0-9-_]+)/(?P<item_id>[0-9]+)/$','themeitem_detail'),
+        (r'^duzenle/(?P<parentcategory>[a-z0-9-_]+)/(?P<subcategory>[a-z0-9-_]+)/(?P<item_id>[0-9]+)/$','themeitem_change'),
         (r'^kullanici/(?P<username>[a-z]+)/$','list_user'),
         (r'^oyla/(?P<item_id>[0-9]+)/(?P<rating>[0-4])/$','vote'),
         (r'^ekle/$','themeitem_create'),

Modified: branches/stable/tema/views.py
=================================================================
--- branches/stable/tema/views.py	(original)
+++ branches/stable/tema/views.py	Thu Jun  5 17:17:32 2008
@@ -7,7 +7,7 @@
 
 from oi.forum.views import flood_control
 from oi.st.wrappers import render_response
-from oi.tema.models import Category, ThemeItem, File, ScreenShot, Vote, Comment
+from oi.tema.models import ParentCategory, SubCategory, ThemeItem, File, ScreenShot, Vote, Comment
 from oi.tema.forms import ThemeItemForm
 from oi.tema.settings import THEME_ITEM_PER_PAGE
 
@@ -18,41 +18,54 @@
 from django.shortcuts import get_object_or_404
 from django.core.exceptions import ObjectDoesNotExist
 
-def themeitem_list(request, sort_by):
+def themeitem_list(request, parentcategory, subcategory, order_by):
     "List approved theme items"
+    #first we take approved items
+    themeItems=ThemeItem.objects.filter(approved=True)
 
-    if sort_by == "begenilen":
-        themeItems=ThemeItem.objects.filter(approved=True).order_by("-download_count")
-    elif sort_by == "indirilen":
-        themeItems=ThemeItem.objects.filter(approved=True).order_by("-rating")
-    else:
-        themeItems=ThemeItem.objects.filter(approved=True).order_by("-edit_date")
+    #filter by parent category if no subcategory is selected
+    if parentcategory != "tum-kategoriler":
+        parentcategory = get_object_or_404(ParentCategory, slug=parentcategory)
+        themeItems = themeItems.filter(parentcategory=parentcategory)
+        parentcategory = parentcategory.slug
+
+    #filter by subcategory
+    if subcategory != "tumu":
+        subcategory = get_object_or_404(SubCategory, slug=subcategory)
+        themeItems = themeItems.filter(category=subcategory)
+        subcategory = subcategory.slug
+
+    #order_by
+    if order_by == "tarih":
+        themeItems = themeItems.order_by("-edit_date")
+    elif order_by == "indirilme":
+        themeItems = themeItems.order_by("-download_count")
+    elif order_by == "puan":
+        themeItems = themeItems.order_by("-rating")
+    else:# order_by == "alfabe"
+        themeItems = themeItems.order_by("name")
 
-    params={
+    params = {
             "queryset": themeItems,
             "paginate_by": THEME_ITEM_PER_PAGE,
+            "extra_context": {
+                "order_by": order_by,
+                "parentcategory": parentcategory,
+                "subcategory": subcategory,
+                "categories": ParentCategory.objects.all(),
+                },
             }
     return object_list(request, **params)
 
 
-def list_category(request, category):
-    "List theme items by category"
-
-    category = get_object_or_404(Category, slug=category)
-    themeItems = category.themeitem_set.filter(approved=True)
-
-    params={
-            'queryset': themeItems,
-            'paginate_by': THEME_ITEM_PER_PAGE,
-            }
-    return object_list(request,**params)
-
-
-def themeitem_detail(request, item_id):
+def themeitem_detail(request, parentcategory, subcategory, item_id):
     object = get_object_or_404(ThemeItem, pk=item_id)
     if not object.approved and not request.user == object.author:
         return render_response(request, "404.html")
 
+    if request.user == object.author or request.user.has_perm("can_change_themeitem"):
+        button_change = True
+
     return render_response(request, 'tema/themeitem_detail.html', locals())
 
 
@@ -65,7 +78,6 @@
             'queryset': themeItems,
             'paginate_by': THEME_ITEM_PER_PAGE,
             }
-
     return object_list(request, **params)
 
 
@@ -95,7 +107,7 @@
     themeitem.rating = rating / voteCount
     themeitem.save()
 
-    return themeitem_detail(request, item_id)
+    return HttpResponseRedirect(themeitem.get_absolute_url())
 
 
 @login_required
@@ -105,7 +117,7 @@
         flood, timeout = flood_control(request)
 
         if form.is_valid() and not flood:
-            item = ThemeItem(
+            object = ThemeItem(
                     name = form.cleaned_data["name"],
                     category = form.cleaned_data["category"],
                     license = form.cleaned_data["license"],
@@ -115,8 +127,46 @@
 
                     author = request.user,
                     )
-            item.save()
-            return themeitem_detail(request, item.id)
+            object.parentcategory = object.category.parent
+            object.save()
+            #TODO: Send e-mail to admins
+            return HttpResponseRedirect(object.get_absolute_url())
     else:
         form = ThemeItemForm()
     return render_response(request, "tema/themeitem_create.html", locals())
+
+ at login_required
+def themeitem_change(request, parentcategory, subcategory, item_id):
+    object = get_object_or_404(ThemeItem, pk=item_id)
+    if request.user == object.author or request.user.has_perm("can_change_themeitem"):
+        if request.method == "POST":
+            form = ThemeItemForm(request.POST.copy())
+            flood, timeout = flood_control(request)
+            if flood:
+                render_response(request, "tema/message.html", {"type": "error", "message": "Lütfen %s saniye sonra tekrar deneyiniz." % timeout })
+
+            if form.is_valid():
+                object.name = form.cleaned_data["name"]
+                object.category = form.cleaned_data["category"]
+                object.license = form.cleaned_data["license"]
+                object.description = form.cleaned_data["description"]
+                object.changelog = form.cleaned_data["changelog"]
+                object.comment_enabled = form.cleaned_data["comment_enabled"]
+                object.parentcategory = object.category.parent
+                object.save()
+                return HttpResponseRedirect(object.get_absolute_url())
+            else:
+                return render_response(request, "tema/themeitem_change.html", locals())
+        else:
+            default_data = {
+                    "name": object.name,
+                    "category": object.category.id,
+                    "license": object.license.id,
+                    "description": object.description,
+                    "changelog": object.changelog,
+                    "comment_enabled": object.comment_enabled,
+                    }
+            form = ThemeItemForm(initial=default_data)
+        return render_response(request, "tema/themeitem_change.html", locals())
+    else:
+        return render_response(request, "tema/message.html", {"type": "error", "message": "Bu işlemi yapmak için yetkiniz yok."})

Modified: branches/stable/templates/404.html
=================================================================
--- branches/stable/templates/404.html	(original)
+++ branches/stable/templates/404.html	Thu Jun  5 17:17:32 2008
@@ -2,10 +2,22 @@
 
 {% block title %}Sayfa Bulunamadı - {% endblock %}
 
+{% block header_menu %}
+    {% include "header.html" %}
+{% endblock %}
+<br/>
+{% block ust_menu %}
+    {% include "ust_menu_ayrinti.html" %}
+{% endblock %}
+
 {% block content %}
 
 <br />
 
-<h2>Ulaşmaya çalıştığınız sayfa bulunamadı...</h2><a href="/">&lt;- Anasayfa</a>
-
+<h2>Ulaşmaya çalıştığınız sayfa bulunamadı...</h2>
+<ul>
+    <li>Anasayfa'ya gitmek için <a href="/">tıklayın</a></li>
+    <li>Özgürlükİçin e-dergiye gitmek için <a href="/e-dergi/">tıklayın</a></li>
+    <li>Özgürlükİçin forumlarına gitmek için <a href="/forum/">tıklayın</a></li>
+</ul>
 {% endblock %}

Modified: branches/stable/templates/footer.html
=================================================================
--- branches/stable/templates/footer.html	(original)
+++ branches/stable/templates/footer.html	Thu Jun  5 17:17:32 2008
@@ -1,6 +1,6 @@
 <div id="footer_new">
     <div id="footer_copyright">
-        <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons (by-nc-sa)</a> / Pardus logosu TÜBİTAK/UEKAE'nin tescilli markasıdır.
+        <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons (by-nc-sa)</a> / <a href="http://www.pardus.org.tr" target="_blank">Pardus</a> logosu TÜBİTAK/UEKAE'nin tescilli markasıdır.
     </div>
     <div id="footer_links">
         <a href="/hakkinda/">Hakkında</a> | <a href="/takip_et/">Takip et</a> | <a href="/hata/">Hata raporla</a>

Modified: branches/stable/templates/forum/forum_footer.html
=================================================================
--- branches/stable/templates/forum/forum_footer.html	(original)
+++ branches/stable/templates/forum/forum_footer.html	Thu Jun  5 17:17:32 2008
@@ -1,6 +1,6 @@
 <div id="footer">
     <div id="footer_copyright">
-        <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons (by-nc-sa)</a> / Pardus logosu TÜBİTAK/UEKAE'nin tescilli markasıdır.
+        <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons (by-nc-sa)</a> / <a href="http://www.pardus.org.tr" target="_blank">Pardus</a> logosu TÜBİTAK/UEKAE'nin tescilli markasıdır.
     </div>
     <div id="footer_links">
         <a href="/hakkinda/">Hakkında</a> | <a href="/takip_et/">Takip et</a> | <a href="/hata/">Hata raporla</a>

Modified: branches/stable/templates/game/game_detail.html
=================================================================
--- branches/stable/templates/game/game_detail.html	(original)
+++ branches/stable/templates/game/game_detail.html	Thu Jun  5 17:17:32 2008
@@ -34,11 +34,11 @@
         <form method="post" action="/oyun/yorum/{{game.slug}}/">
             {{form}}
             <br />
-            <span style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></span>
             <input type="submit" value="Gönder">
         </form>
     {% endif %}
 {% endif %}
+<div style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></div>
 <div class="page_properties"><a href="{{ game.get_printable_url }}"><img src="/media/img/print.png" alt="yazdır" title="yazıcı dostu görünüm" /></a></div>
 <div class="page_last_update">Son güncelleme: {{ game.update|timedelta }}</div>
 

Modified: branches/stable/templates/howto/howto_detail.html
=================================================================
--- branches/stable/templates/howto/howto_detail.html	(original)
+++ branches/stable/templates/howto/howto_detail.html	Thu Jun  5 17:17:32 2008
@@ -33,12 +33,12 @@
         <form method="post" action="/nasil/yorum/{{howto.slug}}/">
             {{form}}
             <br />
-            <span style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></span>
             <input type="submit" value="Gönder">
         </form>
     {% endif %}
 {% endif %}
 
+<div style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></div>
 <div class="page_properties"><a href="{{ howto.get_printable_url }}"><img src="/media/img/print.png" alt="yazdır" title="yazıcı dostu görünüm" /></a></div>
 <div class="page_last_update">Son güncelleme: {{ howto.update|timedelta }}</div>
 

Modified: branches/stable/templates/news/news_detail.html
=================================================================
--- branches/stable/templates/news/news_detail.html	(original)
+++ branches/stable/templates/news/news_detail.html	Thu Jun  5 17:17:32 2008
@@ -34,11 +34,11 @@
         <form method="post" action="/haber/yorum/{{news.slug}}/">
             {{form}}
             <br/>
-            <span style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></span>
             <input type="submit" value="Gönder">
         </form>
     {% endif %}
 {% endif %}
+<div style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></div>
 <div class="page_properties"><a href="{{ news.get_printable_url }}"><img src="/media/img/print.png" alt="yazdır" title="yazıcı dostu görünüm" /></a></div>
 <div class="page_last_update">Son güncelleme: {{ news.update|timedelta }}</div>
 

Modified: branches/stable/templates/package/package_detail.html
=================================================================
--- branches/stable/templates/package/package_detail.html	(original)
+++ branches/stable/templates/package/package_detail.html	Thu Jun  5 17:17:32 2008
@@ -34,11 +34,11 @@
         <form method="post" action="/paket/yorum/{{package.slug}}/">
             {{form}}
             <br/>
-            <span style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></span>
             <input type="submit" value="Gönder">
         </form>
     {% endif %}
 {% endif %}
+<div style="float:right;margin-right:10px"><a href="{{comment_url}}">Yorumlar ({{ comment_count }})</a> <a href="{{comment_url}}"><img src="/media/dijital/img/forum/msg_sim.gif" /></a></div>
 <div class="page_properties"><a href="{{ package.get_printable_url }}"><img src="/media/img/print.png" alt="yazdır" title="yazıcı dostu görünüm" /></a></div>
 <div class="page_last_update">Son güncelleme: {{ package.update|timedelta }}</div>
 

Modified: branches/stable/templates/tema/base.html
=================================================================
--- branches/stable/templates/tema/base.html	(original)
+++ branches/stable/templates/tema/base.html	Thu Jun  5 17:17:32 2008
@@ -1,5 +1,4 @@
 {% load petition %}
-{% load theme %}
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
@@ -30,22 +29,35 @@
 
 {% block ust_menu %}
 {% endblock %}
-
 <div id="{% block pagetype %}page{% endblock %}">
     <div id="content">
-        <div class="tema_header">
-            <a href="/tema/goster/son/">En son eklenen</a>
-            <a href="/tema/goster/indirilen/">En çok indirilen</a>
-            <a href="/tema/goster/begenilen/">En çok oy alan</a>
+        {% block tema_menu %}
+        <div class="tema_order_by">
+            <a href="/tema/listele/{{ parentcategory|default_if_none:"tum-kategoriler" }}/{{ subcategory|default_if_none:"tumu" }}/tarih/">En yeniler</a>
+            <a href="/tema/listele/{{ parentcategory|default_if_none:"tum-kategoriler" }}/{{ subcategory|default_if_none:"tumu" }}/indirilme/">En çok indirilenler</a>
+            <a href="/tema/listele/{{ parentcategory|default_if_none:"tum-kategoriler" }}/{{ subcategory|default_if_none:"tumu" }}/puan/">En yüksek puanlılar</a>
+            <a href="/tema/listele/{{ parentcategory|default_if_none:"tum-kategoriler" }}/{{ subcategory|default_if_none:"tumu" }}/alfabe/">Alfabe sırası</a>
             <a href="/tema/ekle/">Ekle</a>
         </div>
+
+        <div class="tema_order_by">
+            <h3><a href="/tema/listele/tum-kategoriler/tumu/{{ order_by|default:"tarih" }}/">Tümü</a></h3>
+            {% for category in categories %}
+            <h3><a href="/tema/listele/{{ category.slug|default_if_none:"tum-kategoriler" }}/tumu/{{ order_by|default_if_none:"tarih" }}/">{{ category.name }}</a></h3>
+            <ul>
+            {% for sub_category in category.subcategory_set.all %}
+            <li><a href="/tema/listele/{{ category.slug|default_if_none:"tum-kategoriler" }}/{{ sub_category.slug|default_if_none:"tumu" }}/{{ order_by|default_if_none:"tarih" }}/">{{ sub_category.name }}</a></li>
+            {% endfor %}
+            </ul>
+            {% endfor %}
+        </div>
+        {% endblock %}
         {% block content %}
         {% endblock %}
     </div>
 
     <div id="sidebar">
         {% block sidebartop %}
-        {% category_box %}
         <div class="sidebar_box">
             <div class="sidebar_top">&nbsp;</div>
             <div class="sidebar_middle">

Modified: branches/stable/templates/tema/themeitem_detail.html
=================================================================
--- branches/stable/templates/tema/themeitem_detail.html	(original)
+++ branches/stable/templates/tema/themeitem_detail.html	Thu Jun  5 17:17:32 2008
@@ -7,6 +7,7 @@
 {% endblock %}
 
 {% block content %}
+{% if button_change %}<a href="{{ object.get_change_url }}">Düzenle</a>{% endif %}
 <div class="themeitem">
     <div class="themeitem_title">{{ object.name }}</div>
     <div class="themeitem_screenshots">
@@ -15,7 +16,7 @@
         {% endfor %}
     </div>
     <div class="themeitem_category"><a href="{{ object.category.get_absolute_url }}">{{ object.category }}</a></div>
-    <div class="themeitem_submit_date">{{ object.submit_date }}</div>
+    <div class="themeitem_edit_date">{{ object.submit_date|date:"d F Y" }}</div>
     <div class="themeitem_download_count">{{ object.download_count }}</div>
     <div class="themeitem_rating">{{ object.rating }} <a href="/tema/oyla/{{ object.id }}/0/">0</a> <a href="/tema/oyla/{{ object.id }}/1/">1</a> <a href="/tema/oyla/{{ object.id }}/2/">2</a> <a href="/tema/oyla/{{ object.id }}/3/">3</a> <a href="/tema/oyla/{{ object.id }}/4/">4</a></div>
     <div class="themeitem_author"><a href="/tema/kullanici/{{ object.author }}/">{{ object.author }}</a></div>

Modified: branches/stable/templates/tema/themeitem_list.html
=================================================================
--- branches/stable/templates/tema/themeitem_list.html	(original)
+++ branches/stable/templates/tema/themeitem_list.html	Thu Jun  5 17:17:32 2008
@@ -4,19 +4,24 @@
 {% endblock %}
 {% block ust_menu %}
     {% include "ust_menu_ayrinti.html" %}
+
 {% endblock %}
 
 {% block content %}
 <div class="itemlist">
 {% for item in object_list %}
     <div class="itemlist_listitem">
-        <div class="listitem_screenshot">{% if item.screenshot_set.count %}<img src="{{ item.screenshot_set.all.0.thumbnail }}" alt="ekran görüntüsü" width="100px" />{% endif %}</div>
-        <div class="listitem_name"><a href="{{ item.get_absolute_url }}">{{ item.name }}</a></div>
-        <div class="listitem_category"><a href="{{ item.category.get_absolute_url }}">{{ item.category }}</a></div>
-        {% if item.comment_set.count %}<div class="listitem_comment">{{ item.comment_set.count }} yorum</div>{% endif %}
-        <div class="listitem_rating">{{ item.rating }}</div>
-        <div class="listitem_submit_date">{{ item.submit_date|date:"d F Y" }}</div>
+        <div class="listitem_firstcolumn">
+            <div class="listitem_screenshot">{% if item.screenshot_set.count %}<img src="{{ item.screenshot_set.all.0.thumbnail }}" alt="ekran görüntüsü" width="100px" />{% endif %}</div>
+            <div class="listitem_name"><a href="{{ item.get_absolute_url }}">{{ item.name }}</a></div>
+            <div class="listitem_category"><a href="/tema/listele/{{ item.parentcategory.slug }}/tumu/{{ order_by }}/">{{ item.parentcategory }}</a></div>
+        </div>
+        <div class="listitem_secondcolumn">
+            {% if item.comment_set.count %}<div class="listitem_comment">{{ item.comment_set.count }} yorum</div>{% endif %}
+            <div class="listitem_rating"><span class="listitem_label">Puan:</a></span> <span class="listitem_text">%{{ item.rating }}</span><div class="listitem_ratingbar"><div class="listitem_ratingbar_inside" style="width: {{ item.rating }}%"></div></div></div>
+        <div class="listitem_edit_date"><span class="listitem_label">Tarih:</a></span><span class="listitem_text"> {{ item.edit_date|date:"d F Y" }}</span></div>
         <div class="listitem_more"><a href="{{ item.get_absolute_url }}">daha fazla</a></div>
+        </div>
     </div>
 {% endfor %}
 </div>


More information about the Oi-commits mailing list