parent
225e7850eb
commit
3e94c98384
55 changed files with 2361 additions and 354 deletions
@ -1,13 +1,15 @@ |
||||
# -*- coding: utf-8 -*- |
||||
from django.conf.urls import patterns, include, url |
||||
from admin import ConferenceListView |
||||
from admin import ConferenceListView, ConferenceView |
||||
|
||||
urlpatterns = patterns('conference.admin', |
||||
url(r'^add.*/$', 'conference_add'), |
||||
url(r'^upload-photo/(?P<conf_id>.*)/$', 'upload_conference_photo'), |
||||
url(r'^delete/(?P<url>.*)$', 'conference_delete'), |
||||
url(r'^change/(?P<url>.*)/$', 'conference_change'), |
||||
url(r'^copy/(?P<url>.*)/$', 'conference_copy'), |
||||
url(r'^switch/(?P<url>.*)/(?P<action>.*)$', 'conference_switch'), |
||||
#url(r'^all/$', 'conference_all'), |
||||
url(r'^all/$', ConferenceListView.as_view()), |
||||
#url(r'^change/(?P<url>.*)/$', 'conference_change'), |
||||
|
||||
url(r'^switch/(?P<url>.*)/(?P<action>.*)$', 'conference_switch'), |
||||
|
||||
url(r'^(?P<url>.*)/$', ConferenceView.as_view()), |
||||
url(r'^$', ConferenceView.as_view()), |
||||
) |
||||
@ -0,0 +1 @@ |
||||
__author__ = 'root' |
||||
@ -0,0 +1 @@ |
||||
__author__ = 'root' |
||||
@ -0,0 +1,95 @@ |
||||
# -*- coding: utf-8 -*- |
||||
import xlrd |
||||
from django.core.management.base import BaseCommand |
||||
from django.conf import settings |
||||
from conference.models import Conference |
||||
from import_xls.excel_settings import event_sett |
||||
from django.db import IntegrityError |
||||
|
||||
|
||||
CONF_FILE = settings.MEDIA_ROOT+'/import/conf.xls' |
||||
|
||||
|
||||
class Command(BaseCommand): |
||||
def handle(self, *args, **options): |
||||
|
||||
f = open(CONF_FILE, 'r') |
||||
book = xlrd.open_workbook(file_contents=f.read()) |
||||
sheet = book.sheet_by_index(0) |
||||
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)] |
||||
labels = [label for label in row_list[0]] |
||||
|
||||
|
||||
existing = 0 |
||||
for row_number, row in enumerate(row_list[1:]): |
||||
if row[0] != '': |
||||
try: |
||||
object = Conference.objects.language('ru').get(id=int(row[0])) |
||||
existing += 1 |
||||
except ValueError: |
||||
object = Conference() |
||||
object.translate('ru') |
||||
|
||||
except Conference.DoesNotExist: |
||||
object = Conference(id= int(row[0])) |
||||
object.translate('ru') |
||||
existing += 1 |
||||
else: |
||||
# if id blank - its a new place |
||||
object = Conference() |
||||
object.translate('ru') |
||||
|
||||
methods = [] |
||||
for col_number, cell in enumerate(row): |
||||
label = labels[col_number] |
||||
|
||||
setting = event_sett.get(label) |
||||
|
||||
if setting is None: |
||||
continue |
||||
if setting.get('method'): |
||||
if cell != "": |
||||
methods.append({'func': setting['func'], 'value': cell, 'purpose': setting.get('purpose')}) |
||||
continue |
||||
|
||||
field_name = setting['field'] |
||||
func = setting.get('func') |
||||
|
||||
if func is not None: |
||||
extra_value = setting.get('extra_values') |
||||
if extra_value is not None: |
||||
# if setting has extra value then |
||||
# it is some field like city, theme, tag |
||||
# that has relation and can be created |
||||
|
||||
# in function we add language(need for relation fields) |
||||
# and extra value from object (like for city need country) |
||||
value = func(cell, 'ru', getattr(object, extra_value)) |
||||
elif setting.get('bitfield'): |
||||
value = func(object, cell, setting['label']) |
||||
|
||||
else: |
||||
value = func(cell) |
||||
|
||||
|
||||
setattr(object, field_name, value) |
||||
|
||||
try: |
||||
object.save() |
||||
except IntegrityError: |
||||
print('error %s'% str(object)) |
||||
continue |
||||
|
||||
|
||||
print('post save %s'% str(object)) |
||||
|
||||
|
||||
for method in methods: |
||||
func = method['func'] |
||||
if method.get('purpose'): |
||||
try: |
||||
func(object, method['value'], method['purpose']) |
||||
except: |
||||
continue |
||||
else: |
||||
func(object, method['value']) |
||||
@ -1,15 +1,74 @@ |
||||
# -*- coding: utf-8 -*- |
||||
from django.conf.urls import patterns, include, url |
||||
from views import ConferenceView |
||||
from views import ConferenceDetail, ConferenceList, ConferenceByCity, ConferenceByCountry, ConferenceByTheme,\ |
||||
ConferenceCountryCatalog, ConferenceCityCatalog, ConferenceTagCatalog, ConferenceThemeCatalog, ConferenceMembers,\ |
||||
ConferenceVisitors, ConferenceServiceView |
||||
from exposition.views import ExpositionSearchView |
||||
|
||||
urlpatterns = patterns('', |
||||
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-note/(?P<slug>.*)/$', 'conference.views.add_note'), |
||||
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'), |
||||
url(r'conference-visit/(?P<id>\d+)/$', 'conference.views.conference_visit'), |
||||
url(r'conference-unvisit/(?P<id>\d+)/$', 'conference.views.conference_unvisit'), |
||||
# search |
||||
url(r'conference/search/', ExpositionSearchView.as_view()), |
||||
# country catalog |
||||
url(r'conference/country/$', ConferenceByCountry.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCountryCatalog.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCountryCatalog.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCountryCatalog.as_view()), |
||||
url(r'conference/country/(?P<slug>.*)/$', ConferenceCountryCatalog.as_view()), |
||||
# city catalog |
||||
url(r'conference/city/$', ConferenceByCity.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceCityCatalog.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceCityCatalog.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceCityCatalog.as_view()), |
||||
url(r'conference/city/(?P<slug>.*)/$', ConferenceCityCatalog.as_view()), |
||||
# theme catalog |
||||
url(r'conference/theme/$', ConferenceByTheme.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/country/(?P<country_slug>.*)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/city/(?P<city_slug>.*)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceThemeCatalog.as_view()), |
||||
url(r'conference/theme/(?P<slug>.*)/$', ConferenceThemeCatalog.as_view()), |
||||
# tag catalog |
||||
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), |
||||
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), |
||||
url(r'conference/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', ConferenceTagCatalog.as_view()), |
||||
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', ConferenceTagCatalog.as_view()), |
||||
url(r'conference/tag/(?P<slug>.*)/(?P<year>\d+)/$', ConferenceTagCatalog.as_view()), |
||||
url(r'conference/tag/(?P<slug>.*)/$', ConferenceTagCatalog.as_view()), |
||||
# conf additional pages |
||||
url(r'conference/(?P<slug>.*)/visitors/page/(?P<page>\d+)/$', ConferenceVisitors.as_view()), |
||||
url(r'conference/(?P<slug>.*)/visitors/$', ConferenceVisitors.as_view()), |
||||
url(r'conference/(?P<slug>.*)/members/page/(?P<page>\d+)/$', ConferenceMembers.as_view()), |
||||
url(r'conference/(?P<slug>.*)/members/$', ConferenceMembers.as_view()), |
||||
url(r'conference/(?P<slug>.*)/service/(?P<service_url>.*)/', ConferenceServiceView.as_view()), |
||||
|
||||
# conf list |
||||
url(r'conference/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', ConferenceList.as_view()), |
||||
url(r'conference/(?P<year>\d+)/page/(?P<page>\d+)/$', ConferenceList.as_view()), |
||||
url(r'conference/(?P<year>\d+)/(?P<month>.*)/$', ConferenceList.as_view()), |
||||
url(r'conference/(?P<year>\d+)/$', ConferenceList.as_view()), |
||||
url(r'conference/page/(?P<page>\d+)/$', ConferenceList.as_view()), |
||||
# conf page |
||||
url(r'conference/(?P<slug>.*)/$', ConferenceDetail.as_view()), |
||||
url(r'conference/$', ConferenceList.as_view()), |
||||
|
||||
) |
||||
|
||||
|
||||
""" |
||||
|
||||
|
||||
""" |
||||
@ -0,0 +1,465 @@ |
||||
{% extends 'base.html' %} |
||||
{% load static %} |
||||
{% load thumbnail %} |
||||
|
||||
{% block styles %} |
||||
.hover{ |
||||
display:none; |
||||
margin-bottom:10px; |
||||
|
||||
} |
||||
.photo:hover .hover { |
||||
display: block; |
||||
} |
||||
{% endblock %} |
||||
|
||||
{# Displays exposition form and file form in modal window #} |
||||
|
||||
{% block scripts %} |
||||
|
||||
<script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script> |
||||
<script src="{% static 'tiny_mce/tiny_mce.js' %}"></script> |
||||
{# selects #} |
||||
<link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/> |
||||
<script src="{% static 'js/select/select2.js' %}"></script> |
||||
{# datepicker #} |
||||
|
||||
<link href="{% static 'js/datepicker/css/datepicker.css' %}" rel="stylesheet"/> |
||||
<script src="{% static 'js/datepicker/js/bootstrap-datepicker.js' %}"></script> |
||||
|
||||
|
||||
|
||||
<script src="{% static 'custom_js/formset_add.js' %}"></script> |
||||
<!-- |
||||
{# ajax #} |
||||
|
||||
|
||||
<script src="{% static 'custom_js/timetable_post.js' %}"></script> |
||||
<script src="{% static 'custom_js/place_city_ajax.js' %}"></script> |
||||
<script src="{% static 'custom_js/select_tag.js' %}"></script> |
||||
--> |
||||
|
||||
{# datetimepicker #} |
||||
<link href="{% static 'js/datetimepicker/css/datetimepicker.css' %}" rel="stylesheet"/> |
||||
<script src="{% static 'js/datetimepicker/js/bootstrap-datetimepicker.js' %}"></script> |
||||
<script type="text/javascript"> |
||||
$(document).ready(function(){ |
||||
$('#id_data_begin').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy', |
||||
minView:2 |
||||
}); |
||||
$('#id_data_end').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy', |
||||
minView:2 |
||||
}); |
||||
$('#id_end').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy hh:ii' |
||||
|
||||
}); |
||||
$('#id_begin').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy hh:ii' |
||||
|
||||
}); |
||||
|
||||
$('#id_application_deadline').datetimepicker({ |
||||
todayHighlight: true, |
||||
format : 'dd.mm.yyyy', |
||||
minView:2 |
||||
}); |
||||
|
||||
}); |
||||
</script> |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block body %} |
||||
<form method="post" class="form-horizontal" enctype="multipart/form-data" name="form1" id="form1"> {% csrf_token %} |
||||
<fieldset> |
||||
<legend><i class="icon-edit"></i>{% if object %} Изменить {% else %} Добавить {% endif %}конференцию{% if object %}(<a target="_blank" href="{{ object.get_permanent_url }}">на сайте</a>){% endif %}</legend> |
||||
|
||||
<div class="box span8" > |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i> Основная информация</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{# Hidden inputs uses for comparing with TmpFile objects #} |
||||
{{ form.key }} |
||||
{# Hidden input uses in clean method for checking url #} |
||||
{{ form.exposition_id }} |
||||
{# name #} |
||||
{% with field='name' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# main_title #} |
||||
{% with field='main_title' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# data_begin #} |
||||
<div class="control-group {% if form.data_begin.errors %}error{% endif %}"> |
||||
<label class="control-label"><b>{{ form.data_begin.label }}:</b></label> |
||||
<div class="controls">{{ form.data_begin }} |
||||
<span class="help-inline">{{ form.data_begin.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# data_end #} |
||||
<div class="control-group {% if form.data_end.errors %}error{% endif %}"> |
||||
<label class="control-label"><b>{{ form.data_end.label }}:</b></label> |
||||
<div class="controls">{{ form.data_end }} |
||||
<span class="help-inline">{{ form.data_end.errors }}</span> |
||||
</div> |
||||
</div> |
||||
|
||||
{# country #} |
||||
<div class="control-group {% if form.country.errors %}error{% endif %}"> |
||||
<label class="control-label"><b>{{ form.country.label }}:</b></label> |
||||
<div class="controls">{{ form.country }} |
||||
<span class="help-inline">{{ form.country.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# city #} |
||||
<div class="control-group {% if form.city.errors %}error{% endif %}"> |
||||
<label class="control-label"><b>{{ form.city.label }}:</b></label> |
||||
<div class="controls">{{ form.city }} |
||||
<span class="help-inline">{{ form.city.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# place #} |
||||
<div class="control-group {% if form.place.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.place.label }}:</label> |
||||
<div class="controls">{{ form.place }} |
||||
<span class="help-inline">{{ form.place.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# theme #} |
||||
<div class="control-group {% if form.theme.errors %}error{% endif %}"> |
||||
<label class="control-label"><b>{{ form.theme.label }}:</b></label> |
||||
<div class="controls">{{ form.theme }} |
||||
<span class="help-inline">{{ form.theme.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# tag #} |
||||
<div class="control-group {% if form.tag.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.tag.label }}:</label> |
||||
<div class="controls">{{ form.tag }} |
||||
<span class="help-inline">{{ form.tag.errors }}</span> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="box span8" > |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i> Дополнительная информация</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{# description #} |
||||
{% with field='description' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
|
||||
{# web_page #} |
||||
<div class="control-group {% if form.web_page.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.web_page.label }}:</label> |
||||
<div class="controls">{{ form.web_page }} |
||||
<span class="help-inline">{{ form.web_page.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# link #} |
||||
<div class="control-group {% if form.link.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.link.label }}:</label> |
||||
<div class="controls">{{ form.link }} |
||||
<span class="help-inline">{{ form.link.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# main_themes #} |
||||
{% with field='main_themes' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# time #} |
||||
{% with field='time' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# foundation_year #} |
||||
<div class="control-group {% if form.foundation_year.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.foundation_year.label }}:</label> |
||||
<div class="controls">{{ form.foundation_year }} |
||||
<span class="help-inline">{{ form.foundation_year.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# quality_label #} |
||||
<div class="control-group {% if form.quality_label.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.quality_label.label }}:</label> |
||||
<div class="controls">{{ form.quality_label }} |
||||
<span class="help-inline">{{ form.quality_label.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# canceled #} |
||||
<div class="control-group {% if form.canceled.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.canceled.label }}:</label> |
||||
<div class="controls">{{ form.canceled }} |
||||
<span class="help-inline">{{ form.canceled.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# moved #} |
||||
<div class="control-group {% if form.moved.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.moved.label }}:</label> |
||||
<div class="controls">{{ form.moved }} |
||||
<span class="help-inline">{{ form.moved.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# expohit #} |
||||
<div class="control-group {% if form.expohit.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.expohit.label }}:</label> |
||||
<div class="controls">{{ form.expohit }} |
||||
<span class="help-inline">{{ form.expohit.errors }}</span> |
||||
</div> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i>Условия участия</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{# currency #} |
||||
<div class="control-group {% if form.currency.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.currency.label }}:</label> |
||||
<div class="controls">{{ form.currency }} |
||||
<span class="help-inline">{{ form.currency.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# tax #} |
||||
<div class="control-group {% if form.tax.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.tax.label }}:</label> |
||||
<div class="controls">{{ form.tax }} |
||||
<span class="help-inline">{{ form.tax.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# min_price #} |
||||
<div class="control-group {% if form.min_price.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.min_price.label }}:</label> |
||||
<div class="controls">{{ form.min_price }} |
||||
<span class="help-inline">{{ form.min_price.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# max_price #} |
||||
<div class="control-group {% if form.max_price.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.max_price.label }}:</label> |
||||
<div class="controls">{{ form.max_price }} |
||||
<span class="help-inline">{{ form.max_price.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# discount #} |
||||
<div class="control-group {% if form.discount.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.discount.label }}:</label> |
||||
<div class="controls">{{ form.discount }} |
||||
<span class="help-inline">{{ form.discount.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# discount_description #} |
||||
{% with field='discount_description' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
|
||||
</div> |
||||
</div> |
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i>Деловая программа</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{% if object %} |
||||
<div id="timetable_wrap"> |
||||
<table class="table"> |
||||
<colgroup> |
||||
<col span="1" style="width: 35%;"> |
||||
<col span="1" style="width: 10%;"> |
||||
<col span="1" style="width: 10%;"> |
||||
<col span="1" style="width: 25%;"> |
||||
<col span="1" style="width: 10%;"> |
||||
<col span="1" style="width: 10%;"> |
||||
</colgroup> |
||||
<thead> |
||||
<tr> |
||||
<th>Программа</th> |
||||
<th>Начало</th> |
||||
<th>Конец</th> |
||||
<th>Спикеры</th> |
||||
<th>Организатор</th> |
||||
<th> </th> |
||||
</tr> |
||||
|
||||
</thead> |
||||
<tbody> |
||||
{% for timetable in timetables %} |
||||
<tr> |
||||
<td>{{ timetable.programe|safe }}</td> |
||||
<td>{{ timetable.begin|date:"o-m-d H:i" }}</td> |
||||
<td>{{ timetable.end|date:"o-m-d H:i" }}</td> |
||||
<td>{{ timetable.speaker }}</td> |
||||
<td> |
||||
{{ timetable.timetable_organiser }} |
||||
</td> |
||||
<td> |
||||
<button class="btn btn-danger remove_timetable" value="{{ timetable.id }}"> |
||||
Удалить |
||||
</button> |
||||
</td> |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
|
||||
<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> |
||||
{% endif %} |
||||
|
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i>Статистика</h2> |
||||
</div> |
||||
|
||||
<div class="box-content"> |
||||
{# foundation_year #} |
||||
<div class="control-group {% if form.foundation_year.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.foundation_year.label }}:</label> |
||||
<div class="controls">{{ form.foundation_year }} |
||||
<span class="help-inline">{{ form.foundation_year.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# area #} |
||||
<div class="control-group {% if form.area.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.area.label }}:</label> |
||||
<div class="controls">{{ form.area }} |
||||
<span class="help-inline">{{ form.area.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# members #} |
||||
<div class="control-group {% if form.members.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.members.label }}:</label> |
||||
<div class="controls">{{ form.members }} |
||||
<span class="help-inline">{{ form.members.errors }}</span> |
||||
</div> |
||||
</div> |
||||
{# visitors #} |
||||
<div class="control-group {% if form.visitors.errors %}error{% endif %}"> |
||||
<label class="control-label">{{ form.visitors.label }}:</label> |
||||
<div class="controls">{{ form.visitors }} |
||||
<span class="help-inline">{{ form.visitors.errors }}</span> |
||||
</div> |
||||
</div> |
||||
|
||||
{% if object %} |
||||
<div style="padding-left: 160px;{% if object %} {% else %}display: none;{% endif %}"> |
||||
|
||||
<table class="table table-hover" style=" width: 100%;"> |
||||
<thead> |
||||
<tr> |
||||
<td>Год</td> |
||||
<td>Посетители</td> |
||||
<td>Участники</td> |
||||
<td>Площадь</td> |
||||
<td></td> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% for stat in object.statistic.all %} |
||||
<tr> |
||||
<td>{{ stat.year }}</td> |
||||
<td>{{ stat.visitors }}</td> |
||||
<td>{{ stat.members }}</td> |
||||
<td>{{ stat.area }}</td> |
||||
<td><a class="btn btn-danger delete_stat" href="/admin/ajax_delete_stat/{{ stat.id }}/"><i class="icon-trash icon-white"></i> Удалить</a></td> |
||||
</tr> |
||||
{% endfor %} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
<a href="#stat_modal" id="stat_add" role="btn btn-success" class="btn btn-success" data-toggle="modal"><i class="icon-plus-sign icon-white"></i> Добавить год</a> |
||||
</div> |
||||
|
||||
|
||||
{% else %} |
||||
{% endif %} |
||||
|
||||
</div> |
||||
<div class="box span8" id="file"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i> Файлы</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{% if object %} |
||||
{# 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> |
||||
{% endif %} |
||||
{# this div shows list of files and refreshes when new file added #} |
||||
<div id="file_list"> |
||||
<table class="table table-hover"> |
||||
|
||||
<thead> |
||||
<tr> |
||||
<td>id</td> |
||||
<td>Файл</td> |
||||
<td>Имя</td> |
||||
<td>Назначение</td> |
||||
<td></td> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{% include 'file_list.html' with files=files %} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
|
||||
</div> |
||||
</div> |
||||
|
||||
{% include 'admin/includes/photogallery.html' with object=object %} |
||||
|
||||
<div class="box span8"> |
||||
<div class="box-header well"> |
||||
<h2><i class="icon-pencil"></i>Мета данные</h2> |
||||
</div> |
||||
<div class="box-content"> |
||||
{# keywords #} |
||||
{% with field='keywords' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# title #} |
||||
{% with field='title' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
{# descriptions #} |
||||
{% with field='descriptions' form=form languages=languages %} |
||||
{% include 'admin/forms/multilang.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="controls"> |
||||
<input class="btn btn-large btn-primary" type="submit" value="Добавить"> |
||||
<input class="btn btn-large" type="reset" value="Отмена"> |
||||
</div> |
||||
|
||||
</fieldset> |
||||
</form> |
||||
|
||||
|
||||
{% include 'admin/includes/photo_form.html' with form=photo_form object=object %} |
||||
{% include 'admin/includes/file_form.html' with file_form=file_form object=object %} |
||||
{% include 'admin/includes/stat_form.html' with form=stat_form object=object %} |
||||
{% endblock %} |
||||
@ -0,0 +1,40 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load template_filters %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a> |
||||
{% if month %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<a href="{{ year.link }}">{{ year.text }}</a> |
||||
<strong>{{ month.text }}</strong> |
||||
{% else %} |
||||
{% if year %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<strong>{{ year.text }}</strong> |
||||
{% else %} |
||||
<strong>{{ filter_object.name }}</strong> |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
<div class="page-title"> |
||||
<h1>{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong></h1> |
||||
</div> |
||||
|
||||
{% include 'includes/exposition/catalog_filter_period.html' %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% include 'includes/conference/conference_list.html' with object_list=object_list %} |
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %} |
||||
{% endblock %} |
||||
@ -0,0 +1,65 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load template_filters %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a> |
||||
{% if month %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
{% if country %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/country/{{ country.url }}">{{ country.name }}</a> |
||||
{% endif %} |
||||
{% if city %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/city/{{ city.url }}">{{ city.name }}</a> |
||||
{% endif %} |
||||
<a href="{{ year.link }}">{{ year.text }}</a> |
||||
<strong>{{ month.text }}</strong> |
||||
{% else %} |
||||
{% if year %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
{% if country %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/country/{{ country.url }}">{{ country.name }}</a> |
||||
{% endif %} |
||||
{% if city %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/city/{{ city.url }}">{{ city.name }}</a> |
||||
{% endif %} |
||||
<strong>{{ year.text }}</strong> |
||||
{% else %} |
||||
{% if country %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<strong>{{ country.name }}</strong> |
||||
{% else %} |
||||
{% if city %} |
||||
<a href="{{ catalog_url }}{{ filter_object.url }}/">{{ filter_object.name }}</a> |
||||
<strong>{{ city.name }}</strong> |
||||
{% else %} |
||||
<strong>{{ filter_object.name }}</strong> |
||||
{% endif %} |
||||
|
||||
{% endif %} |
||||
|
||||
|
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
<div class="page-title"> |
||||
<h1>{% trans 'Конференции' %}: <strong>{{ filter_object.name }}</strong></h1> |
||||
</div> |
||||
|
||||
{% include 'includes/exposition/catalog_filter_period.html' %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% include 'includes/conference/conference_list.html' with object_list=object_list %} |
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %} |
||||
{% endblock %} |
||||
@ -0,0 +1,42 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load static %} |
||||
{% load i18n %} |
||||
{% load template_filters %} |
||||
|
||||
{% block style %} |
||||
<link rel="stylesheet" href="{% static 'client/css/pages/exposition_by.css' %}"> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="/conference/">{% trans 'Конференции' %}</a> |
||||
<strong>{{ title1 }}</strong> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
{% block page_title %} |
||||
<div class="page-title"> |
||||
<h1>{{ title2 }}:</h1> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% for obj in object_list %} |
||||
{% set cur_word = obj.name %} |
||||
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower and forloop.counter != 1 %} |
||||
</ul> |
||||
{% endif %} |
||||
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower %} |
||||
<ul class="leter-list"> |
||||
<div class="leter"><font size="5">{{ cur_word|slice:":1"|upper }}</font></div> |
||||
{% endif %} |
||||
<li> |
||||
<a href="/conference/{{ catalog }}{{ obj.url }}/">{{ obj.name }} ({{ obj.conferences_number }})</a> |
||||
</li> |
||||
{% set prev_word = obj.name %} |
||||
{% endfor %} |
||||
|
||||
{% endblock %} |
||||
|
||||
@ -0,0 +1,24 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a> |
||||
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a> |
||||
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a> |
||||
<strong>{{ object.name }}</strong> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% include 'client/includes/conference/conference_object.html' with event=object %} |
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
|
||||
{% endblock %} |
||||
@ -0,0 +1,42 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
{% if month %} |
||||
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a> |
||||
<a href="{{ year.link }}">{{ year.text }}</a> |
||||
<strong>{{ month.text }}</strong> |
||||
{% else %} |
||||
{% if year %} |
||||
<a href="{{ catalog_url }}">{% trans 'Конференции' %}</a> |
||||
<strong>{{ year.text }}</strong> |
||||
{% else %} |
||||
<strong>{% trans 'Конференции' %}</strong> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
<div class="page-title"> |
||||
<h1>{% trans 'Конференции' %}</h1> |
||||
</div> |
||||
|
||||
{% include 'includes/exposition/catalog_filter_period.html' %} |
||||
|
||||
|
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
|
||||
{% include 'includes/conference/conference_list.html' with object_list=object_list %} |
||||
|
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %} |
||||
{% endblock %} |
||||
@ -0,0 +1,25 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a> |
||||
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a> |
||||
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a> |
||||
<a href="{{ object.get_permanent_url }}">{{ object.name }}</a> |
||||
<strong>{% trans 'Участники' %}</strong> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
{% include 'includes/exposition/members.html' with object_list=object_list %} |
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %} |
||||
{% endblock %} |
||||
@ -0,0 +1,26 @@ |
||||
{% extends 'base_catalog.html' %} |
||||
{% load i18n %} |
||||
|
||||
{% block bread_scrumbs %} |
||||
<div class="bread-crumbs"> |
||||
<a href="/">{% trans 'Главная страница' %}</a> |
||||
<a href="{{ object.catalog }}">{% trans 'Конференции' %}</a> |
||||
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a> |
||||
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a> |
||||
<a href="{{ object.get_permanent_url }}">{{ object.name }}</a> |
||||
<strong>{% trans 'Посетители' %}</strong> |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
|
||||
{% block page_title %} |
||||
{% endblock %} |
||||
|
||||
{% block content_list %} |
||||
|
||||
{% include 'includes/exposition/visitors.html' with object_list=object_list %} |
||||
{% endblock %} |
||||
|
||||
{% block paginator %} |
||||
{% include 'includes/catalog_paginator.html' with page_obj=page_obj %} |
||||
{% endblock %} |
||||
@ -0,0 +1,11 @@ |
||||
{% load static %} |
||||
{% load thumbnail %} |
||||
|
||||
|
||||
{% if obj.get_blog_preview %} |
||||
{% thumbnail obj.get_blog_preview.file_path "220x100" as im %} |
||||
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt=""> |
||||
{% endthumbnail %} |
||||
{% else %} |
||||
<img src="{% static 'client/img/_del-temp/review-1.jpg' %}" class="pic" alt="" /> |
||||
{% endif %} |
||||
@ -1,18 +1,5 @@ |
||||
{% load i18n %} |
||||
{% load template_filters %} |
||||
{% comment %} |
||||
{% if user.is_authenticated %} |
||||
{% if event|in_calendar:user %} |
||||
<a style="display:none;" class="button blue icon-calendar addcalendar" href="{{ event.get_calendar_url }}">{% trans 'в расписание' %}</a> |
||||
<a class="button blue icon-calendar removecalendar" href="{{ event.get_calendar_url }}">{% trans 'из расписания' %}</a> |
||||
{% else %} |
||||
<a class="button blue icon-calendar addcalendar" href="{{ event.get_calendar_url }}">{% trans 'в расписание' %}</a> |
||||
<a style="display:none;" class="button blue icon-calendar removecalendar" href="{{ event.get_calendar_url }}">{% trans 'из расписания' %}</a> |
||||
{% endif %} |
||||
{% else %} |
||||
<a class="button blue icon-calendar addcalendar" href="{{ event.get_calendar_url }}">{% trans 'в расписание' %}</a> |
||||
<a style="display:none;" class="button blue icon-calendar removecalendar" href="{{ event.get_calendar_url }}">{% trans 'из расписания' %}</a> |
||||
{% endif %} |
||||
{% endcomment %} |
||||
<a class="button blue icon-calendar {% if obj|in_calendar:request.user %}removecalendar {% else %}addcalendar {% endif %}" href="{{ event.get_calendar_url }}">{% if obj|in_calendar:request.user %}{% trans 'Из расписания' %}{% else %}{% trans 'В расписание' %}{% endif %}</a> |
||||
|
||||
<a class="button blue icon-calendar {% if obj|in_calendar:request.user %}removecalendar {% else %}addcalendar {% endif %}" href="{{ obj.get_calendar_url }}">{% if obj|in_calendar:request.user %}{% trans 'Из расписания' %}{% else %}{% trans 'В расписание' %}{% endif %}</a> |
||||
|
||||
|
||||
@ -0,0 +1,129 @@ |
||||
{% load static %} |
||||
{% load i18n %} |
||||
{% load template_filters %} |
||||
|
||||
<ul class="cat-list cl-exhibitions"> |
||||
{% with objects=object_list %} |
||||
{% for obj in objects %} |
||||
<li class="cl-item {% if obj.canceled %}canceled{% endif %}"> |
||||
<div class="cl-item-wrap clearfix"> |
||||
|
||||
<a href="{{ obj.get_permanent_url }}"> |
||||
{% if obj.canceled %} |
||||
<div class="cancel"></div> |
||||
{% else %} |
||||
{% if obj.expohit %} |
||||
<div class="hit"></div> |
||||
{% endif %} |
||||
{% endif %} |
||||
<div class="cli-pict"> |
||||
{% with obj=obj %} |
||||
{% include 'client/includes/show_logo.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
</a> |
||||
|
||||
|
||||
<div class="cli-info"> |
||||
<div class="cli-top clearfix"> |
||||
|
||||
|
||||
{% if obj.quality_label.ufi.is_set %} |
||||
<div class="cli-approved"> |
||||
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
|
||||
<header> |
||||
<div class="cli-title"><a href="{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></div> |
||||
</header> |
||||
<div class="cli-descr"> |
||||
{{ obj.main_title|safe }} |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="cli-bot clearfix"> |
||||
|
||||
<div class="cli-date"> |
||||
{% with obj=obj %} |
||||
{% include 'client/includes/show_date_block.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
|
||||
{% if obj.country %} |
||||
<div class="cli-place"> |
||||
<a href="{{ obj.catalog }}country/{{ obj.country.url }}/">{{ obj.country }}</a>, <a href="{{ obj.catalog }}city/{{ obj.city.url }}/">{{ obj.city }}</a> |
||||
|
||||
{% if obj.place %} |
||||
, <a href="/places/{{ obj.place.url }}/">{{ obj.place }}</a> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<div class="cli-buttons clearfix"> |
||||
<div class="cli-m-buttons"> |
||||
{% include 'client/includes/exposition/services.html' with obj=obj %} |
||||
|
||||
{% include 'client/includes/calendar_button.html' with obj=obj%} |
||||
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}"> |
||||
{% with note=obj|note_by_user:request.user %} |
||||
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/conference/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a> |
||||
<div class="note-overlay"> |
||||
<form action=""> |
||||
<textarea name="note_text" class="note-text"> {{ note }}</textarea> |
||||
</form> |
||||
</div> |
||||
{% endwith %} |
||||
</div> |
||||
{% if request.user.is_admin %} |
||||
<div class="note-wrap"> |
||||
<a class="button green " href="/admin/conference/{{ obj.url }}/">{% trans 'изменить' %}</a> |
||||
</div> |
||||
{% endif %} |
||||
<div></div> |
||||
|
||||
</div> |
||||
|
||||
<div class="cli-s-buttons"> |
||||
{% include 'client/buttons/booking_button.html' with object=obj %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<footer class="clearfix"> |
||||
<div class="cli-stats"> |
||||
{% if obj.visitors %} |
||||
<span class="visitors" title="Посетители">{{ obj.visitors }}</span> |
||||
{% endif %} |
||||
{% if obj.members %} |
||||
<span class="participants" title="Участники">{{ obj.members }}</span> |
||||
{% endif %} |
||||
</div> |
||||
<div class="cli-tags"> |
||||
{% include 'client/includes/exposition/tags.html' with obj=obj %} |
||||
</div> |
||||
</footer> |
||||
</li> |
||||
|
||||
{% endfor %} |
||||
{% endwith %} |
||||
</ul> |
||||
{% block scripts %} |
||||
<script src="{% static 'client/js' %}{% if debug %}/{% else %}_min/{% endif %}_modules/block.exposition.list{% if debug %}{% else %}.min{% endif %}.js"></script> |
||||
<script> |
||||
EXPO.exposition.list.init({ |
||||
note:{ |
||||
wrapClass:'note-wrap', |
||||
wrapDisabledClass:'note-wrap-disabled', |
||||
buttonClass:'note-button', |
||||
inputClass:'note-text' |
||||
}, |
||||
addCalendarText:"{% trans 'В расписание' %}", |
||||
removeCalendarText:"{% trans 'Из расписания' %}" |
||||
}); |
||||
</script> |
||||
{% endblock %} |
||||
@ -0,0 +1,396 @@ |
||||
{% load static %} |
||||
{% load i18n %} |
||||
{% load thumbnail %} |
||||
{% load template_filters %} |
||||
|
||||
{% block page_body %} |
||||
<div class="m-article event-page"> |
||||
<div class="item-wrap event clearfix"> |
||||
<aside> |
||||
{% if event.expohit %} |
||||
<div class="hit"></div> |
||||
{% endif %} |
||||
<div class="i-pict"> |
||||
{% with obj=event %} |
||||
{% include 'client/includes/show_logo.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
<!-- |
||||
<div class="i-rating" title="Рейтинг: 551">551</div> |
||||
--> |
||||
<div class="i-stats"> |
||||
{% if event.visitors %} |
||||
<span class="visitors" title="Посетители">{{ event.visitors }}</span> |
||||
{% endif %} |
||||
{% if event.members %} |
||||
<span class="participants" title="Участники">{{ event.members }}</span> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
<div class="i-discount"> |
||||
{% if event.discount %} |
||||
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ event.discount }}%</a> |
||||
<div class="dsc-text">{{ event.discount_description|safe|linebreaks }}</div> |
||||
{% endif %} |
||||
</div> |
||||
</aside> |
||||
|
||||
<div class="i-info"> |
||||
<header> |
||||
<div class="i-title"> |
||||
{% if event.main_title %} |
||||
{{ event.main_title|safe }} {{ event.name|safe }} |
||||
{% else %} |
||||
{{ event.name|safe }} |
||||
{% endif %} |
||||
</div> |
||||
</header> |
||||
|
||||
<div class="i-date"> |
||||
{% with obj=event %} |
||||
{% include 'client/includes/show_date_block.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
{% if event.place %} |
||||
<div class="i-address"> |
||||
<header> |
||||
<div class="address"> |
||||
{{ event.place.adress }} |
||||
</div> |
||||
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div> |
||||
</header> |
||||
|
||||
<div class="i-map"> |
||||
<div class="close-map"><a class="toggle-map" href="#">{% trans 'Скрыть карту' %}</a> |
||||
</div> |
||||
<div class="map-canvas" id="map-canvas" data-coords="{{ event.place.address.lat|stringformat:'f' }},{{ event.place.address.lng|stringformat:'f' }}" ></div> |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
<hr /> |
||||
<div class="i-buttons clearfix"> |
||||
<div class="ib-main"> |
||||
{% with event=event user=user %} |
||||
{% include 'client/includes/visit_button.html' %} |
||||
{% endwith %} |
||||
{% include 'client/includes/calendar_button.html' with obj=object %} |
||||
<div class="{% if request.user.is_authenticated%}note-wrap{% else %}note-wrap-disabled{% endif %}"> |
||||
{% with note=object|note_by_user:request.user %} |
||||
<a class="button green icon-note {% if note %}active{% endif %} note-button" href="/expo/add-note/{{ obj.url }}/">{% trans 'заметка' %}</a> |
||||
<div class="note-overlay"> |
||||
<form action=""> |
||||
<textarea name="note_text" class="note-text"> {{ note }}</textarea> |
||||
</form> |
||||
</div> |
||||
{% endwith %} |
||||
</div> |
||||
|
||||
{% if request.user.is_admin %} |
||||
<a class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a> |
||||
{% endif %} |
||||
|
||||
</div> |
||||
|
||||
<div class="ib-add"><a class="button blue2 icon-find" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ object.city.id }}">{% trans 'Найти отель' %}</a></div> |
||||
|
||||
</div> |
||||
<hr /> |
||||
<div class="i-divs clearfix"> |
||||
<div class="i-subj"> |
||||
<ul> |
||||
{% with themes=event.theme.all %} |
||||
{% for theme in themes %} |
||||
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.conferences_number }})</a></li> |
||||
{% endfor %} |
||||
{% endwith %} |
||||
|
||||
</ul> |
||||
</div> |
||||
|
||||
<div class="i-tags"> |
||||
{% with tags=event.tag.all %} |
||||
{% for tag in tags %} |
||||
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %} |
||||
{% endfor %} |
||||
{% endwith %} |
||||
|
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% include 'client/includes/exposition/exposition_services.html' %} |
||||
|
||||
{% include 'includes/event_steps.html' with event=event %} |
||||
|
||||
{% if event.get_photos %} |
||||
{% with photos=event.get_photos|slice:"5" %} |
||||
<hr /> |
||||
|
||||
<div class="i-photo-slides"> |
||||
<div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></div> |
||||
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container"> |
||||
<ul class="swiper-wrapper"> |
||||
{% for photo in photos %} |
||||
<li class="swiper-slide"> |
||||
<img src="{{ photo.get_display_url }}" alt="" /> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
<div class="re-controls"> |
||||
<a class="prev" href="#"><</a> |
||||
<a class="next" href="#">></a> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endwith %} |
||||
{% endif %} |
||||
{% if event.description %} |
||||
<div class="i-event-description"> |
||||
|
||||
<div class="ied-title">{% trans 'О выставке' %} {{ event.name|safe }}</div> |
||||
<div class="ied-text">{{ event.description|safe|linebreaks }}</div> |
||||
</div> |
||||
<hr /> |
||||
{% endif %} |
||||
<div class="i-event-additional clearfix"> |
||||
<div class="sect-title">{% trans 'Дополнительная информация' %}</div> |
||||
<ul class="e-docs"> |
||||
|
||||
{% if event.business_program.exists %} |
||||
<li><a href="{{ event.get_permanent_url }}program/">{% trans 'Деловая программа' %}</a></li> |
||||
{% endif %} |
||||
|
||||
</ul> |
||||
<dl class="add-info"> |
||||
{% if event.organiser.all|length > 0 %} |
||||
<dt>{% trans 'Организатор' %}:</dt> |
||||
<dd> |
||||
{% with organisers=event.organiser.all %} |
||||
{% for organiser in organisers %} |
||||
{{ organiser.name }}<br /> |
||||
{% endfor %} |
||||
{% endwith %} |
||||
</dd> |
||||
{% endif %} |
||||
{% if event.web_page %} |
||||
<dt>{% trans 'Веб-сайт' %}:</dt> |
||||
<dd> |
||||
<a target="_blank" href="#" data-type="href" data-hash="1qwer" data-url="{{ event.web_page|base64_encode }}" class="link-encode">{{ event.web_page }}</a> |
||||
</dd> |
||||
{% endif %} |
||||
|
||||
{% if event.get_audience %} |
||||
<dt>{% trans 'Аудитория' %}:</dt> |
||||
<dd> |
||||
{{ event.get_audience }} |
||||
</dd> |
||||
{% endif %} |
||||
|
||||
{% if event.get_periodic %} |
||||
<dt>{% trans 'Периодичность' %}:</dt> |
||||
<dd>{{ event.get_periodic }}</dd> |
||||
{% endif %} |
||||
|
||||
|
||||
{% if event.time %} |
||||
<dt>{% trans 'Время работы' %}:</dt> |
||||
<dd>{{ event.time|safe }}</dd> |
||||
{% endif %} |
||||
|
||||
</dl> |
||||
|
||||
</div> |
||||
<hr /> |
||||
<div class="i-members clearfix"> |
||||
<div class="im-participants"> |
||||
{% with companies=event.company.all|slice:":6" %} |
||||
{% if companies %} |
||||
{# есть участники #} |
||||
<header> |
||||
<div class="im-title">{% trans 'Участники' %}</div> |
||||
|
||||
<a class="more" href="{{ event.get_permanent_url }}members/">{% trans 'Все участники' %}</a> |
||||
</header> |
||||
<ul> |
||||
{% for company in companies %} |
||||
|
||||
<li> |
||||
<a href="{{ company.get_permanent_url }}"> |
||||
<span class="imp-pict"> |
||||
|
||||
{% with obj=company %} |
||||
{% include 'includes/show_logo.html' %} |
||||
{% endwith %} |
||||
</span> |
||||
{{ company.name }} |
||||
</a> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
{% else %} |
||||
{# нет участников #} |
||||
<header> |
||||
<div class="im-title">{% trans 'Участники' %}</div> |
||||
<p>{% trans 'Привлекайте целевых посетителей на стенд' %}</p> |
||||
<!--//todo: обработчик--> |
||||
<p><a href="#pw-advertise" class="button icon-up pw-open" >Рекламировать участника</a></p> |
||||
</header> |
||||
{% endif %} |
||||
{% endwith %} |
||||
</div> |
||||
|
||||
<div class="im-visitors"> |
||||
{% with visitors=event.users.all|slice:":17" %} |
||||
<header> |
||||
<div class="im-title">{% trans 'Посетители' %}</div> |
||||
</header> |
||||
<ul id="visitors-list"> |
||||
{% if visitors %} |
||||
{# есть посетители #} |
||||
{% for user in visitors %} |
||||
{% if user == request.user %} |
||||
<li class="current"><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }} {% if user.company %}({{ user.company.name }}){% endif %}</a></li> |
||||
{% else %} |
||||
<li><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }} {% if user.company %}({{ user.company.name }}){% endif %}</a></li> |
||||
{% endif %} |
||||
{% endfor %} |
||||
{% endif %} |
||||
|
||||
</ul> |
||||
<a id="somebody" class=" more mb-1em {% if visitors|length > 0 %}{%else%}hidden{% endif %}" href="{{ event.get_permanent_url }}visitors/">{% trans 'Все посетители' %}</a> |
||||
{% endwith %} |
||||
|
||||
<p id="nobody" class=" mb-1em {% if event.users.all|length > 0 %}hidden{% else %}{% endif %}">{% trans 'Пока никто не отметился на событии.' %}</p> |
||||
|
||||
|
||||
{% with event=event user=user %} |
||||
{% include 'client/includes/visit_button.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
</div> |
||||
|
||||
|
||||
<hr/> |
||||
|
||||
{% if event.members or event.visitors or event.foundation_year %} |
||||
<div class="e-num-info"> |
||||
|
||||
<div class="eni-stats"> |
||||
|
||||
{% if event.members %} |
||||
<div class="enis-item"><b>{{ event.members }}</b> {% trans 'участников' %}</div> |
||||
{% endif %} |
||||
{% if event.visitors %} |
||||
<div class="enis-item"><b>{{ event.visitors }}</b> {% trans 'посетителей' %}</div> |
||||
{% endif %} |
||||
{% if event.foundation_year %} |
||||
<div class="eni-founded">{% trans 'Основано в' %} <b>{{ event.foundation_year }}</b> {% trans 'году' %}</div> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
|
||||
|
||||
|
||||
</div> |
||||
|
||||
{% include 'client/includes/booking_block.html' with city=event.city place=event.place %} |
||||
|
||||
<hr /> |
||||
{% if event.get_nearest_events|slice:":6" %} |
||||
<div class="e-cat"> |
||||
<div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme/{{ event.theme.all.0.url }}">«{{ event.theme.all.0 }}»</a></div> |
||||
<ul class="cat-list cl-exhibitions"> |
||||
{% for exp in event.get_nearest_events %} |
||||
<li class="cl-item"> |
||||
<div class="cl-item-wrap clearfix"> |
||||
<a href="{{ exp.get_permanent_url }}"> |
||||
<div class="cli-pict"> |
||||
{% with obj=exp %} |
||||
{% include 'client/includes/show_logo.html' %} |
||||
{% endwith %} |
||||
|
||||
</div> |
||||
</a> |
||||
<div class="cli-info"> |
||||
<div class="cli-top clearfix"> |
||||
{% if exp.approved %} |
||||
<div class="cli-approved"> |
||||
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> |
||||
</div> |
||||
{% endif %} |
||||
<header> |
||||
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div> |
||||
</header> |
||||
|
||||
<div class="cli-descr"> |
||||
{{ exp.main_title|safe|linebreaks }} |
||||
</div> |
||||
|
||||
<div class="cli-bot clearfix"> |
||||
<div class="cli-date"> |
||||
{% with obj=exp %} |
||||
{% include 'client/includes/show_date_block.html' %} |
||||
{% endwith %} |
||||
</div> |
||||
<div class="cli-place"> |
||||
<a href="{{ exp.country.get_permanent_url }}">{{ exp.country }}</a>, <a href="{{ exp.city.get_permanent_url }}">{{ exp.city }}</a> |
||||
{% if exp.place %} |
||||
, <a href="{{ exp.place.get_permanent_url }}">{{ exp.place }}</a> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
</div> |
||||
{% endif %} |
||||
<!-- |
||||
<div class="abn"><a href="#"><img src="{% static 'client/img/_del-temp/banner-2.gif' %}" alt="" /></a></div> |
||||
--> |
||||
<div class="e-cat look-also"> |
||||
<div class="sect-title">{% trans 'Смотрите также:' %}</div> |
||||
<a href="{{ event.catalog }}city/{{ event.city.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a> |
||||
<a href="{{ event.catalog }}country/{{ event.country.url }}/">{% trans "Конференции" %} {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a> |
||||
<a href="{{ event.catalog }}theme/{{ event.theme.all.0.url }}/country/{{ event.country.url }}/">{% trans "Конференции по тематике " %}«{{ event.theme.all.0.name|lower }}» {% if request.LANGUAGE_CODE == 'ru' and event.country.inflect %}{{ event.country.inflect }}{% else %}{% trans 'in' %} {{ event.country.name }}{% endif %}</a> |
||||
<a href="{{ event.catalog }}theme/{{ event.theme.all.0.url }}/city/{{ event.city.url }}/">{% trans "Конференции по тематике " %}«{{ event.theme.all.0.name|lower }}» {% if request.LANGUAGE_CODE == 'ru' and event.city.inflect %}{{ event.city.inflect }}{% else %}{% trans 'in' %} {{ event.city.name }}{% endif %}</a> |
||||
</div> |
||||
|
||||
{% endblock %} |
||||
{% block content_text %} |
||||
{% endblock %} |
||||
|
||||
{% block popup %} |
||||
{% include 'client/popups/advertise_member.html' with form=advertising_form %} |
||||
{% endblock %} |
||||
{% block scripts %} |
||||
<!-- todo: вернуть .min--> |
||||
<!--<script src="{% static 'client/js' %}{% if debug %}/{% else %}_min/{% endif %}_modules/page.exposition.object{% if debug %}{% else %}.min{% endif %}.js"></script>--> |
||||
<script src="{% static 'client/js/_modules/page.exposition.object.js' %}"></script> |
||||
<script> |
||||
EXPO.exposition.object.init({ |
||||
visit:{ |
||||
activeClass:"visit", |
||||
passiveClass:"unvisit", |
||||
currentHtml:'<li class="current"><a href="{{ request.user.get_permanent_url }}">{{ request.user.get_full_name }} {% if request.user.company %}({{ request.user.company.name }}){% endif %}</a></li>', |
||||
visitorsListId:"visitors-list", |
||||
somebodyId:"somebody", |
||||
nobodyId:"nobody" |
||||
}, |
||||
note:{ |
||||
wrapClass:'note-wrap', |
||||
wrapDisabledClass:'note-wrap-disabled', |
||||
buttonClass:'note-button', |
||||
inputClass:'note-text' |
||||
}, |
||||
advertise:{ |
||||
id:"advert-member-form" |
||||
}, |
||||
addCalendarText:"{% trans 'В расписание' %}", |
||||
removeCalendarText:"{% trans 'Из расписания' %}" |
||||
}); |
||||
</script> |
||||
{% endblock %} |
||||
@ -1,5 +1,5 @@ |
||||
{% with tags=obj.tags %} |
||||
{% for tag in tags %} |
||||
<a href="{{ obj.catalog }}tag/{{ tag.url }}">{{ tag.name }}</a>, |
||||
<a href="{{ obj.catalog }}tag/{{ tag.url }}">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %} |
||||
{% endfor %} |
||||
{% endwith %} |
||||
@ -0,0 +1,21 @@ |
||||
{% load i18n %} |
||||
{% load static %} |
||||
|
||||
<div class="mp-reviews"> |
||||
<header> |
||||
<div class="mpr-title"><a href="/blogs/">{% trans 'Обзоры и аналитика' %}</a></div> |
||||
<div class="more-link"><a class="more" href="/blogs/">{% trans 'Все обзоры' %}</a></div> |
||||
</header> |
||||
<ul> |
||||
{% for blog in blogs %} |
||||
<li> |
||||
<a href="{{ blog.get_permanent_url }}"> |
||||
<span class="mpr-pict"> |
||||
{% include 'client/includes/article/article_on_main_preview.html' with obj=blog %} |
||||
</span> |
||||
<span class="mpr-text">{{ blog.main_title }}</span> |
||||
</a> |
||||
</li> |
||||
{% endfor %} |
||||
</ul> |
||||
</div> |
||||
Loading…
Reference in new issue