some index bugs

remotes/origin/1203
Назар Котюк 11 years ago
parent 141084306a
commit af0df2141e
  1. 8
      conference/urls.py
  2. 6
      exposition/forms.py
  3. 6
      proj/views.py
  4. 4
      templates/admin/exposition/exposition.html
  5. 4
      templates/admin/place_exposition/place_exposition.html
  6. 4
      templates/client/blank.html
  7. 2
      templates/client/includes/article/article_logo.html
  8. 2
      templates/client/includes/article/article_preview.html
  9. 10
      templates/client/includes/article/news_on_main_logo.html
  10. 2
      templates/client/includes/article/news_preview.html
  11. 13
      templates/client/includes/footer.html
  12. 6
      templates/client/includes/header.html
  13. 9
      templates/client/includes/index/confs.html
  14. 9
      templates/client/includes/index/expos.html
  15. 21
      templates/client/includes/index/news.html
  16. 10
      templates/client/includes/menu.html
  17. 55
      templates/client/index.html
  18. 5
      theme/forms.py

@ -3,10 +3,10 @@ from django.conf.urls import patterns, include, url
from views import ConferenceView
urlpatterns = patterns('',
url(r'conferences/(?P<params>.*)/(?P<page>\d+)/$', ConferenceView.as_view()),
url(r'conferences/(?P<page>\d+)/$', ConferenceView.as_view()),
url(r'conferences/(?P<params>.*)/$', ConferenceView.as_view()),
url(r'conferences/$', ConferenceView.as_view()),
url(r'conference/(?P<params>.*)/(?P<page>\d+)/$', ConferenceView.as_view()),
url(r'conference/(?P<page>\d+)/$', ConferenceView.as_view()),
url(r'conference/(?P<params>.*)/$', ConferenceView.as_view()),
url(r'conference/$', ConferenceView.as_view()),
#
url(r'conference-add-calendar/(?P<id>\d+)/$', 'conference.views.conference_add_calendar'),
url(r'conference-remove-calendar/(?P<id>\d+)/$', 'conference.views.conference_remove_calendar'),

@ -44,7 +44,7 @@ class ExpositionCreateForm(forms.Form):
currencies = [(item, item) for item in CURRENCY]
data_begin = forms.DateField(label=u'Дата начала', input_formats=['%Y-%m-%d', '%d.%m.%Y'])
data_end = forms.DateField(label=u'Дата окночания', input_formats=['%Y-%m-%d', '%d.%m.%Y'])
data_end = forms.DateField(label=u'Дата окончания', input_formats=['%Y-%m-%d', '%d.%m.%Y'])
logo = forms.ImageField(label='Logo', required=False)
organiser = forms.MultipleChoiceField(label=u'Организаторы', required=False,
@ -77,8 +77,8 @@ class ExpositionCreateForm(forms.Form):
widget=forms.CheckboxSelectMultiple())
#
currency = forms.ChoiceField(label=u'Валюта', choices=currencies, required=False)
application_deadline = forms.DateField(label=u'Срок подачи стэнда', required=False)
min_stand_size = forms.CharField(label=u'Минимальный размер стэнда', required=False)
application_deadline = forms.DateField(label=u'Срок подачи стенда', required=False)
min_stand_size = forms.CharField(label=u'Минимальный размер стенда', required=False)
#price_day = forms.CharField(label=u'Цена за 1 день', required=False)
#price_all = forms.CharField(label=u'Цена за все дни', required=False)

@ -38,12 +38,12 @@ class MainPageView(TemplateView):
exposition_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.exposition)[:6]
conference_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.conference)[:6]
seminar_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.seminar)[:6]
news_list = News.objects.order_by('-main_page').all()[:3]
articles = Article.objects.order_by('-main_page').all()[:2]
news_list = Article.objects.news().filter(main_page=1)
blogs = Article.objects.blogs().filter(main_page=1)
args = {'events': events, 'exposition_themes': exposition_themes,
'conference_themes': conference_themes, 'seminar_themes': seminar_themes,
'news_list': news_list, 'articles': articles, 'search_form': EventSearchForm,
'news_list': news_list, 'blogs': blogs, 'search_form': EventSearchForm,
'search_action': '/events/search/'}

@ -452,7 +452,7 @@
<a href="#timetableModal" id="timetable_add" role="btn btn-success" class="btn btn-success" data-toggle="modal"><i class="icon-plus-sign icon-white"></i> Добавить program</a>
{% else %}
<p>Деловую программу можна добавлять только после введения основных даных</p>
<p>Деловую программу можно добавлять только после введения основных данных</p>
{% endif %}
@ -580,7 +580,7 @@
{# button that shows modal window with file form #}
<a href="#myModal" id="file_add" role="button" class="btn btn-info" data-toggle="modal">Добавить файл</a>
{% else %}
<p>Файлы можна добавлять только после введения основных даных</p>
<p>Файлы можно добавлять только после введения основных данных</p>
{% endif %}
{# this div shows list of files and refreshes when new file added #}
<div id="file_list">

@ -221,7 +221,7 @@
</tbody>
</table>
{% else %}
<p>Павилионы можна добавлять только после введения основных даных</p>
<p>Павилионы можно добавлять только после введения основных данных</p>
{% endif %}
</div>
@ -333,7 +333,7 @@
{# button that shows modal window with file form #}
<a href="#myModal" id="file_add" role="button" class="btn btn-info" data-toggle="modal">Добавить файл</a>
{% else %}
<p>Файлы можна добавлять только после введения основных даных</p>
<p>Файлы можно добавлять только после введения основных данных</p>
{% endif %}
{# this div shows list of files and refreshes when new file added #}
<div id="file_list">

@ -75,7 +75,7 @@ This template include basic anf main styles and js files,
-->
<div class="page-wrap">
{% block header %}
{% include 'header.html' %}
{% include 'client/includes/header.html' %}
{% endblock %}
{% block main_part %}
{% endblock %}
@ -99,7 +99,7 @@ This template include basic anf main styles and js files,
{% endblock %}
{% block footer %}
{% include 'footer.html' %}
{% include 'client/includes/footer.html' %}
{% endblock %}
</div>
<div class="popups-wrap">

@ -2,7 +2,7 @@
{% load thumbnail %}
{% if obj.logo %}
{% thumbnail obj.logo "100x100" crop="center" as im %}
{% thumbnail obj.logo "100x100" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt="">
{% endthumbnail %}
{% else %}

@ -2,7 +2,7 @@
{% load thumbnail %}
{% if obj.logo %}
{% thumbnail obj.logo "250x180" crop="center" as im %}
{% thumbnail obj.logo "250x180" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt="">
{% endthumbnail %}
{% else %}

@ -0,0 +1,10 @@
{% load static %}
{% load thumbnail %}
{% if obj.logo %}
{% thumbnail obj.logo "80x80" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt="">
{% endthumbnail %}
{% else %}
<img src="{% static 'client/img/no-logo.png' %}" class="pic" alt="" />
{% endif %}

@ -2,7 +2,7 @@
{% load thumbnail %}
{% if obj.logo %}
{% thumbnail obj.logo "70x70" crop="center" as im %}
{% thumbnail obj.logo "70x70" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt="">
{% endthumbnail %}
{% else %}

@ -5,7 +5,7 @@
<div class="layout-wrap footer-wrap">
<aside>
<div class="copy">© 2008 — 2013 Expomap.ru</div>
<div class="copy">© 2008 — 2015 Expomap.ru</div>
<ul class="soc-media-buttons">
<li><a href="http://expomap.ru/rss3.php/" target="_blank"><img src="{% static 'client/img/soc-medias/sm-icon-rss.png' %} " title="RSS" alt="RSS" /></a></li>
<li><a href="https://www.facebook.com/Expomap" target="_blank"><img src="{% static 'client/img/soc-medias/sm-icon-fb.png" title="Facebook" alt="Facebook' %} " /></a></li>
@ -22,16 +22,11 @@
<li class="sub"><a href="#">{% trans 'События' %}</a>
<ul>
<li><a href="{{ expo_catalog }}">{% trans 'выставки' %}</a></li>
<li><a href="/conferences">{% trans 'конференции' %}</a></li>
{% comment %}
<li><a href="/seminars">{% trans 'семинары' %}</a></li>
<li><a href="/webinars">{% trans 'вебинары' %}</a></li>
{% endcomment %}
<li><a href="/conferences/">{% trans 'конференции' %}</a></li>
</ul>
</li>
<li><a href="/places">{% trans 'места' %}</a></li>
<li><a href="/members">{% trans 'участники' %}</a></li>
<li><a href="/places/">{% trans 'места' %}</a></li>
<li><a href="/members/">{% trans 'участники' %}</a></li>
</ul>
<ul class="s-menu">

@ -80,8 +80,8 @@
<div class="serv-links">
<ul>
<li><a href="{{ expo_catalog }}city/moskva-ru/">{% trans 'Выставки в Москве' %}</a></li>
<li><a href="{{ expo_catalog }}city/sankt-peterburg-ru/">{% trans 'Выставки в Петербурге' %}</a></li>
<li><a href="{{ expo_catalog }}city/moscow/">{% trans 'Выставки в Москве' %}</a></li>
<li><a href="{{ expo_catalog }}city/saint-petersburg/">{% trans 'Выставки в Петербурге' %}</a></li>
<li><a href="{{ expo_catalog }}country/germany/">{% trans 'Выставки в Германии' %}</a></li>
</ul>
@ -95,7 +95,7 @@
<div class="abn">
{% block header_banner %}
<a href="#"><img src="{% static 'client/img/_del-temp/banner.gif' %}" alt="" /></a>
{% endblock %}
</div>

@ -0,0 +1,9 @@
{% load i18n %}
<header>{% trans 'конференции' %}</header>
<ul>
{% for theme in themes %}
<li><a href="/conference/theme/{{ theme.url }}/"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.conferences_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/conference/">{% trans 'Все конференции' %}</a></footer>

@ -0,0 +1,9 @@
{% load i18n %}
<header>{% trans 'Выставки' %}</header>
<ul>
{% for theme in themes %}
<li><a href="/expo/theme/{{ theme.url }}/"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.expositions_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/expo/">{% trans 'Все выставки' %}</a></footer>

@ -0,0 +1,21 @@
{% load i18n %}
<header>
<a href="/news/">{% trans 'Новости событий' %}</a>
</header>
<ul>
{% for news in news_list %}
<li>
<a href="{{ news.get_permanent_url }}">
<span class="nl-pict">
{% include 'client/includes/article/news_on_main_logo.html' with obj=news %}
</span>
<span class="nl-body">
<span class="nl-text">{{ news.main_title }}</span>
<span class="nl-date">{{ news.created|date:"d E Y" }}</span>
</span>
</a>
</li>
{% endfor %}
</ul>
<footer><a class="more" href="/news/">{% trans 'Все новости' %}</a></footer>

@ -4,15 +4,11 @@
<li class="sub"><a href="#">{% trans 'События' %}</a>
<ul>
<li><a href="{{ expo_catalog }}">{% trans 'выставки' %}</a></li>
<li><a href="/conferences">{% trans 'конференции' %}</a></li>
{% comment %}
<li><a href="/seminars">{% trans 'семинары' %}</a></li>
<li><a href="/webinars">{% trans 'вебинары' %}</a></li>
{% endcomment %}
<li><a href="/conference/">{% trans 'конференции' %}</a></li>
</ul>
</li>
<li><a href="/places">{% trans 'места' %}</a></li>
<li><a href="/members">{% trans 'участники' %}</a></li>
<li><a href="/places/">{% trans 'места' %}</a></li>
<li><a href="/members/">{% trans 'участники' %}</a></li>
</ul>
<ul class="s-menu">

@ -39,12 +39,11 @@
<div class="layout-wrap">
<aside>
{% include 'menu.html' %}
{% include 'client/includes/menu.html' %}
</aside>
{% include 'client/includes/index/main_events.html' with events=events %}
</div>
</section>
{% endblock %}
@ -71,43 +70,18 @@
<div class="mp-catalog-lists">
<div class="mpc-list">
<header>{% trans 'Выставки' %}</header>
<ul>
{% for theme in exposition_themes %}
<li><a href="/expositions/theme-{{ theme.url }}"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.expositions_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/expositions/">{% trans 'Все выставки' %}</a></footer>
{% include 'client/includes/index/expos.html' with themes=exposition_themes %}
</div>
<div class="mpc-list">
<header>{% trans 'конференции' %}</header>
<ul>
{% for theme in conference_themes %}
<li><a href="/conferences/theme-{{ theme.url }}"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.conferences_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/conferences/">{% trans 'Все конференции' %}</a></footer>
</div>
{% comment %}
<div class="mpc-list">
<header>{% trans 'семинары' %}</header>
<ul>
{% for theme in seminar_themes %}
<li><a href="/seminars/theme-{{ theme.url }}"><span>{{ theme.name }}</span>&nbsp;<i>({{ theme.seminars_number }})</i></a></li>
{% endfor %}
</ul>
<footer><a class="more" href="/seminars/">{% trans 'Все семинары' %}</a></footer>
{% include 'client/includes/index/confs.html' with themes=conference_themes %}
</div>
{% endcomment %}
</div>
<div class="abn">
{% block menu_banner %}
<a href="#">
<img src="{% static 'client/img/_del-temp/banner-2.gif' %}" alt="" />
</a>
{% endblock %}
</div>
</div>
@ -121,26 +95,7 @@
<div class="layout-wrap">
<aside>
<div class="mp-news-list">
<header>
<a href="#">{% trans 'Новости событий' %}</a>
</header>
<ul>
{% for news in news_list %}
<li>
<a href="{{ news.get_permanent_url }}">
<span class="nl-pict">
{# add logo #}
<img src="{% static 'client/img/_del-temp/expo-bn-2-s.jpg' %}" alt="" />
</span>
<span class="nl-body">
<span class="nl-text">{{ news.main_title %}</span>
<span class="nl-date">{{ news.date }}</span>
</span>
</a>
</li>
{% endfor %}
</ul>
<footer><a class="more" href="#">{% trans 'Все новости' %}</a></footer>
{% include 'client/includes/index/news.html' with news=news_list %}
</div>
</aside>

@ -10,6 +10,7 @@ from django.conf import settings
from ckeditor.widgets import CKEditorWidget
from functions.translate import fill_with_signal
from functions.admin_forms import AdminFilterForm
from functions.form_check import translit_with_separator
@ -53,9 +54,13 @@ class ThemeForm(forms.Form):
#generates bitfield
flag = reduce(lambda x,y: x|y, (getattr(Theme.types, item) for item in data['types']))
theme.types = flag
#theme.save()
fill_with_signal(Theme, theme, data)
if not theme.url:
theme.url = translit_with_separator(theme.name)
theme.save()

Loading…
Cancel
Save