From oi-svn at pardus.org.tr Tue Sep 1 06:11:34 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 1 Sep 2009 06:11:34 +0300 (EEST) Subject: [Oi-commits] trunk - show dates on demand Message-ID: <20090901031136.5880749D41D@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 1 06:11:32 2009 New Revision: 2817 Modified: trunk/shipit/views.py trunk/templates/shipit/clients_delivered.html trunk/templates/shipit/clients_not_sent.html trunk/templates/shipit/clients_to_send.html Log: show dates on demand --- shipit/views.py | 4 ++++ templates/shipit/clients_delivered.html | 4 ++-- templates/shipit/clients_not_sent.html | 4 ++-- templates/shipit/clients_to_send.html | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) Modified: trunk/shipit/views.py ================================================================= --- trunk/shipit/views.py (original) +++ trunk/shipit/views.py Tue Sep 1 06:11:32 2009 @@ -120,16 +120,19 @@ @permission_required("shipit.change_cdclient") def cdclient_list_to_send(request): cdclient_list = CdClient.objects.filter(confirmed=True, sent=False) + show_date = request.GET.has_key("date") return render_response(request, "shipit/clients_to_send.html", locals()) @permission_required("shipit.change_cdclient") def cdclient_list_sent(request): cdclient_list = CdClient.objects.filter(confirmed=True) + show_date = request.GET.has_key("date") return render_response(request, "shipit/clients_to_send.html", locals()) @permission_required("shipit.change_cdclient") def cdclient_list_delivered(request): cargo_list = Cargo.objects.all() + show_date = request.GET.has_key("date") return render_response(request, "shipit/clients_delivered.html", locals()) @permission_required("shipit.change_cdclient") @@ -139,6 +142,7 @@ for client in cdclient_list: if not client.sent: count += 1 + show_date = request.GET.has_key("date") return render_response(request, "shipit/clients_not_sent.html", locals()) @permission_required("shipit.change_cdclient") Modified: trunk/templates/shipit/clients_delivered.html ================================================================= --- trunk/templates/shipit/clients_delivered.html (original) +++ trunk/templates/shipit/clients_delivered.html Tue Sep 1 06:11:32 2009 @@ -5,10 +5,10 @@ - + {% if show_date %}{% endif %} {% for cargo in cargo_list %} - + {% if show_date %}{% endif %} {% endfor %}
({{ cargo_list.count }}) ?sim?ehirKargo Takip Kodu
({{ cargo_list.count }}) ?sim?ehirKargo Takip KoduBa?vuru TarihiKargoya Verili? Tarihi
{{ cargo.cdclient.get_full_name }}{{ cargo.cdclient.town }}/{{ cargo.cdclient.get_city_display }}{{ cargo.serial }}-{{ cargo.follow_code }}{{ cargo.cdclient.get_full_name }}{{ cargo.cdclient.town }}/{{ cargo.cdclient.get_city_display }}{{ cargo.serial }}-{{ cargo.follow_code }}{{ cargo.cdclient.date }}{{ cargo.date }}
Modified: trunk/templates/shipit/clients_not_sent.html ================================================================= --- trunk/templates/shipit/clients_not_sent.html (original) +++ trunk/templates/shipit/clients_not_sent.html Tue Sep 1 06:11:32 2009 @@ -5,11 +5,11 @@ - + {% if show_date %}{% endif %} {% for client in cdclient_list %} {% if not client.sent %} - + {% if show_date %}{% endif %} {% endif %} {% endfor %} Modified: trunk/templates/shipit/clients_to_send.html ================================================================= --- trunk/templates/shipit/clients_to_send.html (original) +++ trunk/templates/shipit/clients_to_send.html Tue Sep 1 06:11:32 2009 @@ -5,10 +5,10 @@
({{ count }}) ?simAdresTelefon
({{ count }}) ?simAdresTelefonBa?vuru Tarihi
{{ client.get_full_name }}{{ client.address }} {{ client.town }}/{{ client.get_city_display }}{{ client.get_full_phone }}{{ client.get_full_name }}{{ client.address }} {{ client.town }}/{{ client.get_city_display }}{{ client.get_full_phone }}{{ client.date }}
- + {% if show_date %}{% endif %} {% for client in cdclient_list %} - + {% if show_date %}{% endif %} {% endfor %}
?simAdresTelefon
?simAdresTelefonBa?vuru Tarihi
{{ client.get_full_name }}{{ client.address }} {{ client.town }}/{{ client.get_city_display }}{{ client.get_full_phone }}{{ client.get_full_name }}{{ client.address }} {{ client.town }}/{{ client.get_city_display }}{{ client.get_full_phone }}{{ client.date }}
From oi-svn at pardus.org.tr Tue Sep 1 06:24:54 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 1 Sep 2009 06:24:54 +0300 (EEST) Subject: [Oi-commits] trunk/shipit - custom city list without yurtdisi Message-ID: <20090901032454.DD9AA49D41E@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 1 06:24:53 2009 New Revision: 2818 Modified: trunk/shipit/models.py trunk/shipit/settings.py Log: custom city list without yurtdisi --- models.py | 2 - settings.py | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) Modified: trunk/shipit/models.py ================================================================= --- trunk/shipit/models.py (original) +++ trunk/shipit/models.py Tue Sep 1 06:24:53 2009 @@ -10,7 +10,7 @@ from django.db import models from django.contrib.sites.models import Site -from oi.settings import CITY_LIST +from oi.shipit.settings import CITY_LIST from oi.middleware import threadlocals class CdClient(models.Model): Modified: trunk/shipit/settings.py ================================================================= --- trunk/shipit/settings.py (original) +++ trunk/shipit/settings.py Tue Sep 1 06:24:53 2009 @@ -7,3 +7,88 @@ CDCLIENTS_PER_PAGE = 100 CD_MAIL_LIST = "cdgonder at ozgurlukicin.com" +CITY_LIST = ( + ('adana','Adana'), + ('adiyaman','Ad?yaman'), + ('afyon','Afyon'), + ('agri','A?r?'), + ('aksaray','Aksaray'), + ('amasya','Amasya'), + ('ankara','Ankara'), + ('antalya','Antalya'), + ('ardahan','Ardahan'), + ('artvin','Artvin'), + ('aydin','Ayd?n'), + ('balikesir','Balikesir'), + ('bartin','Bart?n'), + ('batman','Batman'), + ('bayburt','Bayburt'), + ('bilecik','Bilecik'), + ('bingol','Bing?l'), + ('bitlis','Bitlis'), + ('bolu','Bolu'), + ('burdur','Burdur'), + ('bursa','Bursa'), + ('canakkale','?anakkale'), + ('cankiri','?ank?r?'), + ('corum','?orum'), + ('denizli','Denizli'), + ('diyarbakir','Diyarbak?r'), + ('duzce','D?zce'), + ('edirne','Edirne'), + ('elazig','Elaz??'), + ('erzincan','Erzincan'), + ('erzurum','Erzurum'), + ('eskisehir','Eski?ehir'), + ('gaziantep','Gaziantep'), + ('giresun','Giresun'), + ('gumushane','G?m??hane'), + ('hakkari','Hakkari'), + ('hatay','Hatay'), + ('igdir','I?d?r'), + ('isparta','Isparta'), + ('istanbul_anadolu','?stanbul (Anadolu)'), + ('istanbul_avrupa','?stanbul (Avrupa)'), + ('izmir','?zmir'), + ('kahramanmaras','KahramanMara?'), + ('karabuk', 'Karab?k'), + ('karaman','Karaman'), + ('kars','Kars'), + ('kastamonu','Kastamonu'), + ('kayseri','Kayseri'), + ('kilis', 'Kilis'), + ('kirikkale','K?r?kkale'), + ('kirklareli','K?rklareli'), + ('kirsehir','K?r?ehir'), + ('kocaeli','Kocaeli'), + ('konya','Konya'), + ('kutahya','K?tahya'), + ('malatya','Malatya'), + ('manisa','Manisa'), + ('mardin','Mardin'), + ('mersin','Mersin'), + ('mugla','Mu?la'), + ('mus','Mu?'), + ('nevsehir','Nev?ehir'), + ('nigde','Ni?de'), + ('ordu','Ordu'), + ('osmaniye', 'Osmaniye'), + ('rize','Rize'), + ('sakarya','Sakarya'), + ('samsun','Samsun'), + ('siirt','Siirt'), + ('sinop','Sinop'), + ('sirnak','??rnak'), + ('sivas','Sivas'), + ('tekirdag','Tekirdag'), + ('tokat','Tokat'), + ('trabzon','Trabzon'), + ('tunceli','Tunceli'), + ('urfa','?anl?urfa'), + ('usak','U?ak'), + ('van','Van'), + ('yalova', 'Yalova'), + ('yozgat','Yozgat'), + ('zonguldak','Zonguldak'), + #('zzyurtdisi', 'Yurtd???'), +) From oi-svn at pardus.org.tr Tue Sep 1 12:30:15 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 1 Sep 2009 12:30:15 +0300 (EEST) Subject: [Oi-commits] trunk/templates/shipit - show count Message-ID: <20090901093015.2E4CD49D4C8@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 1 12:30:14 2009 New Revision: 2819 Modified: trunk/templates/shipit/clients_to_send.html Log: show count --- clients_to_send.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/templates/shipit/clients_to_send.html ================================================================= --- trunk/templates/shipit/clients_to_send.html (original) +++ trunk/templates/shipit/clients_to_send.html Tue Sep 1 12:30:14 2009 @@ -5,7 +5,7 @@ - {% if show_date %}{% endif %} + {% if show_date %}{% endif %} {% for client in cdclient_list %} {% if show_date %}{% endif %} From oi-svn at pardus.org.tr Thu Sep 3 19:10:38 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 3 Sep 2009 19:10:38 +0300 (EEST) Subject: [Oi-commits] trunk/tema - add wallpaper tag by default Message-ID: <20090903161038.D2A6549DAB4@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 3 19:10:38 2009 New Revision: 2820 Modified: trunk/tema/views.py Log: add wallpaper tag by default, --- views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Thu Sep 3 19:10:38 2009 @@ -245,7 +245,8 @@ #TODO: Send e-mail to admins return render_response(request, "tema/themeitem_add_complete.html", locals()) else: - form = WallpaperForm() + tags = [t.pk for t in Tag.objects.filter(name="duvar ka??d?")] + form = WallpaperForm(initial={"tags":tags}) fileforms = WallpaperFileFormSet() return render_response(request, "tema/themeitem_add_wallpaper.html", locals()) From oi-svn at pardus.org.tr Sat Sep 5 18:37:23 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 5 Sep 2009 18:37:23 +0300 (EEST) Subject: [Oi-commits] trunk - extremely hacky tag chooser for ideas Message-ID: <20090905153723.93BDB49C8CB@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 5 18:37:23 2009 New Revision: 2821 Added: trunk/media/js/taghelper_idea.js - copied, changed from r2764, trunk/media/js/taghelper.js Modified: trunk/ideas/templates/idea_add_form.html Log: extremely hacky tag chooser for ideas --- ideas/templates/idea_add_form.html | 3 + media/js/taghelper_idea.js | 57 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) Modified: trunk/ideas/templates/idea_add_form.html ================================================================= --- trunk/ideas/templates/idea_add_form.html (original) +++ trunk/ideas/templates/idea_add_form.html Sat Sep 5 18:37:23 2009 @@ -4,7 +4,10 @@ {% block extrahead %} + + + {% endblock %} {% block idea %} {% if user.is_authenticated %} Copied: trunk/media/js/taghelper_idea.js (from r2764, trunk/media/js/taghelper.js) ================================================================= --- trunk/media/js/taghelper.js (original) +++ trunk/media/js/taghelper_idea.js Sat Sep 5 18:37:23 2009 @@ -1,7 +1,7 @@ var smartTags = true; function removeTag(tag, removeButton) { /* deselects given tag (as string) from select box and removes it from tag list */ - $("#id_tags > option:selected").each(function (index, option){ + $("#tags > option:selected").each(function (index, option){ if (option.innerHTML == tag) return option.selected = false; }); @@ -10,38 +10,37 @@ function updateSelectedList() { /* cleans and fills tag list by looking at selected items in selectbox */ var selected = ""; - $("#id_tags > option:selected").each(function(index, option) { + $("#tags > option:selected").each(function(index, option) { var tag = option.innerHTML; selected = selected + "
"+tag+"x
"; }); $("#selectedItems").remove(); - $("#id_tags ~ .help:first").after("
"+selected+"
"); + $("#taghelp").after("
"+selected+"
"); } function toggleTagMode() { if (smartTags) { smartTags = false; - $("#id_tags, #add_id_tags, #id_tags ~ .help:last").show(); - $("#tagfilter, #selectedItems, #id_tags ~ .help:first").hide(); + $("#tags, #add_tags, .help_text:last").show(); + $("#tagfilter, #selectedItems, #taghelp").hide(); } else { smartTags = true; - $("#id_tags, #add_id_tags, #id_tags ~ .help:last").hide(); - $("#tagfilter, #selectedItems, #id_tags ~ .help:first").show(); + $("#tags, #add_tags, .help_text:last").hide(); + $("#tagfilter, #selectedItems, #taghelp").show(); } } $(document).ready(function() { - $("#tags").attr("id", "id_tags"); /* I'll use this on forum too, but it has tags instead of id_tags, that's why I'm modifying it */ - $("#id_tags").change(updateSelectedList); + $("#tags").change(updateSelectedList); /* create a tag input field for filtering through tags */ - $("#id_tags, #add_id_tags, #id_tags ~ .help:last").hide(); - $("#id_tags ~ .help:last").before("

Bir etiket ad? yaz?p Enter'a bas?n.

"); - $("#id_tags ~ .help:last").after("[T?m Etiketleri G?ster/Gizle]"); + $("#tags, #add_tags, .help_text:last").hide(); + $(".help_text:last").before("

Bir etiket ad? yaz?p Enter'a bas?n.

"); + $(".help_text:last").after("[T?m Etiketleri G?ster/Gizle]"); updateSelectedList(); /* add autocompletion support to our tag input field, fills autocomplete list from the selectbox */ $("#tagfilter").autocomplete({ - source:"#id_tags", + source:"#tags", onSelect:function(){ /* select the given tag in selectbox and update tag list */ - options = $("#id_tags > option"); + options = $("#tags > option"); var i = 0; while (i References: <20090905153723.93BDB49C8CB@ns1.pardus.org.tr> Message-ID: 2009/9/5 U?ur ?etin > Author: jnmbk > Date: Sat Sep 5 18:37:23 2009 > New Revision: 2821 > > Added: > trunk/media/js/taghelper_idea.js > - copied, changed from r2764, trunk/media/js/taghelper.js > Modified: > trunk/ideas/templates/idea_add_form.html > Log: > extremely hacky tag chooser for ideas > > Niye "extremely hacky" i?ler yap?yoruz? ??in do?rusunu yapmak zaman?m?z m? yok? Yeteneklerimiz mi k?s?tl?? ?kisinden de bizde fazlas?yla oldu?unu biliyorum, l?tfen bu i?in do?rusunu yapal?m! Ne kadar eski kodu ??pe ataca??m?z a??k?as? umurumda bile de?il, ama ?zg?rl?k??in'in hacky ??z?mler y?z?nden bir g?n k?p?rdayamaz hale gelmesini istemiyorum. ??in do?rusunun bize maliyeti nedir U?ur? -------------- sonraki b?l?m -------------- Bir HTML eklentisi temizlendi... URL: From ugur.jnmbk at gmail.com Sat Sep 5 19:47:24 2009 From: ugur.jnmbk at gmail.com (=?UTF-8?B?VcSfdXIgw4dldGlu?=) Date: Sat, 5 Sep 2009 19:47:24 +0300 Subject: [Oi-commits] trunk - extremely hacky tag chooser for ideas In-Reply-To: References: <20090905153723.93BDB49C8CB@ns1.pardus.org.tr> Message-ID: <9dca79e40909050947y5acb9b01l1df4648bb3c4e4cc@mail.gmail.com> 05 09 2009 tarihinde Ali I??ng?r yazm??: > Niye "extremely hacky" i?ler yap?yoruz? ??nk? sorunsuz ?al???yor ve ileride olur da Beyin'i Forum'la ayn? yap?ya kavu?turursak direkt forumdaki js'yi kullanarak halledebiliriz. > ??in do?rusunu yapmak zaman?m?z m? yok? Yeteneklerimiz mi k?s?tl?? > ?kisinden de bizde fazlas?yla oldu?unu biliyorum, l?tfen bu i?in do?rusunu > yapal?m! E?er bir g?n sitenin temas?n? de?i?tireceksek Beyin'deki formun Forum'dakiyle ayn? yap?ya getirilmesi i?inin de o zaman yap?lmas? gerekti?ini d???nd?m. -- U?ur ?etin From oi-svn at pardus.org.tr Tue Sep 8 04:41:10 2009 From: oi-svn at pardus.org.tr (=?utf-8?q?Ahmet_Ayg=C3=BCn?=) Date: Tue, 8 Sep 2009 04:41:10 +0300 (EEST) Subject: [Oi-commits] trunk/profile - Typo :p Message-ID: <20090908014110.3892949C8DA@ns1.pardus.org.tr> Author: ahmet Date: Tue Sep 8 04:41:09 2009 New Revision: 2822 Modified: trunk/profile/views.py Log: Typo :p --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/profile/views.py ================================================================= --- trunk/profile/views.py (original) +++ trunk/profile/views.py Tue Sep 8 04:41:09 2009 @@ -16,7 +16,7 @@ from django.shortcuts import get_object_or_404 from django.views.generic.list_detail import object_list -from oi.settings import DEFAULT_FROM_EMAIL, LOGIN_URL, WEB_URL, PROFILE_EDIT_URL, WEB_URL +from oi.settings import DEFAULT_FROM_EMAIL, LOGIN_URL, WEB_URL, PROFILE_EDIT_URL # Model object for followed topics from oi.forum.models import WatchList, AbuseReport, Post From akin at omeroglu.net Tue Sep 8 10:37:22 2009 From: akin at omeroglu.net (=?ISO-8859-9?Q?Ak=FDn_=D6mero=F0lu?=) Date: Tue, 8 Sep 2009 10:37:22 +0300 Subject: [Oi-commits] trunk/profile - Typo :p In-Reply-To: <20090908014110.3892949C8DA@ns1.pardus.org.tr> References: <20090908014110.3892949C8DA@ns1.pardus.org.tr> Message-ID: <9652916c0909080037k4a5239dcoa9a737f5814accfc@mail.gmail.com> 2009/9/8 Ahmet Ayg?n > Author: ahmet > Date: Tue Sep 8 04:41:09 2009 > New Revision: 2822 > > Aman da aman Ahmet Bey'e bak?n hele. Hata d?zeltirmi?, katk?lar verirmi?. G?zlerimiz ya?ard? :P -------------- sonraki b?l?m -------------- Bir HTML eklentisi temizlendi... URL: From me at ahmetaygun.net Tue Sep 8 12:52:28 2009 From: me at ahmetaygun.net (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Tue, 8 Sep 2009 12:52:28 +0300 Subject: [Oi-commits] trunk/profile - Typo :p In-Reply-To: <9652916c0909080037k4a5239dcoa9a737f5814accfc@mail.gmail.com> References: <20090908014110.3892949C8DA@ns1.pardus.org.tr> <9652916c0909080037k4a5239dcoa9a737f5814accfc@mail.gmail.com> Message-ID: <200909081252.28647.me@ahmetaygun.net> Ak?n ?mero?lu, Tuesday 08 September 2009 10:37:22 tarihinde yazd?: > Aman da aman Ahmet Bey'e bak?n hele. Hata d?zeltirmi?, katk?lar verirmi?. > G?zlerimiz ya?ard? :P Daha neler neler var ama kodu ba?tan yazmak daha kolay gibi geldi?inden ??eniyorum =) From oi-svn at pardus.org.tr Thu Sep 10 19:00:39 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 10 Sep 2009 19:00:39 +0300 (EEST) Subject: [Oi-commits] trunk - user contents page Message-ID: <20090910160039.3BB3649C8BF@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 10 19:00:39 2009 New Revision: 2823 Modified: trunk/tema/urls.py trunk/tema/views.py trunk/templates/tema/themeitem_list.html Log: user contents page --- tema/urls.py | 2 +- tema/views.py | 4 +++- templates/tema/themeitem_list.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) Modified: trunk/tema/urls.py ================================================================= --- trunk/tema/urls.py (original) +++ trunk/tema/urls.py Thu Sep 10 19:00:39 2009 @@ -20,7 +20,7 @@ #the first page listing (r'^$','themeitem_list'), #(r'^duzenle/(?P[0-9]+)/$','themeitem_change'), - #(r'^kullanici/(?P[a-z]+)/$','list_user'), + (r'^kullanici/(?P.+)/$','list_user'), #(r'^oyla/(?P[0-9]+)/(?P[0-4])/$','vote'), #(r'^ekle/$','themeitem_add'), (r'^raporla/(?P\d+)/$', 'report_abuse'), Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Thu Sep 10 19:00:39 2009 @@ -121,11 +121,13 @@ def list_user(request, username): "Theme items of a user" user = get_object_or_404(User, username=username) - themeItems = user.themeitem_set.filter(approved=True) + themeItems = Wallpaper.objects.filter(status=True, author=user) params={ 'queryset': themeItems, 'paginate_by': THEME_ITEM_PER_PAGE, + "template_name": "tema/themeitem_list.html", + "extra_context": {"author":user}, } return object_list(request, **params) Modified: trunk/templates/tema/themeitem_list.html ================================================================= --- trunk/templates/tema/themeitem_list.html (original) +++ trunk/templates/tema/themeitem_list.html Thu Sep 10 19:00:39 2009 @@ -4,7 +4,7 @@ {% endblock %} - +{% block title %}{% if author %}{{ author }} taraf?ndan g?nderilen i?erik - {% endif %}{% endblock %} {% block content %} From oi-svn at pardus.org.tr Thu Sep 10 19:33:18 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 10 Sep 2009 19:33:18 +0300 (EEST) Subject: [Oi-commits] trunk - links to user content Message-ID: <20090910163318.7DCF549C8BA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 10 19:33:18 2009 New Revision: 2824 Modified: trunk/media/css/new/profile.css trunk/media/css/new/tema.css trunk/templates/tema/themeitem_wallpaper_detail.html trunk/templates/user/profile.html Log: links to user content --- media/css/new/profile.css | 2 +- media/css/new/tema.css | 14 +++++++++----- templates/tema/themeitem_wallpaper_detail.html | 3 ++- templates/user/profile.html | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) Modified: trunk/media/css/new/profile.css ================================================================= --- trunk/media/css/new/profile.css (original) +++ trunk/media/css/new/profile.css Thu Sep 10 19:33:18 2009 @@ -11,7 +11,7 @@ margin: 30px; } #user_profile_left a { - margin:30px; + margin:0px 30px; text-align: center; display: block; } Modified: trunk/media/css/new/tema.css ================================================================= --- trunk/media/css/new/tema.css (original) +++ trunk/media/css/new/tema.css Thu Sep 10 19:33:18 2009 @@ -15,12 +15,12 @@ /* Top Menu */ .themeitem_top { - height: 60px; + height: 72px; border: 1px #EDEDED solid; } .themeitem_top_title { - width: 430px; + width: 420px; height: 40px; padding: 10px; float: left; @@ -30,14 +30,18 @@ .themeitem_top_user { height: 50px; - width: 187px; + width: 197px; float: right; margin-top: 4px; margin-right: 5px; } -.themeitem_top_user img { - height: 50px; +.themeitem_top_user_content { + height: 12px; + width: 137px; + text-align: center; + float: right; + clear: right; } .themeitem_top_user_avatar { Modified: trunk/templates/tema/themeitem_wallpaper_detail.html ================================================================= --- trunk/templates/tema/themeitem_wallpaper_detail.html (original) +++ trunk/templates/tema/themeitem_wallpaper_detail.html Thu Sep 10 19:33:18 2009 @@ -21,8 +21,9 @@
{{ object.title }}
Modified: trunk/templates/user/profile.html ================================================================= --- trunk/templates/user/profile.html (original) +++ trunk/templates/user/profile.html Thu Sep 10 19:33:18 2009 @@ -48,6 +48,8 @@ {% ifequal request.user.id info.id %}Bilgilerimi D?zenle{% endifequal %}
{% if has_sent_messages %}Forumdaki ?letileri{% else %}Forumda ?letisi Yok{% endif %} +
+ Ekledi?i Temalar
From oi-svn at pardus.org.tr Sun Sep 20 21:30:05 2009 From: oi-svn at pardus.org.tr (=?utf-8?q?Ahmet_Ayg=C3=BCn?=) Date: Sun, 20 Sep 2009 21:30:05 +0300 (EEST) Subject: [Oi-commits] trunk/forum - compat with new django, use nullbooleanfield inste... Message-ID: <20090920183005.5ADCA49C8E4@ns1.pardus.org.tr> Author: ahmet Date: Sun Sep 20 21:30:05 2009 New Revision: 2825 Modified: trunk/forum/models.py Log: compat with new django, use nullbooleanfield instead of booleanfield(null=true) --- models.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Sun Sep 20 21:30:05 2009 @@ -29,7 +29,7 @@ topic = models.ForeignKey('Topic', verbose_name='Konu') author = models.ForeignKey(User, verbose_name='Yazar') text = models.TextField(verbose_name='?leti') - hidden = models.BooleanField(blank=True, null=True, default=0, verbose_name='Gizli') + hidden = models.NullBooleanField(blank=True, default=0, verbose_name='Gizli') created = models.DateTimeField(blank=True, null=True, auto_now_add=True, verbose_name='Olu?turulma tarihi') edited = models.DateTimeField(blank=True, null=True, auto_now_add=True, verbose_name='G?ncellenme tarihi') edit_count = models.IntegerField(default=0, verbose_name='G?ncellenme say?s?') @@ -153,10 +153,10 @@ """ forum = models.ForeignKey('Forum', verbose_name='Forum') title = models.CharField(max_length=100, verbose_name='Ba?l?k') - sticky = models.BooleanField(blank=True, null=True, default=0, verbose_name='Sabit') - locked = models.BooleanField(blank=True, null=True, default=0, verbose_name='Kilitli') - hidden = models.BooleanField(blank=True, null=True, default=0, verbose_name='Gizli') - general = models.BooleanField(blank=True, null=True, default=False, verbose_name='Genel') + sticky = models.NullBooleanField(blank=True, default=0, verbose_name='Sabit') + locked = models.NullBooleanField(blank=True, default=0, verbose_name='Kilitli') + hidden = models.NullBooleanField(blank=True, default=0, verbose_name='Gizli') + general = models.NullBooleanField(blank=True, default=False, verbose_name='Genel') posts = models.IntegerField(default=0, verbose_name='?leti say?s?') views = models.IntegerField(default=0, verbose_name='G?r?nt?lenme say?s?') topic_latest_post = models.ForeignKey(Post, blank=True, null=True, related_name='topic_latest_post', verbose_name='Son ileti') @@ -268,8 +268,8 @@ name = models.CharField(max_length=100, verbose_name='?sim') slug = models.SlugField(verbose_name='SEF isim') description = models.TextField(verbose_name='A??klama') - hidden = models.BooleanField(blank=True, null=True, default=0, verbose_name='Gizli') - locked = models.BooleanField(blank=True, null=True, default=0, verbose_name='Kapal?') + hidden = models.NullBooleanField(blank=True, default=0, verbose_name='Gizli') + locked = models.NullBooleanField(blank=True, default=0, verbose_name='Kapal?') topics = models.IntegerField(default=0, verbose_name='Konu say?s?') posts = models.IntegerField(default=0, verbose_name='?leti say?s?') forum_latest_post = models.ForeignKey(Post, blank=True, null=True, related_name='forum_latest_post', verbose_name='Son ileti') @@ -305,7 +305,7 @@ class Category(models.Model): name = models.CharField(max_length=255, verbose_name='Kategori ismi') - hidden = models.BooleanField(blank=True, null=True, verbose_name='Gizli') + hidden = models.NullBooleanField(blank=True, verbose_name='Gizli') order = models.PositiveIntegerField(unique=True, verbose_name='S?ralama') def __unicode__(self): From oi-svn at pardus.org.tr Mon Sep 21 00:36:03 2009 From: oi-svn at pardus.org.tr (=?utf-8?q?Ahmet_Ayg=C3=BCn?=) Date: Mon, 21 Sep 2009 00:36:03 +0300 (EEST) Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... Message-ID: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> Author: ahmet Date: Mon Sep 21 00:36:03 2009 New Revision: 2826 Modified: trunk/forum/admin.py trunk/forum/models.py trunk/forum/urls.py trunk/forum/views.py Log: Change url structure from /forum/topic.id/ to /forum/topic.slug/ This is more SEF than older one. ATTENTION PLEASE! ----------------- This change needs strong testing. Instructions ------------ To add slug field to current database, run this sql sentence: ALTER TABLE `forum_topic` ADD `slug` VARCHAR( 50 ) NOT NULL AFTER `title` To fill older topics' slug field, save following code as forum/hede.py and run: import re, string from oi.forum.models import Topic def slugs(cml): cml = string.replace(cml, '?', 's') cml = string.replace(cml, '?', 'i') cml = string.replace(cml, '?', 'c') cml = string.replace(cml, '?', 'u') cml = string.replace(cml, '?', 'g') cml = string.replace(cml, '?', 'o') cml = string.replace(cml, '?', 's') cml = string.replace(cml, '?', 'i') cml = string.replace(cml, '?', 'c') cml = string.replace(cml, '?', 'u') cml = string.replace(cml, '?', 'g') cml = string.replace(cml, '?', 'o') cml = re.sub('\s+', '-', cml) cml = re.sub('[^\w.-]', '', cml) return cml.strip('_.- ').lower() def doit(): topics = Topic.objects.all() for t in topics: t.slug = slugs(t.title)[:50] t.save() Thanks ;) --- admin.py | 1 models.py | 57 ++++++++++++++++++++++++------------------------ urls.py | 36 +++++++++++++++--------------- views.py | 73 ++++++++++++++++++++++++++++++++------------------------------ 4 files changed, 86 insertions(+), 81 deletions(-) Modified: trunk/forum/admin.py ================================================================= --- trunk/forum/admin.py (original) +++ trunk/forum/admin.py Mon Sep 21 00:36:03 2009 @@ -24,6 +24,7 @@ list_display = ("forum", "title") ordering = ["-title"] search_fields = ["title"] + prepopulated_fields = {'slug': ("title",)} class PostAdmin(admin.ModelAdmin): list_display = ("id", "topic", "author") Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Mon Sep 21 00:36:03 2009 @@ -58,23 +58,23 @@ j = k page = i / oi.forum.settings.POSTS_PER_PAGE + 1 - return '/forum/%s/%s/?page=%s#post%s' % (self.topic.forum.slug, self.topic.id, page, self.id) + return '/forum/%s/%s/?page=%s#post%s' % (self.topic.forum.slug, self.topic.slug, page, self.id) def get_quote_url(self): - return '/forum/%s/%s/quote/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + return '/forum/%s/%s/quote/%s/' % (self.topic.forum.slug, self.topic.slug, self.id) def get_edit_url(self): """ returns topic edit url of the post """ - return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.slug, self.id) def get_hide_url(self): - return '/forum/%s/%s/hide/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + return '/forum/%s/%s/hide/%s/' % (self.topic.forum.slug, self.topic.slug, self.id) def get_delete_url(self): - return '/forum/%s/%s/delete/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + return '/forum/%s/%s/delete/%s/' % (self.topic.forum.slug, self.topic.slug, self.id) def get_delete_confirm_url(self): - return '/forum/%s/%s/delete/%s/yes/' % (self.topic.forum.slug, self.topic.id, self.id) + return '/forum/%s/%s/delete/%s/yes/' % (self.topic.forum.slug, self.topic.slug, self.id) # creates unique message id for each post. This is used by "Message-ID" header. def get_email_id(self): @@ -153,6 +153,7 @@ """ forum = models.ForeignKey('Forum', verbose_name='Forum') title = models.CharField(max_length=100, verbose_name='Ba?l?k') + slug = models.SlugField('SEF Ba?l?k') sticky = models.NullBooleanField(blank=True, default=0, verbose_name='Sabit') locked = models.NullBooleanField(blank=True, default=0, verbose_name='Kilitli') hidden = models.NullBooleanField(blank=True, default=0, verbose_name='Gizli') @@ -167,51 +168,51 @@ return self.title def get_absolute_url(self): - return '/forum/%s/%s/?page=1' % (self.forum.slug, self.id) + return '/forum/%s/%s/' % (self.forum.slug, self.slug) def get_latest_post_url(self): import oi.forum.settings lastpage = ((self.posts - 1) / oi.forum.settings.POSTS_PER_PAGE) + 1 - return '/forum/%s/%s/?page=%s#post%s' % (self.forum.slug, self.id, lastpage, self.topic_latest_post.id) + return '/forum/%s/%s/?page=%s#post%s' % (self.forum.slug, self.slug, lastpage, self.topic_latest_post.id) def get_follow_url(self): - return '/forum/%s/%s/follow' % (self.forum.slug, self.id) + return '/forum/%s/%s/follow' % (self.forum.slug, self.slug) def get_reply_url(self): - return '/forum/%s/%s/reply/' % (self.forum.slug, self.id) + return '/forum/%s/%s/reply/' % (self.forum.slug, self.slug) def get_merge_url(self): - return '/forum/%s/%s/merge/' % (self.forum.slug, self.id) + return '/forum/%s/%s/merge/' % (self.forum.slug, self.slug) def get_move_url(self): - return '/forum/%s/%s/move/' % (self.forum.slug, self.id) + return '/forum/%s/%s/move/' % (self.forum.slug, self.slug) def get_edit_url(self): - return '/forum/%s/%s/edit/' % (self.forum.slug, self.id) + return '/forum/%s/%s/edit/' % (self.forum.slug, self.slug) def get_stick_url(self): - return '/forum/%s/%s/stick/' % (self.forum.slug, self.id) + return '/forum/%s/%s/stick/' % (self.forum.slug, self.slug) def get_lock_url(self): - return '/forum/%s/%s/lock/' % (self.forum.slug, self.id) + return '/forum/%s/%s/lock/' % (self.forum.slug, self.slug) def get_hide_url(self): - return '/forum/%s/%s/hide/' % (self.forum.slug, self.id) + return '/forum/%s/%s/hide/' % (self.forum.slug, self.slug) def get_create_poll_url(self): - return '/forum/%s/%s/poll/create/' % (self.forum.slug, self.id) + return '/forum/%s/%s/poll/create/' % (self.forum.slug, self.slug) def get_change_poll_url(self): - return '/forum/%s/%s/poll/change/' % (self.forum.slug, self.id) + return '/forum/%s/%s/poll/change/' % (self.forum.slug, self.slug) def get_toggle_general_url(self): - return '/forum/%s/%s/togglegeneral/' % (self.forum.slug, self.id) + return '/forum/%s/%s/togglegeneral/' % (self.forum.slug, self.slug) def get_delete_poll_url(self): - return '/forum/%s/%s/poll/delete/' % (self.forum.slug, self.id) + return '/forum/%s/%s/poll/delete/' % (self.forum.slug, self.slug) def get_email_id(self): - return '<%s.%s@%s>' % (md5.new(self.title).hexdigest(), self.id, FORUM_FROM_EMAIL.split('@')[1]) + return '<%s.%s@%s>' % (md5.new(self.title).hexdigest(), self.slug, FORUM_FROM_EMAIL.split('@')[1]) # for tooltip. Just get a short context of first post on the topic. def get_tooltip_context(self): @@ -248,12 +249,12 @@ ("can_change_general", "Can change general topic"), ) - def save(self): - if not self.id: - f = Forum.objects.get(id=self.forum.id) - f.topics += 1 - f.save() - super(Topic, self).save() + #def save(self): + #if not self.id: + #f = Forum.objects.get(id=self.forum.id) + #f.topics += 1 + #f.save() + #super(Topic, self).save() def delete(self): if self.id: @@ -287,7 +288,7 @@ latest_topic = self.forum_latest_post.topic lastpage = ((latest_topic.posts - 1) / oi.forum.settings.POSTS_PER_PAGE) + 1 - return '/forum/%s/%s/?page=%s#post%s' % (self.slug, latest_topic.id, lastpage, self.forum_latest_post.id) + return '/forum/%s/%s/?page=%s#post%s' % (self.slug, latest_topic.slug, lastpage, self.forum_latest_post.id) def __unicode__(self): return self.name Modified: trunk/forum/urls.py ================================================================= --- trunk/forum/urls.py (original) +++ trunk/forum/urls.py Mon Sep 21 00:36:03 2009 @@ -34,24 +34,24 @@ (r'^tumunu-okunmus-say/$', 'oi.forum.views.mark_all_as_read'), (r'^raporla/(?P\d+)/$', 'oi.forum.views.report_abuse'), (r'^raporlanmis-iletiler/$', 'oi.forum.views.list_abuse'), - (r'^(?P.*)/(?P\d+)/delete/(?P\d+)/$','oi.forum.views.delete_post'), + (r'^(?P.*)/(?P.*)/delete/(?P\d+)/$','oi.forum.views.delete_post'), (r'^(?P.*)/new/$', 'oi.forum.views.new_topic'), - (r'^(?P.*)/(?P\d+)/quote/(?P\d+)/$', 'oi.forum.views.reply'), - (r'^(?P.*)/(?P\d+)/reply/$', 'oi.forum.views.reply'), - (r'^(?P.*)/(?P\d+)/follow/$', 'oi.forum.views.follow'), - (r'^(?P.*)/(?P\d+)/hide/(?P\d+)/$', 'oi.forum.views.hide'), - (r'^(?P.*)/(?P\d+)/edit/(?P\d+)/$', 'oi.forum.views.edit_post'), - (r'^(?P.*)/(?P\d+)/hide/$', 'oi.forum.views.hide'), - (r'^(?P.*)/(?P\d+)/lock/$', 'oi.forum.views.lock'), - (r'^(?P.*)/(?P\d+)/stick/$', 'oi.forum.views.stick'), - (r'^(?P.*)/(?P\d+)/merge/$', 'oi.forum.views.merge'), - (r'^(?P.*)/(?P\d+)/move/$', 'oi.forum.views.move'), - (r'^(?P.*)/(?P\d+)/edit/$', 'oi.forum.views.edit_topic'), - (r'^(?P.*)/(?P\d+)/poll/create/$', 'oi.forum.views.create_poll'), - (r'^(?P.*)/(?P\d+)/poll/change/$', 'oi.forum.views.change_poll'), - (r'^(?P.*)/(?P\d+)/poll/delete/$', 'oi.forum.views.delete_poll'), - (r'^(?P.*)/(?P\d+)/poll/vote/(?P\d+)/$', 'oi.forum.views.vote_poll'), - (r'^(?P.*)/(?P\d+)/togglegeneral/$', 'oi.forum.views.toggle_general_topic'), - (r'^(?P.*)/(?P\d+)/$', 'oi.forum.views.topic'), + (r'^(?P.*)/(?P.*)/quote/(?P\d+)/$', 'oi.forum.views.reply'), + (r'^(?P.*)/(?P.*)/reply/$', 'oi.forum.views.reply'), + (r'^(?P.*)/(?P.*)/follow/$', 'oi.forum.views.follow'), + (r'^(?P.*)/(?P.*)/hide/(?P\d+)/$', 'oi.forum.views.hide'), + (r'^(?P.*)/(?P.*)/edit/(?P\d+)/$', 'oi.forum.views.edit_post'), + (r'^(?P.*)/(?P.*)/hide/$', 'oi.forum.views.hide'), + (r'^(?P.*)/(?P.*)/lock/$', 'oi.forum.views.lock'), + (r'^(?P.*)/(?P.*)/stick/$', 'oi.forum.views.stick'), + (r'^(?P.*)/(?P.*)/merge/$', 'oi.forum.views.merge'), + (r'^(?P.*)/(?P.*)/move/$', 'oi.forum.views.move'), + (r'^(?P.*)/(?P.*)/edit/$', 'oi.forum.views.edit_topic'), + (r'^(?P.*)/(?P.*)/poll/create/$', 'oi.forum.views.create_poll'), + (r'^(?P.*)/(?P.*)/poll/change/$', 'oi.forum.views.change_poll'), + (r'^(?P.*)/(?P.*)/poll/delete/$', 'oi.forum.views.delete_poll'), + (r'^(?P.*)/(?P.*)/poll/vote/(?P\d+)/$', 'oi.forum.views.vote_poll'), + (r'^(?P.*)/(?P.*)/togglegeneral/$', 'oi.forum.views.toggle_general_topic'), + (r'^(?P.*)/(?P.*)/$', 'oi.forum.views.topic'), (r'^(?P.*)/$', 'oi.forum.views.forum'), ) Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Mon Sep 21 00:36:03 2009 @@ -182,10 +182,13 @@ request.session["read_forum_dict"] = {} return HttpResponseRedirect(request.GET["next"]) -def topic(request, forum_slug, topic_id): +def topic(request, forum_slug, topic_slug): lastvisit_control(request) - topic = get_object_or_404(Topic, pk=topic_id) + if topic_slug.isdigit(): + topic = Topic.objects.get(pk=topic_slug) + else: + topic = get_object_or_404(Topic, slug=topic_slug) forum = topic.forum if forum.slug != forum_slug: return HttpResponseRedirect(topic.get_absolute_url()) @@ -200,7 +203,7 @@ # is the user watching this topic? try: - request.user.watchlist_set.get(topic__id=topic_id) + request.user.watchlist_set.get(topic__id=topic.id) watching = True except ObjectDoesNotExist: pass @@ -266,11 +269,11 @@ allow_empty = True) @login_required -def follow(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def follow(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) # determine if user already added this to prevent double adding. - if len(WatchList.objects.filter(topic__id=topic_id).filter(user__username=request.user.username)) > 0: + if len(WatchList.objects.filter(topic__id=topic.id).filter(user__username=request.user.username)) > 0: errorMessage = 'Bu ba?l??? zaten izlemektesiniz.' return render_response(request, 'forum/forum_error.html', {'message': errorMessage}) else: @@ -279,8 +282,8 @@ return HttpResponseRedirect(topic.get_absolute_url()) @login_required -def reply(request, forum_slug, topic_id, quote_id=False): - topic = get_object_or_404(Topic, pk=topic_id) +def reply(request, forum_slug, topic_slug, quote_id=False): + topic = get_object_or_404(Topic, slug=topic_slug) posts = topic.post_set.order_by('-created')[:POSTS_PER_PAGE] @@ -327,7 +330,7 @@ """ # send email to everyone who follows this topic. - watchlists = WatchList.objects.filter(topic__id=topic_id) + watchlists = WatchList.objects.filter(topic__id=topic.id) for watchlist in watchlists: send_mail_with_header('[Ozgurlukicin-forum] Re: %s' % topic.title, '%s\n%s

%s' % (css, render_bbcode(form.cleaned_data['text']), post_url, post_url), @@ -367,9 +370,9 @@ return render_response(request, 'forum/reply.html', locals()) @login_required -def edit_post(request, forum_slug, topic_id, post_id): +def edit_post(request, forum_slug, topic_slug, post_id): forum = get_object_or_404(Forum, slug=forum_slug) - topic = get_object_or_404(Topic, pk=topic_id) + topic = get_object_or_404(Topic, slug=topic_slug) post = get_object_or_404(Post, pk=post_id) posts = topic.post_set.filter(created__lt = post.created).order_by('-created')[:POSTS_PER_PAGE] @@ -457,9 +460,9 @@ return render_response(request, 'forum/new_topic.html', locals()) @permission_required('forum.change_topic', login_url="/kullanici/giris/") -def edit_topic(request, forum_slug, topic_id): +def edit_topic(request, forum_slug, topic_slug): forum = get_object_or_404(Forum, slug=forum_slug) - topic = get_object_or_404(Topic, pk=topic_id) + topic = get_object_or_404(Topic, slug=topic_slug) first_post = topic.post_set.order_by('created')[0] if request.user.has_perm("forum.can_change_abusereport"): @@ -500,9 +503,9 @@ return render_response(request, 'forum/new_topic.html', locals()) @permission_required('forum.can_merge_topic', login_url="/kullanici/giris/") -def merge(request, forum_slug, topic_id): +def merge(request, forum_slug, topic_slug): forum = get_object_or_404(Forum, slug=forum_slug) - topic = get_object_or_404(Topic, pk=topic_id) + topic = get_object_or_404(Topic, slug=topic_slug) if forum.locked or topic.locked: hata="Kilitli konularda bu t?r i?lemler yap?lamaz!" @@ -553,9 +556,9 @@ return render_response(request, 'forum/merge.html', locals()) @permission_required('forum.can_move_topic', login_url="/kullanici/giris/") -def move(request, forum_slug, topic_id): +def move(request, forum_slug, topic_slug): forum = get_object_or_404(Forum, slug=forum_slug) - topic = get_object_or_404(Topic, pk=topic_id) + topic = get_object_or_404(Topic, slug=topic_slug) if forum.locked or topic.locked: hata="Kilitli konularda bu t?r i?lemler yap?lamaz!" @@ -616,8 +619,8 @@ return render_response(request, 'forum/move.html', locals()) @permission_required('forum.can_hide_post', login_url="/kullanici/giris/") -def hide(request, forum_slug, topic_id, post_id=False): - topic = get_object_or_404(Topic, pk=topic_id) +def hide(request, forum_slug, topic_slug, post_id=False): + topic = get_object_or_404(Topic, slug=topic_slug) if post_id: post = get_object_or_404(Post, pk=post_id) @@ -650,8 +653,8 @@ return HttpResponseRedirect(topic.forum.get_absolute_url()) @permission_required('forum.can_stick_topic', login_url="/kullanici/giris/") -def stick(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def stick(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) if topic.sticky: topic.sticky = 0 @@ -665,8 +668,8 @@ return HttpResponseRedirect(topic.forum.get_absolute_url()) @permission_required('forum.can_lock_topic', login_url="/kullanici/giris/") -def lock(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def lock(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) if topic.locked: topic.locked = 0 @@ -702,10 +705,10 @@ request.session["read_forum_dict"] = {} @login_required -def delete_post(request,forum_slug,topic_id, post_id): +def delete_post(request,forum_slug,topic_slug, post_id): """ The delete part should be controlled better !""" forum = get_object_or_404(Forum, slug=forum_slug) - topic = get_object_or_404(Topic, pk=topic_id) + topic = get_object_or_404(Topic, slug=topic_slug) post = get_object_or_404(Post, pk=post_id) if not request.user.has_perm('forum.delete_post'): @@ -786,8 +789,8 @@ return render_response(request, 'forum/abuse_list.html', {'abuse_list': abuse_list, "abuse_count":abuse_count}) @permission_required('forum.can_create_poll', login_url="/kullanici/giris/") -def create_poll(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def create_poll(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) forum = topic.forum if forum.slug != forum_slug: return HttpResponseRedirect(topic.get_create_poll_url()) @@ -833,8 +836,8 @@ return render_response(request, "forum/create_poll.html", locals()) @permission_required("forum.can_change_poll", login_url="/kullanici/giris/") -def change_poll(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def change_poll(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) forum = topic.forum if forum.slug != forum_slug: return HttpResponseRedirect(topic.get_change_poll_url()) @@ -910,8 +913,8 @@ return render_response(request, "forum/change_poll.html", locals()) @login_required -def vote_poll(request,forum_slug,topic_id,option_id): - topic = get_object_or_404(Topic, pk=topic_id) +def vote_poll(request,forum_slug,topic_slug,option_id): + topic = get_object_or_404(Topic, slug=topic_slug) option = get_object_or_404(PollOption, pk=option_id) forum = topic.forum if forum.slug != forum_slug: @@ -987,8 +990,8 @@ return HttpResponseRedirect(topic.get_absolute_url()) @permission_required("forum.can_change_poll", login_url="/kullanici/giris/") -def delete_poll(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def delete_poll(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) forum = topic.forum if forum.slug != forum_slug: return HttpResponseRedirect(topic.get_absolute_url()) @@ -1009,8 +1012,8 @@ return HttpResponseRedirect(topic.get_absolute_url()) @permission_required("forum.can_change_general", login_url="/kullanici/giris/") -def toggle_general_topic(request, forum_slug, topic_id): - topic = get_object_or_404(Topic, pk=topic_id) +def toggle_general_topic(request, forum_slug, topic_slug): + topic = get_object_or_404(Topic, slug=topic_slug) forum = topic.forum if forum.slug != forum_slug: return HttpResponseRedirect(topic.get_absolute_url()) From akin at omeroglu.net Mon Sep 21 00:41:28 2009 From: akin at omeroglu.net (=?ISO-8859-9?Q?Ak=FDn_=D6mero=F0lu?=) Date: Mon, 21 Sep 2009 00:41:28 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> Message-ID: <9652916c0909201441y55ad4adamae56ce89b4229df8@mail.gmail.com> 2009/9/21 Ahmet Ayg?n > Author: ahmet > Date: Mon Sep 21 00:36:03 2009 > New Revision: 2826 > > Modified: > trunk/forum/admin.py > trunk/forum/models.py > trunk/forum/urls.py > trunk/forum/views.py > Log: > Change url structure from /forum/topic.id/ to /forum/topic.slug/ > > This is more SEF than older one. > > ATTENTION PLEASE! > ----------------- > This change needs strong testing. > > U?ur Selam, En g?ncel veritaban?yla bu de?i?ikli?i SOAP'ta yay?na al?r m?s?n? Kusana kadar test etmemiz laz?m bunu =) -------------- sonraki b?l?m -------------- Bir HTML eklentisi temizlendi... URL: From oi-svn at pardus.org.tr Mon Sep 21 00:58:58 2009 From: oi-svn at pardus.org.tr (=?utf-8?q?Ahmet_Ayg=C3=BCn?=) Date: Mon, 21 Sep 2009 00:58:58 +0300 (EEST) Subject: [Oi-commits] trunk - New jobs.. Message-ID: <20090920215858.EF8EA49C8E4@ns1.pardus.org.tr> Author: ahmet Date: Mon Sep 21 00:58:58 2009 New Revision: 2827 Modified: trunk/TODO Log: New jobs.. Thanks Batuhan ???z for notification ;) --- TODO | 3 +++ 1 file changed, 3 insertions(+) Modified: trunk/TODO ================================================================= --- trunk/TODO (original) +++ trunk/TODO Mon Sep 21 00:58:58 2009 @@ -58,3 +58,6 @@ - User/IP Ban - Migration - Multi language + + +* fill alt info for all images on ui From me at ahmetaygun.net Mon Sep 21 00:47:53 2009 From: me at ahmetaygun.net (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Mon, 21 Sep 2009 00:47:53 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <9652916c0909201441y55ad4adamae56ce89b4229df8@mail.gmail.com> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> <9652916c0909201441y55ad4adamae56ce89b4229df8@mail.gmail.com> Message-ID: <200909210047.55180.me@ahmetaygun.net> Ak?n ?mero?lu, Monday 21 September 2009 00:41:28 tarihinde yazd?: > En g?ncel veritaban?yla bu de?i?ikli?i SOAP'ta yay?na al?r m?s?n? Kusana > kadar test etmemiz laz?m bunu =) Neler ?ekti?imi anlayacaks?n?z, nihaha :D From ugur.jnmbk at gmail.com Mon Sep 21 10:21:58 2009 From: ugur.jnmbk at gmail.com (=?UTF-8?B?VcSfdXIgw4dldGlu?=) Date: Mon, 21 Sep 2009 10:21:58 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <200909210047.55180.me@ahmetaygun.net> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> <9652916c0909201441y55ad4adamae56ce89b4229df8@mail.gmail.com> <200909210047.55180.me@ahmetaygun.net> Message-ID: <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> 21 Eyl?l 2009 00:47 tarihinde Ahmet AYG?N yazd?: > Ak?n ?mero?lu, Monday 21 September 2009 00:41:28 tarihinde yazd?: >> En g?ncel veritaban?yla bu de?i?ikli?i SOAP'ta yay?na al?r m?s?n? Kusana >> kadar test etmemiz laz?m bunu =) > Neler ?ekti?imi anlayacaks?n?z, nihaha :D Slug'? ve forumu ayn? olan iki ba?l?k olmas? durumunda ne olacak anlayamad?m :P -- U?ur ?etin From akin at omeroglu.net Mon Sep 21 11:55:52 2009 From: akin at omeroglu.net (=?utf-8?Q?Ak=C4=B1n_=C3=96mero=C4=9Flu?=) Date: Mon, 21 Sep 2009 11:55:52 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> <9652916c0909201441y55ad4adamae56ce89b4229df8@mail.gmail.com> <200909210047.55180.me@ahmetaygun.net> <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> Message-ID: <0077AD65-F598-44C6-AE44-193893C45D55@omeroglu.net> Slugdan sonra id koysak? -- Ak?n ?mero?lu On 21.Eyl.2009, at 10:21, U?ur ?etin wrote: > 21 Eyl?l 2009 00:47 tarihinde Ahmet AYG?N yazd > ?: >> Ak?n ?mero?lu, Monday 21 September 2009 00:41:28 tarihinde yazd?: >>> En g?ncel veritaban?yla bu de?i?ikli?i SOAP'ta yay?na al?r >>> m?s?n? Kusana >>> kadar test etmemiz laz?m bunu =) >> Neler ?ekti?imi anlayacaks?n?z, nihaha :D > > Slug'? ve forumu ayn? olan iki ba?l?k olmas? durumunda ne olacak > anlayamad?m :P > > -- > U?ur ?etin > _______________________________________________ > Oi-commits mailing list > Oi-commits at pardus.org.tr > http://liste.pardus.org.tr/mailman/listinfo/oi-commits From me at ahmetaygun.net Mon Sep 21 14:03:46 2009 From: me at ahmetaygun.net (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Mon, 21 Sep 2009 14:03:46 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <0077AD65-F598-44C6-AE44-193893C45D55@omeroglu.net> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> <0077AD65-F598-44C6-AE44-193893C45D55@omeroglu.net> Message-ID: <200909211403.47347.me@ahmetaygun.net> Ak?n ?mero?lu, Monday 21 September 2009 11:55:52 tarihinde yazd?: > Slugdan sonra id koysak? N?t, ? ?h. From me at ahmetaygun.net Mon Sep 21 14:04:40 2009 From: me at ahmetaygun.net (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Mon, 21 Sep 2009 14:04:40 +0300 Subject: [Oi-commits] trunk/forum - Change url structure from /forum/topic.id/ to /for... In-Reply-To: <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> References: <20090920213603.AC52649C8E4@ns1.pardus.org.tr> <200909210047.55180.me@ahmetaygun.net> <9dca79e40909210021u669948ar3fe4a5924dfabd4c@mail.gmail.com> Message-ID: <200909211404.41320.me@ahmetaygun.net> U?ur ?etin, Monday 21 September 2009 10:21:58 tarihinde yazd?: > Slug'? ve forumu ayn? olan iki ba?l?k olmas? durumunda ne olacak > anlayamad?m :P Madonna'dan 4 Minutes dinlemeye ba?lay?n siz d?nece?im ben ;) From oi-svn at pardus.org.tr Thu Sep 24 14:14:44 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 14:14:44 +0300 (EEST) Subject: [Oi-commits] trunk/tema - add origin url Message-ID: <20090924111444.4283049C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 14:14:43 2009 New Revision: 2828 Modified: trunk/tema/models.py Log: add origin url ALTER TABLE `tema_themeitem` ADD `origin_url` VARCHAR( 200 ) NOT NULL ; --- models.py | 1 + 1 file changed, 1 insertion(+) Modified: trunk/tema/models.py ================================================================= --- trunk/tema/models.py (original) +++ trunk/tema/models.py Thu Sep 24 14:14:43 2009 @@ -71,6 +71,7 @@ thumbnail = models.ImageField("K???k Resim", blank=True, upload_to="upload/tema/kucuk/") status = models.BooleanField(default=False, verbose_name="Kabul Edilmi?") topic = models.ForeignKey(Topic, verbose_name="Forumdaki Konusu") + origin_url = models.URLField("?zg?n ?al??ma", blank=True, help_text="Ba?ka bir ?al??may? temel ald?ysan?z bunun ba?lant?s?n? yaz?n.") def __unicode__(self): return self.title From oi-svn at pardus.org.tr Thu Sep 24 14:40:33 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 14:40:33 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - links to origin url Message-ID: <20090924114033.71CE249C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 14:40:33 2009 New Revision: 2829 Modified: trunk/templates/tema/forum_wallpaper.html trunk/templates/tema/themeitem_wallpaper_detail.html Log: links to origin url --- forum_wallpaper.html | 1 + themeitem_wallpaper_detail.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) Modified: trunk/templates/tema/forum_wallpaper.html ================================================================= --- trunk/templates/tema/forum_wallpaper.html (original) +++ trunk/templates/tema/forum_wallpaper.html Thu Sep 24 14:40:33 2009 @@ -1,3 +1,4 @@

ekran g?r?nt?s?

{{ object.text|linebreaksbr }}

Tema sayfas?na ba?lant?

+{% if object.origin_url %}

?zg?n ?al??maya ba?lant?

{% endif %} Modified: trunk/templates/tema/themeitem_wallpaper_detail.html ================================================================= --- trunk/templates/tema/themeitem_wallpaper_detail.html (original) +++ trunk/templates/tema/themeitem_wallpaper_detail.html Thu Sep 24 14:40:33 2009 @@ -49,7 +49,8 @@
{{ object.get_rating_percent }}/10 ({{ object.vote_set.count }} oy)
Lisans: {{ object.license.name }}
G?nderildi?i Tarih: {{ object.submit|date:"d F Y" }}
- ?ndirilme Say?s?: {{ object.download_count }}

+ ?ndirilme Say?s?: {{ object.download_count }}
+ {% if object.origin_url %}?zg?n ?al??ma

{% endif %}

{{ object.text }} From oi-svn at pardus.org.tr Thu Sep 24 14:45:36 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 14:45:36 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - don't drop line break Message-ID: <20090924114536.6EBFE49C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 14:45:36 2009 New Revision: 2830 Modified: trunk/templates/tema/themeitem_wallpaper_detail.html Log: don't drop line break --- themeitem_wallpaper_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/templates/tema/themeitem_wallpaper_detail.html ================================================================= --- trunk/templates/tema/themeitem_wallpaper_detail.html (original) +++ trunk/templates/tema/themeitem_wallpaper_detail.html Thu Sep 24 14:45:36 2009 @@ -50,7 +50,7 @@ Lisans: {{ object.license.name }}
G?nderildi?i Tarih: {{ object.submit|date:"d F Y" }}
?ndirilme Say?s?: {{ object.download_count }}
- {% if object.origin_url %}?zg?n ?al??ma

{% endif %} + {% if object.origin_url %}?zg?n ?al??ma
{% endif %}


{{ object.text }} From oi-svn at pardus.org.tr Thu Sep 24 15:00:14 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 15:00:14 +0300 (EEST) Subject: [Oi-commits] trunk/profile - missing content url commit Message-ID: <20090924120014.81EB649C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 15:00:14 2009 New Revision: 2831 Modified: trunk/profile/models.py Log: missing content url commit --- models.py | 3 +++ 1 file changed, 3 insertions(+) Modified: trunk/profile/models.py ================================================================= --- trunk/profile/models.py (original) +++ trunk/profile/models.py Thu Sep 24 15:00:14 2009 @@ -102,3 +102,6 @@ def get_absolute_url(self): return '/kullanici/profil/%s/' % self.user.username + + def get_theme_content_url(self): + return "/tema/kullanici/%s/" % self.user.username From oi-svn at pardus.org.tr Thu Sep 24 15:11:35 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 15:11:35 +0300 (EEST) Subject: [Oi-commits] trunk/media/css/new - force image height to 60px for fallback images Message-ID: <20090924121135.C195149C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 15:11:35 2009 New Revision: 2832 Modified: trunk/media/css/new/tema.css Log: force image height to 60px for fallback images --- tema.css | 4 ++++ 1 file changed, 4 insertions(+) Modified: trunk/media/css/new/tema.css ================================================================= --- trunk/media/css/new/tema.css (original) +++ trunk/media/css/new/tema.css Thu Sep 24 15:11:35 2009 @@ -36,6 +36,10 @@ margin-right: 5px; } +.themeitem_top_user img { + height: 60px; +} + .themeitem_top_user_content { height: 12px; width: 137px; From oi-svn at pardus.org.tr Thu Sep 24 18:12:41 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 18:12:41 +0300 (EEST) Subject: [Oi-commits] trunk - desktopscreenshots Message-ID: <20090924151241.D962349C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 18:12:41 2009 New Revision: 2833 Added: trunk/templates/tema/themeitem_add_desktopscreenshot.html - copied unchanged from r2822, trunk/templates/tema/themeitem_add_wallpaper.html trunk/templates/tema/themeitem_desktopscreenshot_detail.html - copied, changed from r2830, trunk/templates/tema/themeitem_wallpaper_detail.html Modified: trunk/tema/forms.py trunk/tema/models.py trunk/tema/urls.py trunk/tema/views.py Log: desktopscreenshots --- tema/forms.py | 13 ++ tema/models.py | 23 ++++- tema/urls.py | 1 tema/views.py | 75 +++++++++-------- templates/tema/themeitem_add_desktopscreenshot.html | 24 +++++ templates/tema/themeitem_desktopscreenshot_detail.html | 73 ++++++++++++++++ 6 files changed, 176 insertions(+), 33 deletions(-) Modified: trunk/tema/forms.py ================================================================= --- trunk/tema/forms.py (original) +++ trunk/tema/forms.py Thu Sep 24 18:12:41 2009 @@ -46,6 +46,19 @@ class ThemeTypeForm(forms.Form): category = forms.ChoiceField(label="Kategori", choices=CATEGORIES, help_text="Ekleyece?iniz i?erik i?in bir kategori se?in") +class DesktopScreenShotForm(forms.ModelForm): + confirmation = forms.BooleanField(label="Onay", required=True, help_text="Bu ekran g?r?nt?s?n? da??tma hakk?na sahibim.") + + class Meta: + model = DesktopScreenshot + exclude = ("author", "rating", "category", "thumbnail", "download_count", "submit", "update", "status", "scalable", "papers", "changelog", "slug", "topic", "version") + + def clean_tags(self): + field_data = self.cleaned_data['tags'] + if len(field_data) > 5: + raise forms.ValidationError("En fazla 5 etiket se?ebilirsiniz. L?tfen a?t???n?z ba?l??a uygun etiket se?iniz.") + return field_data + class WallpaperForm(forms.ModelForm): confirmation = forms.BooleanField(label="Onay", required=True, help_text="Bu duvar ka??d?n? da??tma hakk?na sahibim.") Modified: trunk/tema/models.py ================================================================= --- trunk/tema/models.py (original) +++ trunk/tema/models.py Thu Sep 24 18:12:41 2009 @@ -89,7 +89,10 @@ # we only support wallpaper for now, so return wallpaper url. # Later, fix this def get_absolute_url(self): - return "/tema/duvar-kagitlari/%s/" % self.slug + if Wallpaper.objects.filter(id = self.id).count(): + return "/tema/duvar-kagitlari/%s/" % self.slug + elif DesktopScreenshot.objects.filter(id = self.id).count(): + return "/tema/ekran-goruntuleri/%s/" % self.slug class Meta: verbose_name="Sanat Birimi" @@ -128,6 +131,24 @@ ("manage_queue", "Can Manage Tema Queue"), ) +class DesktopScreenshot(ThemeItem): + image = models.ImageField(upload_to="upload/tema/duvar-kagidi/", verbose_name="Ekran G?r?nt?s?") + + class Meta: + verbose_name="Ekran G?r?nt?s?" + verbose_name_plural="Ekran G?r?nt?leri" + + def get_absolute_url(self): + return "/tema/ekran-goruntuleri/%s/" % (self.slug) + + + def get_redirect_url(self): + return "/tema/ekran-goruntuleri/%s/%s/" % (self.slug, self.id) + + def get_download_url(self): + return self.image.url + + class Wallpaper(ThemeItem): papers = models.ManyToManyField("WallpaperFile", blank=True) Modified: trunk/tema/urls.py ================================================================= --- trunk/tema/urls.py (original) +++ trunk/tema/urls.py Thu Sep 24 18:12:41 2009 @@ -28,6 +28,7 @@ (r'^sil/(?P\d+)/$', 'themeitem_delete'), (r'^raporlanmis-temalar/$', 'list_abuse'), (r'^ekle/duvar-kagitlari/$','themeitem_add_wallpaper'), + (r'^ekle/ekran-goruntuleri/$','themeitem_add_desktopscreenshot'), (r'^khotnewstuff/wallpaper-providers.xml$', 'ghns_wallpapers'), (r'^khotnewstuff/wallpaper/wallpaper.xml$', 'ghns_wallpaper'), (r'^khotnewstuff/wallpaper/wallpaper-score.xml$', 'ghns_wallpaper_score'), Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Thu Sep 24 18:12:41 2009 @@ -56,53 +56,27 @@ def themeitem_list(request, category=None): "List approved theme items" - #this category is fixed for now - category = "duvar-kagitlari" - #first we take approved items themeItems = ThemeItem.objects.all() if category == "duvar-kagitlari": themeItems = Wallpaper.objects.all() + elif category == "ekran-goruntuleri": + themeItems = DesktopScreenshot.objects.all() + else: + themeItems = ThemeItem.objects.all() + themeItems = themeItems.filter(status=True).order_by("-update") - """ - #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 = { "queryset": themeItems, "paginate_by": THEME_ITEM_PER_PAGE, "template_name": "tema/themeitem_list.html", } - """ - "extra_context": { - "order_by": order_by, - "parentcategory": parentcategory, - }, - """ return object_list(request, **params) def themeitem_detail(request, category, slug): #get category specific things category_dict = { "duvar-kagitlari": (Wallpaper, "tema/themeitem_wallpaper_detail.html"), + "ekran-goruntuleri": (DesktopScreenshot, "tema/themeitem_desktopscreenshot_detail.html"), } object_type = ThemeItem template_name = "tema/themeitem_detail.html" @@ -207,6 +181,39 @@ return render_response(request, "tema/themeitem_add.html", locals()) @login_required +def themeitem_add_desktopscreenshot(request): + if request.method == "POST": + form = DesktopScreenShotForm(request.POST.copy(), request.FILES) + flood, timeout = flood_control(request) + + if form.is_valid() and not flood: + item = form.save(commit=False) + item.author = request.user + item.submit = item.update = datetime.datetime.now() + slug = slugify(replace_turkish(item.title)) + item.save() + for tag in form.cleaned_data["tags"]: + t=Tag.objects.get(name=tag) + item.tags.add(t) + item.slug = str(item.id) + "-" + slug + item.save() + + #create thumbnail + thumbnail = Image.open(item.image.path) + thumbnail.thumbnail((150,200), Image.ANTIALIAS) + file = ContentFile("") + item.thumbnail.save(item.image.path, file, save=True) + thumbnail.save(item.thumbnail.path) + + #TODO: Send e-mail to admins + return render_response(request, "tema/themeitem_add_complete.html", locals()) + else: + tags = [t.pk for t in Tag.objects.filter(name="masa?st?")] + form = DesktopScreenShotForm(initial={"tags":tags}) + return render_response(request, "tema/themeitem_add_desktopscreenshot.html", locals()) + + + at login_required def themeitem_add_wallpaper(request): #TODO: add SVG support WallpaperFileFormSet = formset_factory(WallpaperFileForm) @@ -312,6 +319,10 @@ wallpaper = object.wallpaper_set.all()[0] wallpaper.download_count += 1 wallpaper.save() + elif category == "ekran-goruntuleri": + object = get_object_or_404(DesktopScreenshot, id=id) + object.download_count += 1 + object.save() else: raise Http404 return render_response(request, "tema/themeitem_download.html", locals()) Copied: trunk/templates/tema/themeitem_desktopscreenshot_detail.html (from r2830, trunk/templates/tema/themeitem_wallpaper_detail.html) ================================================================= --- trunk/templates/tema/themeitem_wallpaper_detail.html (original) +++ trunk/templates/tema/themeitem_desktopscreenshot_detail.html Thu Sep 24 18:12:41 2009 @@ -31,10 +31,7 @@
{{ object.title }}
- {% for paper in object.papers.all %} - {{ paper.title }}
- {% endfor %} - + B?y?k Resim
{% if button_change %}
De?i?tir
{% endif %} {% if perms.tema.delete_themeitem %}
Sil
{% endif %} From oi-svn at pardus.org.tr Thu Sep 24 18:14:47 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 18:14:47 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - links for new feature Message-ID: <20090924151447.4729349C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 18:14:47 2009 New Revision: 2834 Modified: trunk/templates/tema/base.html Log: links for new feature --- base.html | 2 ++ 1 file changed, 2 insertions(+) Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Thu Sep 24 18:14:47 2009 @@ -11,11 +11,13 @@ From oi-svn at pardus.org.tr Thu Sep 24 18:16:41 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Thu, 24 Sep 2009 18:16:41 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - links to new feature Message-ID: <20090924151641.479B449C8FA@ns1.pardus.org.tr> Author: jnmbk Date: Thu Sep 24 18:16:41 2009 New Revision: 2835 Modified: trunk/templates/tema/base.html Log: links to new feature --- base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Thu Sep 24 18:16:41 2009 @@ -11,13 +11,13 @@ From oi-svn at pardus.org.tr Fri Sep 25 12:38:15 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 12:38:15 +0300 (EEST) Subject: [Oi-commits] trunk/templates/seminar - respect linebreaks in seminar detail Message-ID: <20090925093815.E59AE49C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 12:38:15 2009 New Revision: 2836 Modified: trunk/templates/seminar/seminar_detail.html Log: respect linebreaks in seminar detail --- seminar_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/templates/seminar/seminar_detail.html ================================================================= --- trunk/templates/seminar/seminar_detail.html (original) +++ trunk/templates/seminar/seminar_detail.html Fri Sep 25 12:38:15 2009 @@ -35,7 +35,7 @@ - {% if object.place.description %}
{{ object.place.description }}{% if object.place.phone %} - TEL: {{ object.place.phone }}{% endif %}
{% endif %} + {% if object.place.description %}
{{ object.place.description|linebreaksbr }}{% if object.place.phone %} - TEL: {{ object.place.phone }}{% endif %}
{% endif %}
From oi-svn at pardus.org.tr Fri Sep 25 13:41:37 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 13:41:37 +0300 (EEST) Subject: [Oi-commits] trunk/tema - screenshot admin and content add page Message-ID: <20090925104137.CAA0D49C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 13:41:37 2009 New Revision: 2837 Modified: trunk/tema/admin.py trunk/tema/urls.py Log: screenshot admin and content add page --- admin.py | 12 ++++++++++++ urls.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) Modified: trunk/tema/admin.py ================================================================= --- trunk/tema/admin.py (original) +++ trunk/tema/admin.py Fri Sep 25 13:41:37 2009 @@ -40,7 +40,19 @@ }) ) +class DesktopScreenshotAdmin(ThemeItemAdmin): + fieldsets = ( + (None, { + "fields": ("thumbnail", "title", "slug", "text", "changelog", "image", "status", "tags") + }), + ("Di?er", { + "classes": "collapse", + "fields": ("author", "license", "rating", "download_count", "submit", "update", "comment_enabled") + }) + ) + admin.site.register(ThemeItem, ThemeItemAdmin) admin.site.register(Wallpaper, WallpaperAdmin) +admin.site.register(DesktopScreenshot, DesktopScreenshotAdmin) admin.site.register(WallpaperFile, admin.ModelAdmin) admin.site.register(License, admin.ModelAdmin) Modified: trunk/tema/urls.py ================================================================= --- trunk/tema/urls.py (original) +++ trunk/tema/urls.py Fri Sep 25 13:41:37 2009 @@ -22,7 +22,7 @@ #(r'^duzenle/(?P[0-9]+)/$','themeitem_change'), (r'^kullanici/(?P.+)/$','list_user'), #(r'^oyla/(?P[0-9]+)/(?P[0-4])/$','vote'), - #(r'^ekle/$','themeitem_add'), + (r'^ekle/$','themeitem_add'), (r'^raporla/(?P\d+)/$', 'report_abuse'), (r'^oyla/(?P\d+)/$', 'themeitem_rate'), (r'^sil/(?P\d+)/$', 'themeitem_delete'), From oi-svn at pardus.org.tr Fri Sep 25 15:37:58 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 15:37:58 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - better links Message-ID: <20090925123758.F05FD49C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 15:37:58 2009 New Revision: 2838 Modified: trunk/templates/tema/base.html Log: better links --- base.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Fri Sep 25 15:37:58 2009 @@ -10,14 +10,17 @@
{% top_content %}
From oi-svn at pardus.org.tr Fri Sep 25 17:06:30 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 17:06:30 +0300 (EEST) Subject: [Oi-commits] trunk/tema - show all content not just wallpaper Message-ID: <20090925140630.71A7C49C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 17:06:29 2009 New Revision: 2839 Modified: trunk/tema/views.py Log: show all content not just wallpaper --- views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Fri Sep 25 17:06:29 2009 @@ -95,7 +95,7 @@ def list_user(request, username): "Theme items of a user" user = get_object_or_404(User, username=username) - themeItems = Wallpaper.objects.filter(status=True, author=user) + themeItems = ThemeItem.objects.filter(status=True, author=user) params={ 'queryset': themeItems, From oi-svn at pardus.org.tr Fri Sep 25 17:31:17 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 17:31:17 +0300 (EEST) Subject: [Oi-commits] trunk/templates/tema - download->view Message-ID: <20090925143117.C3DC849C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 17:31:17 2009 New Revision: 2840 Modified: trunk/templates/tema/themeitem_desktopscreenshot_detail.html Log: download->view --- themeitem_desktopscreenshot_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/templates/tema/themeitem_desktopscreenshot_detail.html ================================================================= --- trunk/templates/tema/themeitem_desktopscreenshot_detail.html (original) +++ trunk/templates/tema/themeitem_desktopscreenshot_detail.html Fri Sep 25 17:31:17 2009 @@ -46,7 +46,7 @@
{{ object.get_rating_percent }}/10 ({{ object.vote_set.count }} oy)
Lisans: {{ object.license.name }}
G?nderildi?i Tarih: {{ object.submit|date:"d F Y" }}
- ?ndirilme Say?s?: {{ object.download_count }}
+ G?sterim Say?s?: {{ object.download_count }}
{% if object.origin_url %}?zg?n ?al??ma
{% endif %}


From oi-svn at pardus.org.tr Fri Sep 25 17:54:20 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 17:54:20 +0300 (EEST) Subject: [Oi-commits] trunk - sidebar adjustments Message-ID: <20090925145420.4E00649C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 17:54:20 2009 New Revision: 2841 Modified: trunk/tema/templatetags/tema.py trunk/tema/views.py trunk/templates/tema/base.html trunk/templates/tema/sidebar.html Log: sidebar adjustments --- tema/templatetags/tema.py | 17 +++++++++++++---- tema/views.py | 3 ++- templates/tema/base.html | 2 +- templates/tema/sidebar.html | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) Modified: trunk/tema/templatetags/tema.py ================================================================= --- trunk/tema/templatetags/tema.py (original) +++ trunk/tema/templatetags/tema.py Fri Sep 25 17:54:20 2009 @@ -7,7 +7,7 @@ from django import template from django.template import Context, loader -from oi.tema.models import ThemeItem, ThemeAbuseReport +from oi.tema.models import ThemeItem, ThemeAbuseReport, DesktopScreenshot, Wallpaper register = template.Library() @@ -16,6 +16,15 @@ return ThemeAbuseReport.objects.count() @register.simple_tag -def top_content(): - object_list = ThemeItem.objects.filter(status=True).order_by("-rating", "-update")[:10] - return loader.get_template("tema/sidebar.html").render(Context({"object_list":object_list})) +def top_content(category=None): + if category == "duvar-kagitlari": + object_list = Wallpaper.objects.all() + title = "En Be?enilen Duvar Ka??tlar?" + elif category == "ekran-goruntuleri": + object_list = DesktopScreenshot.objects.all() + title = "En Be?enilen Masa?stleri" + else: + object_list = ThemeItem.objects.all() + title = "En ?ok Be?enilenler" + object_list = object_list.filter(status=True).order_by("-rating", "-update")[:10] + return loader.get_template("tema/sidebar.html").render(Context({"object_list":object_list,"title":title})) Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Fri Sep 25 17:54:20 2009 @@ -69,6 +69,7 @@ "queryset": themeItems, "paginate_by": THEME_ITEM_PER_PAGE, "template_name": "tema/themeitem_list.html", + "extra_context": {"category":category}, } return object_list(request, **params) @@ -101,7 +102,7 @@ 'queryset': themeItems, 'paginate_by': THEME_ITEM_PER_PAGE, "template_name": "tema/themeitem_list.html", - "extra_context": {"author":user}, + "extra_context": {"author":user,"category":None}, } return object_list(request, **params) Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Fri Sep 25 17:54:20 2009 @@ -22,7 +22,7 @@
  • Masa?st? G?r?nt?s?
  • - {% top_content %} + {% top_content category %}
    {% endblock %} Modified: trunk/templates/tema/sidebar.html ================================================================= --- trunk/templates/tema/sidebar.html (original) +++ trunk/templates/tema/sidebar.html Fri Sep 25 17:54:20 2009 @@ -1,5 +1,5 @@
    -

    En ?ok Be?enilenler

    +

    {{ title }}

      {% for object in object_list %}
    • ({{object.get_rating_percent}}) {{ object.title }}
    • From oi-svn at pardus.org.tr Fri Sep 25 18:43:11 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 18:43:11 +0300 (EEST) Subject: trunk - ekran>masaüstü Message-ID: <20090925154311.AD96F49C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 18:43:11 2009 New Revision: 2842 Modified: trunk/tema/templatetags/tema.py trunk/tema/urls.py trunk/tema/views.py trunk/templates/tema/base.html Log: ekran>masa?st? --- tema/templatetags/tema.py | 2 +- tema/urls.py | 2 +- tema/views.py | 6 +++--- templates/tema/base.html | 8 ++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) Modified: trunk/tema/templatetags/tema.py ================================================================= --- trunk/tema/templatetags/tema.py (original) +++ trunk/tema/templatetags/tema.py Fri Sep 25 18:43:11 2009 @@ -20,7 +20,7 @@ if category == "duvar-kagitlari": object_list = Wallpaper.objects.all() title = "En Be?enilen Duvar Ka??tlar?" - elif category == "ekran-goruntuleri": + elif category == "masaustu-goruntuleri": object_list = DesktopScreenshot.objects.all() title = "En Be?enilen Masa?stleri" else: Modified: trunk/tema/urls.py ================================================================= --- trunk/tema/urls.py (original) +++ trunk/tema/urls.py Fri Sep 25 18:43:11 2009 @@ -28,7 +28,7 @@ (r'^sil/(?P\d+)/$', 'themeitem_delete'), (r'^raporlanmis-temalar/$', 'list_abuse'), (r'^ekle/duvar-kagitlari/$','themeitem_add_wallpaper'), - (r'^ekle/ekran-goruntuleri/$','themeitem_add_desktopscreenshot'), + (r'^ekle/masaustu-goruntuleri/$','themeitem_add_desktopscreenshot'), (r'^khotnewstuff/wallpaper-providers.xml$', 'ghns_wallpapers'), (r'^khotnewstuff/wallpaper/wallpaper.xml$', 'ghns_wallpaper'), (r'^khotnewstuff/wallpaper/wallpaper-score.xml$', 'ghns_wallpaper_score'), Modified: trunk/tema/views.py ================================================================= --- trunk/tema/views.py (original) +++ trunk/tema/views.py Fri Sep 25 18:43:11 2009 @@ -59,7 +59,7 @@ themeItems = ThemeItem.objects.all() if category == "duvar-kagitlari": themeItems = Wallpaper.objects.all() - elif category == "ekran-goruntuleri": + elif category == "masaustu-goruntuleri": themeItems = DesktopScreenshot.objects.all() else: themeItems = ThemeItem.objects.all() @@ -77,7 +77,7 @@ #get category specific things category_dict = { "duvar-kagitlari": (Wallpaper, "tema/themeitem_wallpaper_detail.html"), - "ekran-goruntuleri": (DesktopScreenshot, "tema/themeitem_desktopscreenshot_detail.html"), + "masaustu-goruntuleri": (DesktopScreenshot, "tema/themeitem_desktopscreenshot_detail.html"), } object_type = ThemeItem template_name = "tema/themeitem_detail.html" @@ -320,7 +320,7 @@ wallpaper = object.wallpaper_set.all()[0] wallpaper.download_count += 1 wallpaper.save() - elif category == "ekran-goruntuleri": + elif category == "masaustu-goruntuleri": object = get_object_or_404(DesktopScreenshot, id=id) object.download_count += 1 object.save() Modified: trunk/templates/tema/base.html ================================================================= --- trunk/templates/tema/base.html (original) +++ trunk/templates/tema/base.html Fri Sep 25 18:43:11 2009 @@ -12,17 +12,21 @@ + {% if category %} {% top_content category %} + {% else %} + {% top_content %} + {% endif %}
    {% endblock %} From oi-svn at pardus.org.tr Fri Sep 25 18:49:13 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Fri, 25 Sep 2009 18:49:13 +0300 (EEST) Subject: [Oi-commits] trunk/tema - fix urls Message-ID: <20090925154913.47A8649C8D6@ns1.pardus.org.tr> Author: jnmbk Date: Fri Sep 25 18:49:13 2009 New Revision: 2843 Modified: trunk/tema/models.py Log: fix urls --- models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Modified: trunk/tema/models.py ================================================================= --- trunk/tema/models.py (original) +++ trunk/tema/models.py Fri Sep 25 18:49:13 2009 @@ -18,7 +18,7 @@ CATEGORIES = ( ("duvar-kagitlari", "Duvar Ka??tlar?"), - ("ekran-goruntuleri", "Ekran G?r?nt?leri"), + ("masaustu-goruntuleri", "Ekran G?r?nt?leri"), ) class WallPaperSize: @@ -92,7 +92,7 @@ if Wallpaper.objects.filter(id = self.id).count(): return "/tema/duvar-kagitlari/%s/" % self.slug elif DesktopScreenshot.objects.filter(id = self.id).count(): - return "/tema/ekran-goruntuleri/%s/" % self.slug + return "/tema/masaustu-goruntuleri/%s/" % self.slug class Meta: verbose_name="Sanat Birimi" @@ -139,11 +139,11 @@ verbose_name_plural="Ekran G?r?nt?leri" def get_absolute_url(self): - return "/tema/ekran-goruntuleri/%s/" % (self.slug) + return "/tema/masaustu-goruntuleri/%s/" % (self.slug) def get_redirect_url(self): - return "/tema/ekran-goruntuleri/%s/%s/" % (self.slug, self.id) + return "/tema/masaustu-goruntuleri/%s/%s/" % (self.slug, self.id) def get_download_url(self): return self.image.url From oi-svn at pardus.org.tr Sat Sep 26 11:47:32 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 11:47:32 +0300 (EEST) Subject: [Oi-commits] branches/forumslug - create forumslug branch for slug things Message-ID: <20090926084732.B1D9249C8D5@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 11:47:32 2009 New Revision: 2844 Added: branches/forumslug/ - copied from r2843, trunk/ Log: create forumslug branch for slug things From oi-svn at pardus.org.tr Sat Sep 26 11:50:57 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 11:50:57 +0300 (EEST) Subject: [Oi-commits] trunk/forum - revert trunkforum to r2825, I'll add new features Message-ID: <20090926085058.DB5D849C8D5@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 11:50:57 2009 New Revision: 2845 Added: trunk/forum/admin.py - copied unchanged from r2825, trunk/forum/admin.py trunk/forum/models.py - copied unchanged from r2825, trunk/forum/models.py trunk/forum/urls.py - copied unchanged from r2825, trunk/forum/urls.py trunk/forum/views.py - copied unchanged from r2825, trunk/forum/views.py Log: revert trunkforum to r2825, I'll add new features --- admin.py | 73 +- models.py | 701 ++++++++++----------- urls.py | 114 +-- views.py | 2051 ++++++++++++++++++++++++++++++-------------------------------- 4 files changed, 1467 insertions(+), 1472 deletions(-) From oi-svn at pardus.org.tr Sat Sep 26 12:07:14 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 12:07:14 +0300 (EEST) Subject: [Oi-commits] trunk - remove latest topics with polls, increase latest p... Message-ID: <20090926090714.C8F2D49C8D5@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 12:07:14 2009 New Revision: 2846 Modified: trunk/forum/views.py trunk/media/css/new/forum_main.css trunk/templates/forum/forum_list.html Log: remove latest topics with polls, increase latest posts number to 10 --- forum/views.py | 8 +------- media/css/new/forum_main.css | 19 +++---------------- templates/forum/forum_list.html | 14 -------------- 3 files changed, 4 insertions(+), 37 deletions(-) Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Sep 26 12:07:14 2009 @@ -60,15 +60,9 @@ except AttributeError, ObjectDoesNotExist: forum.is_read = True - # latest topics with polls - latest_topics_with_polls = [] - for poll in Poll.objects.order_by("-created")[:5]: - if poll.topic_set.count() >= 1: - latest_topics_with_polls.append(poll.topic_set.all()[0]) - usercount = User.objects.count() currentdate = datetime.now() - latest_posts = Topic.objects.filter(topic_latest_post__hidden=False, forum__is_published=True, forum__hidden=False).order_by("topic_latest_post").distinct()[:5] + latest_posts = Topic.objects.filter(topic_latest_post__hidden=False, forum__is_published=True, forum__hidden=False).order_by("topic_latest_post").distinct()[:10] if request.user.has_perm("forum.can_change_abusereport"): abuse_count = AbuseReport.objects.count() Modified: trunk/media/css/new/forum_main.css ================================================================= --- trunk/media/css/new/forum_main.css (original) +++ trunk/media/css/new/forum_main.css Sat Sep 26 12:07:14 2009 @@ -8,30 +8,17 @@ color: #666666; text-decoration: none; } -.category .latest_container { - float: left; - width: 395px; - overflow: hidden; -} -.category .rightborder { - border-right: 1px #F2F2F2 solid; - margin-right: 4px; -} .latest { overflow: hidden; margin-bottom: 1px; } -.latest_container { - font-size: 11px; - overflow: hidden; -} -.latest_container .post { +.latest .post { border-bottom: 1px #EAEAEA solid; overflow: hidden; margin-right: 4px; } -.latest_container .post .post { border: none; } -.latest_container .post a { +.latest .post .post { border: none; } +.latest .post a { color: #666666; text-decoration: none; } Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Sat Sep 26 12:07:14 2009 @@ -48,10 +48,8 @@

    Son ?letiler

    -

    Son Anketler

    -
    {% for topic in latest_posts %}
    @@ -62,18 +60,6 @@
    {% endfor %}
    -
    - {% for topic in latest_topics_with_polls %} -
    - -
    - {{ topic.poll.created|date:"d F Y H:i" }} - {{ topic.topic_latest_post.author }} iletiye git -
    -
    - {% endfor %} -
    -

    ?statistikler

    pati
    From oi-svn at pardus.org.tr Sat Sep 26 15:27:58 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 15:27:58 +0300 (EEST) Subject: [Oi-commits] trunk - latest post updater Message-ID: <20090926122758.BDEEB49C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 15:27:58 2009 New Revision: 2847 Added: trunk/media/js/forum_update_latest.js trunk/templates/forum/latest_posts_small.html Modified: trunk/forum/urls.py trunk/forum/views.py trunk/templates/forum/forum_list.html Log: latest post updater --- forum/urls.py | 1 + forum/views.py | 7 +++++++ media/js/forum_update_latest.js | 32 ++++++++++++++++++++++++++++++++ templates/forum/forum_list.html | 11 ++--------- templates/forum/latest_posts_small.html | 9 +++++++++ 5 files changed, 51 insertions(+), 9 deletions(-) Modified: trunk/forum/urls.py ================================================================= --- trunk/forum/urls.py (original) +++ trunk/forum/urls.py Sat Sep 26 15:27:58 2009 @@ -30,6 +30,7 @@ #(r'^okunmamis_konular/$', 'oi.forum.views.unread_topics'), (r'^son-iletiler/$', 'oi.forum.views.latest_posts'), + (r'^son-iletiler/(?P\d+)/$', 'oi.forum.views.latest_posts_small'), (r'^guncellenen-basliklar/$', 'oi.forum.views.latest_topics'), (r'^tumunu-okunmus-say/$', 'oi.forum.views.mark_all_as_read'), (r'^raporla/(?P\d+)/$', 'oi.forum.views.report_abuse'), Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Sep 26 15:27:58 2009 @@ -99,6 +99,13 @@ paginate_by = TOPICS_PER_PAGE, allow_empty = True) +def latest_posts_small(request, post_id): + if int(post_id) == Post.objects.order_by("-created")[0].id: + return HttpResponse("") + else: + latest_posts = Topic.objects.filter(topic_latest_post__hidden=False, forum__is_published=True, forum__hidden=False).order_by("topic_latest_post").distinct()[:10] + return render_response(request, "forum/latest_posts_small.html", locals()) + def latest_posts(request): posts = Post.objects.filter(hidden=False, topic__forum__is_published=True, topic__forum__hidden=False).order_by('-created')[:NUMBER_OF_LATEST_POSTS] abuse_count = 0 Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Sat Sep 26 15:27:58 2009 @@ -3,6 +3,7 @@ {% block extrahead %} + {% endblock %} {% block content %}
    @@ -50,15 +51,7 @@

    Son ?letiler

    - {% for topic in latest_posts %} -
    - -
    - {{ topic.topic_latest_post.created|date:"d F Y H:i" }} - {{ topic.topic_latest_post.author }} iletiye git -
    -
    - {% endfor %} + {% include "forum/latest_posts_small.html" %}

    ?statistikler

    From oi-svn at pardus.org.tr Sat Sep 26 16:12:47 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 16:12:47 +0300 (EEST) Subject: [Oi-commits] trunk/media/js - works with some little quirks Message-ID: <20090926131247.8BED749C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 16:12:47 2009 New Revision: 2848 Modified: trunk/media/js/forum_update_latest.js Log: works with some little quirks --- forum_update_latest.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Modified: trunk/media/js/forum_update_latest.js ================================================================= --- trunk/media/js/forum_update_latest.js (original) +++ trunk/media/js/forum_update_latest.js Sat Sep 26 16:12:47 2009 @@ -2,15 +2,15 @@ if (data) { //remove non-existent $(".latest > .post").each(function(i) { - alert($(this).html()); - if (data.indexOf($(this).html())<0) { + if (data.indexOf(this.id)<0) { $(this).addClass("tohide"); } }); //insert new data $(data).each(function(i) { - if (!$(".latest").html().indexOf($(this).html())<0) { - $(this).hide().appendTo(".latest"); + if ($(".latest").html().indexOf(this.id)<0) { + $(this).hide(); + $(this).prependTo($(".latest")); } }); //now do animations From oi-svn at pardus.org.tr Sat Sep 26 16:27:38 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 16:27:38 +0300 (EEST) Subject: [Oi-commits] trunk/media/js - fix Message-ID: <20090926132738.AAE3B49C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 16:27:38 2009 New Revision: 2849 Modified: trunk/media/js/forum_update_latest.js Log: fix --- forum_update_latest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Modified: trunk/media/js/forum_update_latest.js ================================================================= --- trunk/media/js/forum_update_latest.js (original) +++ trunk/media/js/forum_update_latest.js Sat Sep 26 16:27:38 2009 @@ -9,8 +9,8 @@ //insert new data $(data).each(function(i) { if ($(".latest").html().indexOf(this.id)<0) { - $(this).hide(); - $(this).prependTo($(".latest")); + $(".latest").prepend($(this).parent().html()); + $(".latest > .post:first").hide(); } }); //now do animations From oi-svn at pardus.org.tr Sat Sep 26 16:34:40 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 16:34:40 +0300 (EEST) Subject: [Oi-commits] trunk/media/js - fix fix Message-ID: <20090926133440.1FF9C49C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 16:34:40 2009 New Revision: 2850 Modified: trunk/media/js/forum_update_latest.js Log: fix fix --- forum_update_latest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/media/js/forum_update_latest.js ================================================================= --- trunk/media/js/forum_update_latest.js (original) +++ trunk/media/js/forum_update_latest.js Sat Sep 26 16:34:40 2009 @@ -9,7 +9,7 @@ //insert new data $(data).each(function(i) { if ($(".latest").html().indexOf(this.id)<0) { - $(".latest").prepend($(this).parent().html()); + $(".latest").prepend(this); $(".latest > .post:first").hide(); } }); From oi-svn at pardus.org.tr Sat Sep 26 17:28:56 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 17:28:56 +0300 (EEST) Subject: [Oi-commits] trunk - look'n feel Message-ID: <20090926142856.5F5A049C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 17:28:56 2009 New Revision: 2851 Modified: trunk/media/css/new/forum_main.css trunk/templates/forum/latest_posts_small.html Log: look'n feel --- media/css/new/forum_main.css | 35 ++++++++++++++++---------------- templates/forum/latest_posts_small.html | 9 +++----- 2 files changed, 22 insertions(+), 22 deletions(-) Modified: trunk/media/css/new/forum_main.css ================================================================= --- trunk/media/css/new/forum_main.css (original) +++ trunk/media/css/new/forum_main.css Sat Sep 26 17:28:56 2009 @@ -16,8 +16,13 @@ border-bottom: 1px #EAEAEA solid; overflow: hidden; margin-right: 4px; + padding-top: 5px; + padding-bottom: 5px; +} +.latest .post div { + float:left; + width:20%; } -.latest .post .post { border: none; } .latest .post a { color: #666666; text-decoration: none; @@ -25,26 +30,22 @@ .post .profile_link { float: right; } -.post .topic, .post .post { - margin-left: 5px; - line-height: 15px; -} -.post .forum { - margin-top: 5px; +.post .forum a { color: #999999; } +.post div.forum { color: #999999; } -.post .forum { margin-left: 5px; } -.post .forum a { color: #999999; } -.post .date { - float: left; +.post div.topic { + width: 45%; + font-weight: bold; +} +.post div.date { color: #999; - margin-bottom: 5px; + width: 19%; + float: right; + text-align: right; } -.post .topic { - margin-top: 5px; - margin-bottom: 3px; - height: 15px; - overflow: hidden; +.post div.link { + width: 16px; } .stats { overflow: hidden; Modified: trunk/templates/forum/latest_posts_small.html ================================================================= --- trunk/templates/forum/latest_posts_small.html (original) +++ trunk/templates/forum/latest_posts_small.html Sat Sep 26 17:28:56 2009 @@ -1,9 +1,8 @@ {% for topic in latest_posts %}
    - -
    - {{ topic.topic_latest_post.created|date:"d F Y H:i" }} - {{ topic.topic_latest_post.author }} iletiye git -
    + + + +
    {{ topic.topic_latest_post.created|date:"d F Y H:i" }}
    {% endfor %} From oi-svn at pardus.org.tr Sat Sep 26 17:30:40 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 17:30:40 +0300 (EEST) Subject: [Oi-commits] trunk/media/css/new - px->media/css/new/forum_main.css Message-ID: <20090926143040.D713149C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 17:30:40 2009 New Revision: 2852 Modified: trunk/media/css/new/forum_main.css Log: px->media/css/new/forum_main.css --- forum_main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/media/css/new/forum_main.css ================================================================= --- trunk/media/css/new/forum_main.css (original) +++ trunk/media/css/new/forum_main.css Sat Sep 26 17:30:40 2009 @@ -45,7 +45,7 @@ text-align: right; } .post div.link { - width: 16px; + width: 16%; } .stats { overflow: hidden; From oi-svn at pardus.org.tr Sat Sep 26 18:08:38 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Sat, 26 Sep 2009 18:08:38 +0300 (EEST) Subject: [Oi-commits] trunk/media/js - smoother animation Message-ID: <20090926150838.9785249C8D9@ns1.pardus.org.tr> Author: jnmbk Date: Sat Sep 26 18:08:38 2009 New Revision: 2853 Modified: trunk/media/js/forum_update_latest.js Log: smoother animation --- forum_update_latest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: trunk/media/js/forum_update_latest.js ================================================================= --- trunk/media/js/forum_update_latest.js (original) +++ trunk/media/js/forum_update_latest.js Sat Sep 26 18:08:38 2009 @@ -9,8 +9,8 @@ //insert new data $(data).each(function(i) { if ($(".latest").html().indexOf(this.id)<0) { + $(this).slideUp(); $(".latest").prepend(this); - $(".latest > .post:first").hide(); } }); //now do animations From oi-svn at pardus.org.tr Tue Sep 29 11:54:22 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 11:54:22 +0300 (EEST) Subject: [Oi-commits] trunk/templates - remove shipit banner Message-ID: <20090929085422.F1FDB49C8B6@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 11:54:22 2009 New Revision: 2854 Modified: trunk/templates/base.html trunk/templates/forum/forum_base.html Log: remove shipit banner --- base.html | 3 --- forum/forum_base.html | 3 --- 2 files changed, 6 deletions(-) Modified: trunk/templates/base.html ================================================================= --- trunk/templates/base.html (original) +++ trunk/templates/base.html Tue Sep 29 11:54:22 2009 @@ -78,9 +78,6 @@
    -
    - cdgonder -
    {% block rightcolumn_bottom %} {% endblock %}
    Modified: trunk/templates/forum/forum_base.html ================================================================= --- trunk/templates/forum/forum_base.html (original) +++ trunk/templates/forum/forum_base.html Tue Sep 29 11:54:22 2009 @@ -62,9 +62,6 @@
    - {% block sidebar_bottom %} {% endblock %} From oi-svn at pardus.org.tr Tue Sep 29 12:35:13 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 12:35:13 +0300 (EEST) Subject: [Oi-commits] trunk - add ajax loader image and fix animation Message-ID: <20090929093513.CA84949C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 12:35:13 2009 New Revision: 2855 Added: trunk/media/img/new/ajax-loader.gif (contents, props changed) Modified: trunk/media/css/new/forum_main.css trunk/media/js/forum_update_latest.js trunk/templates/forum/forum_list.html Log: add ajax loader image and fix animation --- media/css/new/forum_main.css | 8 ++++++++ media/js/forum_update_latest.js | 11 +++++++---- templates/forum/forum_list.html | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) Modified: trunk/media/css/new/forum_main.css ================================================================= --- trunk/media/css/new/forum_main.css (original) +++ trunk/media/css/new/forum_main.css Tue Sep 29 12:35:13 2009 @@ -47,6 +47,14 @@ .post div.link { width: 16%; } +.ajaxloader { + display: none; + margin-left: 5px; + vertical-align: middle; +} +.newcomer { + display: none; +} .stats { overflow: hidden; margin: 10px 0px; Modified: trunk/media/js/forum_update_latest.js ================================================================= --- trunk/media/js/forum_update_latest.js (original) +++ trunk/media/js/forum_update_latest.js Tue Sep 29 12:35:13 2009 @@ -9,24 +9,27 @@ //insert new data $(data).each(function(i) { if ($(".latest").html().indexOf(this.id)<0) { - $(this).slideUp(); + $(this).addClass("newcomer"); $(".latest").prepend(this); } }); //now do animations - $(".latest > .post").slideDown(); + $(".latest > .newcomer").slideDown(); + $(".latest > .newcomer").removeClass("newcomer"); $(".tohide").slideUp("normal", function() { $(".tohide").remove(); }); } + $(".ajaxloader").hide(); } var t; function updatePosts(delay) { var id = $(".latest > .post")[0].id; + $(".ajaxloader").show(); $.get("/forum/son-iletiler/"+id+"/", syncData); t = setTimeout("updatePosts(" + delay + ")", delay); } $(document).ready(function() { - //get new posts every 20 seconds - updatePosts(20000); + //get new posts every 30 seconds + updatePosts(30000); }); Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Tue Sep 29 12:35:13 2009 @@ -48,7 +48,7 @@ {% endfor %}
    {% include "forum/latest_posts_small.html" %} From oi-svn at pardus.org.tr Tue Sep 29 12:54:38 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 12:54:38 +0300 (EEST) Subject: [Oi-commits] trunk - disable shipit Message-ID: <20090929095438.9A2BA49C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 12:54:38 2009 New Revision: 2856 Modified: trunk/shipit/urls.py trunk/templates/footer.html trunk/templates/menu.html Log: disable shipit --- shipit/urls.py | 2 +- templates/footer.html | 2 +- templates/menu.html | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) Modified: trunk/shipit/urls.py ================================================================= --- trunk/shipit/urls.py (original) +++ trunk/shipit/urls.py Tue Sep 29 12:54:38 2009 @@ -8,7 +8,7 @@ from django.conf.urls.defaults import * urlpatterns = patterns('oi.shipit.views', - (r'^$', 'create_cdclient'), + #(r'^$', 'create_cdclient'), (r'^gonderilecek/$', 'cdclient_list_to_send'), (r'^gonderildi/$', 'cdclient_list_sent'), (r'^gonderilmedi/$', 'cdclient_list_not_sent'), Modified: trunk/templates/footer.html ================================================================= --- trunk/templates/footer.html (original) +++ trunk/templates/footer.html Tue Sep 29 12:54:38 2009 @@ -9,6 +9,6 @@
    Modified: trunk/templates/menu.html ================================================================= --- trunk/templates/menu.html (original) +++ trunk/templates/menu.html Tue Sep 29 12:54:38 2009 @@ -23,8 +23,6 @@ At?lye  E-Ma?aza -  - CD G?nder
    From oi-svn at pardus.org.tr Tue Sep 29 18:32:17 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 18:32:17 +0300 (EEST) Subject: [Oi-commits] trunk/tema - fix upload location Message-ID: <20090929153217.D2F1149C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 18:32:17 2009 New Revision: 2857 Modified: trunk/tema/models.py Log: fix upload location --- models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Modified: trunk/tema/models.py ================================================================= --- trunk/tema/models.py (original) +++ trunk/tema/models.py Tue Sep 29 18:32:17 2009 @@ -132,11 +132,11 @@ ) class DesktopScreenshot(ThemeItem): - image = models.ImageField(upload_to="upload/tema/duvar-kagidi/", verbose_name="Ekran G?r?nt?s?") + image = models.ImageField(upload_to="upload/tema/masaustu-goruntusu/", verbose_name="Masa?st? G?r?nt?s?") class Meta: - verbose_name="Ekran G?r?nt?s?" - verbose_name_plural="Ekran G?r?nt?leri" + verbose_name="Masa?st? G?r?nt?s?" + verbose_name_plural="Masa?st? G?r?nt?leri" def get_absolute_url(self): return "/tema/masaustu-goruntuleri/%s/" % (self.slug) From oi-svn at pardus.org.tr Tue Sep 29 18:33:08 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 18:33:08 +0300 (EEST) Subject: [Oi-commits] trunk/media/upload/tema/masaustu-goruntusu - add new directory Message-ID: <20090929153308.3975249C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 18:33:08 2009 New Revision: 2858 Added: trunk/media/upload/tema/masaustu-goruntusu/ Log: add new directory From oi-svn at pardus.org.tr Tue Sep 29 18:40:23 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Tue, 29 Sep 2009 18:40:23 +0300 (EEST) Subject: [Oi-commits] trunk/templates - enable petition in main page Message-ID: <20090929154023.142FF49C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Tue Sep 29 18:40:22 2009 New Revision: 2859 Modified: trunk/templates/home.html Log: enable petition in main page --- home.html | 1 - 1 file changed, 1 deletion(-) Modified: trunk/templates/home.html ================================================================= --- trunk/templates/home.html (original) +++ trunk/templates/home.html Tue Sep 29 18:40:22 2009 @@ -84,4 +84,3 @@ {% endfor %} {% endblock %} -{% block petition %}{% endblock %} From oi-svn at pardus.org.tr Wed Sep 30 14:10:20 2009 From: oi-svn at pardus.org.tr (=?utf-8?b?VcSfdXIgw4dldGlu?=) Date: Wed, 30 Sep 2009 14:10:20 +0300 (EEST) Subject: [Oi-commits] trunk/templates/user - linebreak in profile page Message-ID: <20090930111020.BBE2E49C8B1@ns1.pardus.org.tr> Author: jnmbk Date: Wed Sep 30 14:10:20 2009 New Revision: 2860 Modified: trunk/templates/user/profile.html Log: linebreak in profile page --- profile.html | 1 + 1 file changed, 1 insertion(+) Modified: trunk/templates/user/profile.html ================================================================= --- trunk/templates/user/profile.html (original) +++ trunk/templates/user/profile.html Wed Sep 30 14:10:20 2009 @@ -47,6 +47,7 @@ {% ifequal request.user.id info.id %}Bilgilerimi D?zenle{% endifequal %}
    +
    {% if has_sent_messages %}Forumdaki ?letileri{% else %}Forumda ?letisi Yok{% endif %}
    Ekledi?i Temalar
    ?simAdresTelefonBa?vuru Tarihi
    ?sim ({{ cdclient_list.count }})AdresTelefonBa?vuru Tarihi
    {{ client.get_full_name }}{{ client.address }} {{ client.town }}/{{ client.get_city_display }}{{ client.get_full_phone }}{{ client.date }}