From 6bcc90412aa13a7cd0600ad2846d5fed7ceb7b7e Mon Sep 17 00:00:00 2001 From: Nazar Kotjuk Date: Thu, 17 Sep 2015 15:20:03 +0300 Subject: [PATCH] Template hot fixes --- expobanner/admin.py | 2 +- expobanner/admin_urls.py | 2 +- functions/models_methods.py | 6 ++- templates/client/blank.html | 1 + .../client/includes/article/blog_list.html | 2 +- .../client/includes/article/news_list.html | 2 +- .../client/includes/banners/aside_2.html | 15 +++---- .../client/includes/banners/aside_4.html | 9 ++++ .../includes/banners/catalog_inner.html | 35 +++++----------- .../includes/banners/catalog_inner_2.html | 21 ++++++++++ .../client/includes/banners/detail_inner.html | 41 +++++++++---------- .../includes/banners/detail_inner_3.html | 11 +++++ .../client/includes/banners/popup_2.html | 2 + .../client/includes/company/company_list.html | 2 +- .../includes/company/company_object.html | 1 + .../includes/conference/conference_list.html | 2 +- .../conference/conference_object.html | 1 + .../includes/exposition/exposition_list.html | 2 +- .../exposition/exposition_object.html | 3 +- .../client/includes/exposition/members.html | 2 +- .../includes/exposition/search_result.html | 2 +- .../client/includes/exposition/visitors.html | 2 +- .../client/includes/place/place_list.html | 2 +- .../client/includes/place/place_object.html | 1 + 24 files changed, 102 insertions(+), 67 deletions(-) create mode 100644 templates/client/includes/banners/detail_inner_3.html create mode 100644 templates/client/includes/banners/popup_2.html diff --git a/expobanner/admin.py b/expobanner/admin.py index 311c83f8..cfcaa599 100644 --- a/expobanner/admin.py +++ b/expobanner/admin.py @@ -241,4 +241,4 @@ class TopUpdate(UpdateView): context = super(TopUpdate, self).get_context_data(**kwargs) obj = self.object context['exposition'] = obj.get_event() - return context + return context \ No newline at end of file diff --git a/expobanner/admin_urls.py b/expobanner/admin_urls.py index d91abfca..cce3e1aa 100644 --- a/expobanner/admin_urls.py +++ b/expobanner/admin_urls.py @@ -29,7 +29,7 @@ urlpatterns = patterns('expobanner.admin', url(r'^top/list/$', TopList.as_view(), name='expobanner-list_top'), url(r'^top/(?P\d+)/edit/$', TopUpdate.as_view(), name='expobanner-update_top'), url(r'^top/$', TopCreate.as_view(), name='expobanner-create_top'), - url(r'^top/(?P\d+)/stat/$', PaidStat.as_view(), name='expobanner_stat_top'), + url(r'^top/(?P\d+)/stat/$', MainStat.as_view(), name='expobanner_stat_top'), # main page url(r'^main/list/$', MainList.as_view(), name='expobanner-list_main'), url(r'^main/(?P\d+)/edit/$', MainUpdate.as_view(), name='expobanner-update_main'), diff --git a/functions/models_methods.py b/functions/models_methods.py index 064667ac..c5c45e58 100644 --- a/functions/models_methods.py +++ b/functions/models_methods.py @@ -30,7 +30,11 @@ class ExpoManager(TranslationManager): key = 'expo_main_page_key_%s'%lang result = cache.get(key) if not result: - result = list(self.language(lang).select_related('country', 'city', 'place', 'main').prefetch_related('tag').filter(main__isnull=False)) + result = list(self.language(lang). + select_related('country', 'city', 'place', 'main'). + prefetch_related('tag'). + filter(main__isnull=False). + filter(main__public=True)) cache.set(key, result, 45) return result diff --git a/templates/client/blank.html b/templates/client/blank.html index 04a4d77e..594550da 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -137,6 +137,7 @@ This template include basic anf main styles and js files, {% include 'client/popups/callback.html' %} {% include 'client/includes/banners/popup.html' %} + {% include 'client/includes/banners/popup_2.html' %} {% block popup_banner %} {% endblock %} {# if user doesnt have url- show form #} diff --git a/templates/client/includes/article/blog_list.html b/templates/client/includes/article/blog_list.html index 0c70bd85..afd7969d 100644 --- a/templates/client/includes/article/blog_list.html +++ b/templates/client/includes/article/blog_list.html @@ -14,7 +14,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/article/news_list.html b/templates/client/includes/article/news_list.html index b2cc424b..8171901d 100644 --- a/templates/client/includes/article/news_list.html +++ b/templates/client/includes/article/news_list.html @@ -14,7 +14,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/banners/aside_2.html b/templates/client/includes/banners/aside_2.html index 439bfe68..0c637c72 100644 --- a/templates/client/includes/banners/aside_2.html +++ b/templates/client/includes/banners/aside_2.html @@ -5,17 +5,18 @@ yandex_partner_id = 58151; yandex_site_bg_color = 'FFFFF'; yandex_ad_format = 'direct'; - yandex_font_size = 1; - yandex_direct_type = 'vertical'; - yandex_direct_limit = 3; + yandex_direct_type = 'posterVertical'; + yandex_direct_border_type = 'ad'; + yandex_direct_limit = 2; yandex_direct_title_font_size = 3; yandex_direct_links_underline = false; - yandex_direct_title_color = '666666'; - yandex_direct_url_color = '000000'; + yandex_direct_border_color = 'CCCCCC'; + yandex_direct_title_color = '333333'; + yandex_direct_url_color = '666666'; yandex_direct_text_color = '000000'; yandex_direct_hover_color = 'FF8000'; - yandex_direct_sitelinks_color = 'FF8000'; - yandex_direct_favicon = false; + yandex_direct_sitelinks_color = '333333'; + yandex_direct_favicon = true; yandex_no_sitelinks = false; document.write(''); diff --git a/templates/client/includes/banners/aside_4.html b/templates/client/includes/banners/aside_4.html index 94d6023e..28a2f1c6 100644 --- a/templates/client/includes/banners/aside_4.html +++ b/templates/client/includes/banners/aside_4.html @@ -1,4 +1,13 @@
+ + + +
\ No newline at end of file diff --git a/templates/client/includes/banners/catalog_inner.html b/templates/client/includes/banners/catalog_inner.html index ccf1add4..272f9963 100644 --- a/templates/client/includes/banners/catalog_inner.html +++ b/templates/client/includes/banners/catalog_inner.html @@ -1,26 +1,11 @@ -
- - +
+ + + +
\ No newline at end of file diff --git a/templates/client/includes/banners/catalog_inner_2.html b/templates/client/includes/banners/catalog_inner_2.html index b8ec5c0f..fd12557e 100644 --- a/templates/client/includes/banners/catalog_inner_2.html +++ b/templates/client/includes/banners/catalog_inner_2.html @@ -1,2 +1,23 @@
+ +
\ No newline at end of file diff --git a/templates/client/includes/banners/detail_inner.html b/templates/client/includes/banners/detail_inner.html index 6d0760aa..e28563bd 100644 --- a/templates/client/includes/banners/detail_inner.html +++ b/templates/client/includes/banners/detail_inner.html @@ -1,25 +1,22 @@
+ yandex_partner_id = 58151; + yandex_site_bg_color = 'FFFFF'; + yandex_ad_format = 'direct'; + yandex_direct_type = 'posterHorizontal'; + yandex_direct_border_type = 'block'; + yandex_direct_limit = 3; + yandex_direct_title_font_size = 3; + yandex_direct_border_radius = true; + yandex_direct_links_underline = false; + yandex_direct_border_color = 'FBE5C0'; + yandex_direct_title_color = '333333'; + yandex_direct_url_color = '666666'; + yandex_direct_text_color = '000000'; + yandex_direct_hover_color = 'FF8000'; + yandex_direct_sitelinks_color = '333333'; + yandex_direct_favicon = true; + yandex_no_sitelinks = false; + document.write(''); +
\ No newline at end of file diff --git a/templates/client/includes/banners/detail_inner_3.html b/templates/client/includes/banners/detail_inner_3.html new file mode 100644 index 00000000..7315e28e --- /dev/null +++ b/templates/client/includes/banners/detail_inner_3.html @@ -0,0 +1,11 @@ +
+ + + + +
\ No newline at end of file diff --git a/templates/client/includes/banners/popup_2.html b/templates/client/includes/banners/popup_2.html new file mode 100644 index 00000000..75c55929 --- /dev/null +++ b/templates/client/includes/banners/popup_2.html @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/templates/client/includes/company/company_list.html b/templates/client/includes/company/company_list.html index 89614691..b0089a78 100644 --- a/templates/client/includes/company/company_list.html +++ b/templates/client/includes/company/company_list.html @@ -64,7 +64,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/company/company_object.html b/templates/client/includes/company/company_object.html index 57bb11b5..93489d5c 100644 --- a/templates/client/includes/company/company_object.html +++ b/templates/client/includes/company/company_object.html @@ -216,6 +216,7 @@ {% trans 'Все события' %} {% endif %}
+ {% include 'client/includes/banners/detail_inner_3.html' %} {% if company.get_expositions_number > 0 or company.get_conferences_number > 0 or company.get_seminars_number > 0 %}
{% endif %} diff --git a/templates/client/includes/conference/conference_list.html b/templates/client/includes/conference/conference_list.html index c1d2487f..d3084307 100644 --- a/templates/client/includes/conference/conference_list.html +++ b/templates/client/includes/conference/conference_list.html @@ -96,7 +96,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/conference/conference_object.html b/templates/client/includes/conference/conference_object.html index 02b61d28..aed18bdc 100644 --- a/templates/client/includes/conference/conference_object.html +++ b/templates/client/includes/conference/conference_object.html @@ -332,6 +332,7 @@ {% endif %} + {% include 'client/includes/banners/detail_inner_3.html' %}
{% trans 'Смотрите также:' %}
{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %} diff --git a/templates/client/includes/exposition/exposition_list.html b/templates/client/includes/exposition/exposition_list.html index 6f27536d..5730ceb8 100644 --- a/templates/client/includes/exposition/exposition_list.html +++ b/templates/client/includes/exposition/exposition_list.html @@ -104,7 +104,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/exposition/exposition_object.html b/templates/client/includes/exposition/exposition_object.html index dc783ff0..737182a9 100644 --- a/templates/client/includes/exposition/exposition_object.html +++ b/templates/client/includes/exposition/exposition_object.html @@ -67,7 +67,7 @@
- +\1 {% endif %}
@@ -352,6 +352,7 @@ {% endfor %}
+ {% include 'client/includes/banners/detail_inner_3.html' %} {% endif %}
{% trans 'Смотрите также:' %}
diff --git a/templates/client/includes/exposition/members.html b/templates/client/includes/exposition/members.html index d0bd4e4a..ee143f72 100644 --- a/templates/client/includes/exposition/members.html +++ b/templates/client/includes/exposition/members.html @@ -53,7 +53,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/exposition/search_result.html b/templates/client/includes/exposition/search_result.html index 93bc23af..5f791b9d 100644 --- a/templates/client/includes/exposition/search_result.html +++ b/templates/client/includes/exposition/search_result.html @@ -87,7 +87,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/exposition/visitors.html b/templates/client/includes/exposition/visitors.html index 0958316b..d6254aab 100644 --- a/templates/client/includes/exposition/visitors.html +++ b/templates/client/includes/exposition/visitors.html @@ -55,7 +55,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/place/place_list.html b/templates/client/includes/place/place_list.html index 936a8bf6..69ef1376 100644 --- a/templates/client/includes/place/place_list.html +++ b/templates/client/includes/place/place_list.html @@ -52,7 +52,7 @@ {% include 'client/includes/banners/catalog_inner_2.html' %} {% endif %} - {% if forloop.counter == 8 %} + {% if forloop.counter == 10 %} {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/place/place_object.html b/templates/client/includes/place/place_object.html index 9d6b5e10..4be3f158 100644 --- a/templates/client/includes/place/place_object.html +++ b/templates/client/includes/place/place_object.html @@ -330,6 +330,7 @@
{% endif %} + {% include 'client/includes/banners/detail_inner_3.html' %} {% endblock %} {% block scripts %}