1621 upd, 1620 done

remotes/origin/stage6
Alexander Burdeiny 9 years ago
parent d1a474c338
commit 71094b4025
  1. 4
      functions/views_help.py
  2. 9
      support/d_dev/settings.py
  3. 9
      support/dev/settings.py
  4. 9
      support/prod/settings.py
  5. 196
      templates/client/includes/exposition/exposition_list.html

@ -2,6 +2,7 @@
import re
import datetime
import json
from ConfigParser import ConfigParser
from django.shortcuts import get_object_or_404
from django.core.cache import cache
@ -70,7 +71,8 @@ def get_side_items(event_type, model):
data = cache.get(key)
if data is None:
data = []
config = settings.INI_CONFIG
config = ConfigParser()
config.read(settings.INI_CONFIG_PATH)
pks = json.loads(config.get('sections', option, '[]'))
if pks:
qs = model.objects.language().filter(pk__in=pks).values_list('pk', 'name', 'url')

@ -3,6 +3,7 @@
import os
import django
from django.utils.translation import ugettext_lazy as _
from ConfigParser import ConfigParser
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
@ -506,6 +507,14 @@ CACHE_RANGE = [60, 120]
DEFAULT_POPUP_COOKIE = 'expo_b_default_popup'
INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini')
INI_CONFIG = ConfigParser()
INI_CONFIG.read(INI_CONFIG_PATH)
C_CITY_CATALOG_KEY = 'conf_city_catalog'
C_COUNTRY_CATALOG_KEY = 'conf_country_catalog'
E_CITY_CATALOG_KEY = 'expo_city_catalog'
E_COUNTRY_CATALOG_KEY = 'expo_country_catalog'
try:
from local import *
except ImportError, e:

@ -3,6 +3,7 @@
import os
import django
from django.utils.translation import ugettext_lazy as _
from ConfigParser import ConfigParser
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
@ -504,6 +505,14 @@ CACHE_RANGE = [60, 120]
DEFAULT_POPUP_COOKIE = 'expo_b_default_popup'
INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini')
INI_CONFIG = ConfigParser()
INI_CONFIG.read(INI_CONFIG_PATH)
C_CITY_CATALOG_KEY = 'conf_city_catalog'
C_COUNTRY_CATALOG_KEY = 'conf_country_catalog'
E_CITY_CATALOG_KEY = 'expo_city_catalog'
E_COUNTRY_CATALOG_KEY = 'expo_country_catalog'
try:
from local import *
except ImportError, e:

@ -3,6 +3,7 @@
import os
import django
from django.utils.translation import ugettext_lazy as _
from ConfigParser import ConfigParser
DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__))
@ -503,6 +504,14 @@ CACHE_RANGE = [60, 120]
DEFAULT_POPUP_COOKIE = 'expo_b_default_popup'
INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini')
INI_CONFIG = ConfigParser()
INI_CONFIG.read(INI_CONFIG_PATH)
C_CITY_CATALOG_KEY = 'conf_city_catalog'
C_COUNTRY_CATALOG_KEY = 'conf_country_catalog'
E_CITY_CATALOG_KEY = 'expo_city_catalog'
E_COUNTRY_CATALOG_KEY = 'expo_country_catalog'
try:
from local import *
except ImportError, e:

@ -6,9 +6,9 @@
{% include 'client/includes/banners/tops.html' %}
<ul class="cat-list cl-exhibitions">
{% for obj in objects %}
<li class="cl-item {% if obj.canceled %}canceled{% endif %}">
<div class="cl-item-wrap clearfix">
{% for obj in objects %}
<li class="cl-item {% if obj.canceled %}canceled{% endif %}">
<div class="cl-item-wrap clearfix">
{% if not obj.canceled %}
<a target="_blank" href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">
{% if obj.expohit %}
@ -29,96 +29,98 @@
{% endwith %}
</div>
{% endif %}
<div class="cli-info">
<div class="cli-top clearfix">
<div class="cli-info">
<div class="cli-top clearfix">
{% if obj.quality_label.rsva.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if obj.quality_label.exporating.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if obj.quality_label.ufi.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header>
<div class="cli-title"><a target="_blank" href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">{{ 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="/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 %}
<div class="note-wrap">
<a class="button green " href="/admin/exposition/{{ 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>
<header>
<div class="cli-title"><a target="_blank" href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">{{ 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="/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 %}
<div class="note-wrap">
<a class="button green " href="/admin/exposition/{{ 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>
{% if forloop.counter == 5 or objects|length < 5 %}
{% include 'client/includes/banners/catalog_inner_2.html' %}
{% if forloop.counter == 5 %}
{% include 'client/includes/banners/catalog_inner_2.html' %}
{% elif forloop.last and objects|length < 5 %}
{% include 'client/includes/banners/catalog_inner_2.html' %}
{% endif %}
{% if forloop.counter == 10 %}
{% include 'client/includes/banners/catalog_inner.html' %}
{%endif %}
{% endfor %}
{% if forloop.counter == 10 %}
{% include 'client/includes/banners/catalog_inner.html' %}
{%endif %}
{% endfor %}
</ul>
{% else %}
@ -139,15 +141,15 @@
{% else %}
<script src="{% static 'client/js_min/_modules/block.exposition.list.min.js' %}"></script>
{% endif %}<script>
EXPO.exposition.list.init({
note:{
wrapClass:'note-wrap',
wrapDisabledClass:'note-wrap-disabled',
buttonClass:'note-button',
inputClass:'note-text'
},
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
EXPO.exposition.list.init({
note:{
wrapClass:'note-wrap',
wrapDisabledClass:'note-wrap-disabled',
buttonClass:'note-button',
inputClass:'note-text'
},
addCalendarText:"{% trans 'В расписание' %}",
removeCalendarText:"{% trans 'Из расписания' %}"
});
</script>
{% endblock %}
{% endblock %}

Loading…
Cancel
Save