ExpoBanner. Finale

remotes/origin/1203
Kotiuk Nazarii 11 years ago
parent 3450aa0968
commit 6b94fc665d
  1. 8
      expobanner/admin.py
  2. 8
      expobanner/forms.py
  3. 1
      expobanner/models.py
  4. 56
      expobanner/utils.py
  5. 21
      expobanner/views.py
  6. 8
      exposition/forms.py
  7. 6
      exposition/models.py
  8. 4
      exposition/views.py
  9. 1
      proj/urls.py
  10. 20
      settings/views.py
  11. 1
      templates/admin/expobanner/default_form.html
  12. 2
      templates/admin/expobanner/link_list.html
  13. 2
      templates/admin/expobanner/main_list.html
  14. 48
      templates/admin/expobanner/main_stat.html
  15. 4
      templates/admin/expobanner/paid_stat.html
  16. 1
      templates/admin/includes/admin_nav.html
  17. 2
      templates/client/base_catalog.html
  18. 69
      templates/client/blank.html
  19. 28
      templates/client/expobanners/banner_stat.html
  20. 30
      templates/client/expobanners/paid_stat.html
  21. 69
      templates/client/exposition/exposition_detail.html
  22. 2
      templates/client/includes/banners/popup.html
  23. 6
      templates/client/includes/exposition/expo_top.html

@ -204,7 +204,13 @@ def main_turn(request, pk, status):
class MainStat(DetailView): class MainStat(DetailView):
model = MainPage model = MainPage
template_name = 'admin/expobanner/paid_stat.html' template_name = 'admin/expobanner/main_stat.html'
def get_context_data(self, **kwargs):
context = super(MainStat, self).get_context_data(**kwargs)
obj = self.object
context['stats'] = obj.link.banner_stat.all()
return context
# ------------------------------------ # ------------------------------------

@ -3,7 +3,7 @@ from django import forms
from expobanner.models import URL, BannerGroup, Banner, Paid, Top, MainPage from expobanner.models import URL, BannerGroup, Banner, Paid, Top, MainPage
from exposition.models import Exposition from exposition.models import Exposition
from country.models import Country from country.models import Country
from city.models import City from ckeditor.widgets import CKEditorWidget
from theme.models import Theme, Tag from theme.models import Theme, Tag
@ -32,7 +32,7 @@ class BannerGroupUpdateForm(BannerCreateGroupForm):
class BannerCreateForm(forms.ModelForm): class BannerCreateForm(forms.ModelForm):
verbose = u'Создать банер' verbose = u'Создать банер'
text = forms.CharField(label=u'Текст', required=False, widget=CKEditorWidget)
class Meta: class Meta:
model = Banner model = Banner
exclude = ['created_at', 'updated_at', 'often', 'paid', 'stat_pswd', 'cookie', 'link'] exclude = ['created_at', 'updated_at', 'often', 'paid', 'stat_pswd', 'cookie', 'link']
@ -209,10 +209,14 @@ class TopCreateForm(forms.ModelForm):
if commit: if commit:
expo = self.cleaned_data['exposition'] expo = self.cleaned_data['exposition']
link = expo.get_permanent_url()
link_b = Banner.objects.create_for_paid(expo, link, 'top_link')
top.link = link_b
top.save() top.save()
self.save_m2m() self.save_m2m()
expo.top = top expo.top = top
expo.save() expo.save()
return top return top
def clean_theme(self): def clean_theme(self):

@ -243,6 +243,7 @@ class PaidStat(models.Model):
class Top(models.Model, StatMixin): class Top(models.Model, StatMixin):
link = models.ForeignKey(Banner)
catalog = models.CharField(max_length=16, verbose_name=u'Каталог для топа') catalog = models.CharField(max_length=16, verbose_name=u'Каталог для топа')
position = models.PositiveIntegerField(blank=True, default=2, null=True, verbose_name=u'Позиция') position = models.PositiveIntegerField(blank=True, default=2, null=True, verbose_name=u'Позиция')
theme = models.ManyToManyField('theme.Theme', blank=True, null=True, verbose_name=u'Тематики') theme = models.ManyToManyField('theme.Theme', blank=True, null=True, verbose_name=u'Тематики')

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re
import random import random
import datetime
from django.db import connection from django.db import connection
def get_client_ip(request): def get_client_ip(request):
@ -10,6 +12,32 @@ def get_client_ip(request):
ip = request.META.get('REMOTE_ADDR') ip = request.META.get('REMOTE_ADDR')
return ip return ip
def get_referer_view(request, default=None):
'''
Return the referer view of the current request
Example:
def some_view(request):
...
referer_view = get_referer_view(request)
return HttpResponseRedirect(referer_view, '/accounts/login/')
'''
# if the user typed the url directly in the browser's address bar
referer = request.META.get('HTTP_REFERER')
if not referer:
return default
# remove the protocol and split the url at the slashes
referer = re.sub('^https?:\/\/', '', referer).split('/')
if referer[0] != request.META.get('SERVER_NAME'):
return default
# add the slash at the relative path's view and finished
referer = u'/' + u'/'.join(referer[1:])
return referer
def get_by_sort(banner_list): def get_by_sort(banner_list):
max_sort = 0 max_sort = 0
for banner in banner_list: for banner in banner_list:
@ -19,6 +47,15 @@ def get_by_sort(banner_list):
result = [banner for banner in banner_list if banner.sort == max_sort] result = [banner for banner in banner_list if banner.sort == max_sort]
return result return result
def set_cookie(response, key, value, days_expire = 7):
if days_expire is None:
max_age = 365 * 24 * 60 * 60 #one year
else:
max_age = days_expire * 24 * 60 * 60
expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=max_age), "%a, %d-%b-%Y %H:%M:%S GMT")
response.set_cookie(key, value, max_age=max_age, expires=expires)
return response
def get_banner_by_params(banners_list, urls, params, request): def get_banner_by_params(banners_list, urls, params, request):
thematic_banners = [] thematic_banners = []
@ -69,14 +106,18 @@ def get_banner_by_params(banners_list, urls, params, request):
continue continue
if thematic_banners: if thematic_banners:
return random.choice(thematic_banners) result = thematic_banners
if url_banners: elif url_banners:
return random.choice(url_banners) result = url_banners
return None else:
result = []
#print('END. NUMBER of queries = %d'%len(connection.queries)) if result:
sort_result = get_by_sort(result)
return random.choice(sort_result)
else:
return None
def get_top_events(tops, params): def get_top_events(tops, params, request):
catalog = params.get('catalog') catalog = params.get('catalog')
country = params.get('country', '') country = params.get('country', '')
theme = params.get('theme', []) theme = params.get('theme', [])
@ -113,5 +154,6 @@ def get_top_events(tops, params):
for top in sorted_top: for top in sorted_top:
event = top.get_event() event = top.get_event()
if event: if event:
top.link.log(request, 1)
events.append(event) events.append(event)
return events return events

@ -6,7 +6,7 @@ from django.shortcuts import redirect, get_object_or_404
from django.shortcuts import render_to_response from django.shortcuts import render_to_response
from django.template import RequestContext from django.template import RequestContext
from .models import Banner, BannerGroup, URL, Top from .models import Banner, BannerGroup, URL, Top
from expobanner.utils import get_by_sort, get_banner_by_params, get_client_ip, get_top_events from expobanner.utils import get_banner_by_params, get_client_ip, get_top_events, get_referer_view, set_cookie
def click(request, banner_id): def click(request, banner_id):
@ -21,8 +21,7 @@ def view(request, banner_id):
return redirect(banner.img.url) return redirect(banner.img.url)
def get_banners(request): def get_banners(request):
#url = request.GET.get('url', '/') url = get_referer_view(request, default='/')
url = request.META.get('HTTP_REFERER', '/')
# get urls by current url # get urls by current url
urls = URL.cached.all() urls = URL.cached.all()
good_urls = [] good_urls = []
@ -42,7 +41,7 @@ def get_banners(request):
group_banners = BannerGroup.cached.group_banners() group_banners = BannerGroup.cached.group_banners()
result = [] result = []
set_cookie = None cookie = None
# get banners for all groups # get banners for all groups
places = request.GET.getlist('places', []) places = request.GET.getlist('places', [])
@ -59,7 +58,10 @@ def get_banners(request):
is_img = False is_img = False
else: else:
text = '' text = ''
img = banner.img.url try:
img = banner.img.url
except ValueError:
continue
alt = banner.alt alt = banner.alt
is_img = True is_img = True
result.append({'id': group, result.append({'id': group,
@ -73,12 +75,13 @@ def get_banners(request):
'text': text 'text': text
}) })
if banner.popup: if banner.popup:
set_cookie = banner.cookie cookie = banner.cookie
# add view log # add view log
banner.log(request, 1) banner.log(request, 1)
response = HttpResponse(json.dumps(result, indent=4), content_type='application/json') response = HttpResponse(json.dumps(result, indent=4), content_type='application/json')
if set_cookie: if cookie:
response.set_cookie(set_cookie, 1) response = set_cookie(response, cookie, '1')
return response return response
def get_top(request): def get_top(request):
@ -89,6 +92,6 @@ def get_top(request):
'catalog': request.GET.get('catalog')} 'catalog': request.GET.get('catalog')}
tops = Top.cached.all() tops = Top.cached.all()
events = get_top_events(tops, params) events = get_top_events(tops, params, request)
context = {'objects': events} context = {'objects': events}
return render_to_response('client/includes/exposition/expo_top.html', context, context_instance=RequestContext(request)) return render_to_response('client/includes/exposition/expo_top.html', context, context_instance=RequestContext(request))

@ -2,8 +2,6 @@
from django import forms from django import forms
from django.conf import settings from django.conf import settings
from ckeditor.widgets import CKEditorWidget from ckeditor.widgets import CKEditorWidget
from tinymce.widgets import TinyMCE
from django.core.exceptions import ValidationError
from django.forms.util import ErrorList from django.forms.util import ErrorList
from django.core.validators import validate_email, URLValidator from django.core.validators import validate_email, URLValidator
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
@ -13,15 +11,11 @@ from theme.models import Tag
from country.models import Country from country.models import Country
from theme.models import Theme from theme.models import Theme
from organiser.models import Organiser from organiser.models import Organiser
from accounts.models import User
from company.models import Company
from city.models import City from city.models import City
from service.models import Service
from place_exposition.models import PlaceExposition from place_exposition.models import PlaceExposition
#functions #functions
from functions.translate import populate_all, fill_trans_fields_all, fill_with_signal from functions.translate import fill_with_signal
from functions.form_check import is_positive_integer from functions.form_check import is_positive_integer
from functions.files import check_tmp_files
from functions.form_check import translit_with_separator from functions.form_check import translit_with_separator
from settings.settings import date_formats from settings.settings import date_formats
from functions.admin_forms import AdminFilterForm from functions.admin_forms import AdminFilterForm

@ -313,6 +313,12 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin):
else: else:
return self.get_permanent_url() return self.get_permanent_url()
def get_top_link(self):
if self.top:
return self.top.link.get_click_link()
else:
return self.get_permanent_url()
class Statistic(TranslatableModel): class Statistic(TranslatableModel):
exposition = models.ForeignKey(Exposition, related_name='statistic') exposition = models.ForeignKey(Exposition, related_name='statistic')

@ -433,7 +433,9 @@ class ExpoCityCatalog(ExpoCatalog):
return qs return qs
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(ExpoCityCatalog, self).get_context_data(**kwargs) context = super(ExpoCityCatalog, self).get_context_data(**kwargs)
context['city'] = str(self.kwargs['city'].id) city = self.kwargs['city']
context['country'] = str(city.country_id)
context['city'] = str(city.id)
return context return context

@ -78,7 +78,6 @@ urlpatterns = patterns('',
# ajax urls # ajax urls
urlpatterns += patterns('', urlpatterns += patterns('',
url(r'^ajax/get_popover/$', 'settings.views.get_popover_info'),
url(r'^registration/reply/$', 'registration.backends.default.views.RegisterReply'), url(r'^registration/reply/$', 'registration.backends.default.views.RegisterReply'),
url(r'^register/', 'registration.backends.default.views.RegisterAjaxView'), url(r'^register/', 'registration.backends.default.views.RegisterAjaxView'),
url(r'^register-complete/', 'registration.backends.default.views.complete_registration'), url(r'^register-complete/', 'registration.backends.default.views.complete_registration'),

@ -160,23 +160,3 @@ def get_popover(request):
response['html'] = html response['html'] = html
return HttpResponse(json.dumps(response), content_type='application/json') return HttpResponse(json.dumps(response), content_type='application/json')
from banners.models import Redirect
from django.db.models import F
import datetime
def set_cookie(response, key, value, days_expire = 7):
if days_expire is None:
max_age = 365 * 24 * 60 * 60 #one year
else:
max_age = days_expire * 24 * 60 * 60
expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=max_age), "%a, %d-%b-%Y %H:%M:%S GMT")
response.set_cookie(key, value, max_age=max_age, expires=expires)
def get_popover_info(request):
id = request.GET.get('rdr')
if id:
Redirect.objects.filter(id=id).update(views = F('views') + 1)
response = HttpResponse('success')
set_cookie(response, 'popover_test1', '1')
return response

@ -2,6 +2,7 @@
{% load static %} {% load static %}
{% block scripts %} {% block scripts %}
<script src="{% static 'ckeditor/ckeditor/ckeditor.js' %}"></script>
<link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/> <link href="{% static 'js/select/select2.css' %}" rel="stylesheet"/>
<script src="{% static 'js/select/select2.js' %}"></script> <script src="{% static 'js/select/select2.js' %}"></script>
<script> <script>

@ -22,7 +22,7 @@
{% for item in object_list %} {% for item in object_list %}
<tr> <tr>
<td>{{ item }}</td> <td>{{ item }}</td>
<td>{{request.get_host}}{{ item.get_click_link }}</td> <td>{{request.get_host}}{{ item.get_click_link }}</td>
<td><a href="{% url 'expobanner-update_link' item.id %}">Изменить</a> </td> <td><a href="{% url 'expobanner-update_link' item.id %}">Изменить</a> </td>
<td><a href="{% url 'expobanner_stat_link' item.id %}">Статистика</a> </td> <td><a href="{% url 'expobanner_stat_link' item.id %}">Статистика</a> </td>
</tr> </tr>

@ -13,6 +13,7 @@
<thead> <thead>
<tr> <tr>
<th>Выставка</th> <th>Выставка</th>
<th>Позиция</th>
<th>&nbsp;</th> <th>&nbsp;</th>
<th>&nbsp;</th> <th>&nbsp;</th>
<th>&nbsp;</th> <th>&nbsp;</th>
@ -22,6 +23,7 @@
{% for item in object_list %} {% for item in object_list %}
<tr> <tr>
<td>{{ item }}</td> <td>{{ item }}</td>
<td>{{ item.main.position }}</td>
<td><a href="{% url 'expobanner-update_main' item.main.id %}">Изменить</a> </td> <td><a href="{% url 'expobanner-update_main' item.main.id %}">Изменить</a> </td>
<td>{% if item.main.public %}<a href="{% url 'expobanner-main-turn' item.main.id 'off' %}">отключить</a>{% else %}<a href="{% url 'expobanner-main-turn' item.main.id 'on' %}">включить</a>{% endif %} </td> <td>{% if item.main.public %}<a href="{% url 'expobanner-main-turn' item.main.id 'off' %}">отключить</a>{% else %}<a href="{% url 'expobanner-main-turn' item.main.id 'on' %}">включить</a>{% endif %} </td>
<td><a href="{% url 'expobanner_stat_main' item.main.id %}">Статистика</a> </td> <td><a href="{% url 'expobanner_stat_main' item.main.id %}">Статистика</a> </td>

@ -0,0 +1,48 @@
{% extends 'base.html' %}
{% load static %}
{% block scripts %}
<script src="{% static 'js/jquery.dataTables.min.js' %}"></script>
{% endblock %}
{% block body %}
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header well" data-original-title>
<h2><i class="icon-align-justify"></i> {{ object.get_event }}</h2>
</div>
<div class="box-content">
<div class="row-fluid">
<div class="span8">Линк на статистику: <b>{{ request.get_host }}/expo-b/banner/{{ object.link.id }}/stat/</b></div>
<div class="span4">Пароль: <b>{{ object.link.stat_pswd }}</b></div>
</div>
<table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead>
<tr>
<th>Дата</th>
<th>Показы</th>
<th>Клики</th>
<th>Уникальные показы</th>
<th>Уникальные клики</th>
</tr>
</thead>
<tbody>
{% with stats=stats %}
{% for stat in stats %}
<tr>
<td>{{ stat.date|date:"Y-m-d" }}</td>
<td>{{ stat.view }}</td>
<td>{{ stat.click }}</td>
<td>{{ stat.unique_view }}</td>
<td>{{ stat.unique_click }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}

@ -12,6 +12,10 @@
<h2><i class="icon-align-justify"></i> {{ object.get_event }} (Пароль: {{ object.stat_pswd }})</h2> <h2><i class="icon-align-justify"></i> {{ object.get_event }} (Пароль: {{ object.stat_pswd }})</h2>
</div> </div>
<div class="box-content"> <div class="box-content">
<div class="row-fluid">
<div class="span8">Линк на статистику: <b>{{ request.get_host }}/expo-b/paid/{{ object.id }}/stat/</b></div>
<div class="span4">Пароль: <b>{{ object.stat_pswd }}</b></div>
</div>
<table class="table table-striped table-bordered bootstrap-datatable datatable"> <table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead> <thead>
<tr> <tr>

@ -111,6 +111,7 @@
<li><a href="/admin/expobanners/banners/control/">Управление банерами</a></li> <li><a href="/admin/expobanners/banners/control/">Управление банерами</a></li>
<li><a href="/admin/expobanners/paid/list/">Платные выставки</a></li> <li><a href="/admin/expobanners/paid/list/">Платные выставки</a></li>
<li><a href="/admin/expobanners/top/list/">Выставки в топе</a></li> <li><a href="/admin/expobanners/top/list/">Выставки в топе</a></li>
<li><a href="/admin/expobanners/main/list/">Выставки на главной</a></li>
</ul> </ul>
</li> </li>

@ -1,4 +1,4 @@
{% extends 'blank.html' %} {% extends 'client/blank.html' %}
{% load static %} {% load static %}
{% load i18n %} {% load i18n %}

@ -129,75 +129,6 @@ This template include basic anf main styles and js files,
{% include 'client/popups/callback.html' %} {% include 'client/popups/callback.html' %}
{% include 'client/includes/banners/popup.html' %} {% include 'client/includes/banners/popup.html' %}
{% block popup_banner %} {% block popup_banner %}
{% if not request.COOKIES.popover_test1 %}
{% if theme_for_filter %}
{% if theme_for_filter.id == 54 or theme_for_filter.id == 26 or theme_for_filter.id == 22 or theme_for_filter.id == 15 or theme_for_filter.id == 44 or theme_for_filter.id == 30 %}
{% with r=False|random3 %}
{% if r == 1 %}
{% include 'client/popups/cemat_modal.html' %}
{% else %}
{% if r == 2 %}
{% include 'client/popups/cemat_banner1.html' %}
{% else %}
{% include 'client/popups/cemat_banner2.html' %}
{% endif %}
{% endif %}
{% endwith %}
{% endif %}
{% if theme_for_filter.id == 32 %}
{% with r=False|random3 %}
{% if r == 1 %}
{% include 'client/popups/cemat_modal.html' %}
{% endif %}
{% if r == 2 %}
{% include 'client/popups/cemat_banner1.html' %}
{% endif %}
{% if r == 0 %}
{% include 'client/popups/cemat_banner2.html' %}
{% endif %}
{% endwith %}
{% endif %}
<script>
$(function() {
if ($('#expo-ad-popup').length > 0){
$('#expo-form-popup').on('submit', function(e){
e.preventDefault();
var link = $('#expo-form-popup').attr('action');
window.location = link;
});
setTimeout(function(){
$.fancybox.open(
[{href: '#expo-ad-popup'}],
{}
);
var rdr = $('#expo-ad-popup').attr('data-rdr');
sendData = {'rdr': rdr};
console.log(rdr);
$.ajax({
url: '/ajax/get_popover/',
data: sendData,
type: 'GET',
async: true,
success: function(data){
console.log(data);
}
});
}, 5000);
}
});
</script>
{% endif %}
{% endif %}
{% endblock %} {% endblock %}
{# if user doesnt have url- show form #} {# if user doesnt have url- show form #}
{% if 'partial_pipeline' not in request.session %} {% if 'partial_pipeline' not in request.session %}

@ -1,5 +1,33 @@
{% extends 'base_catalog.html' %} {% extends 'base_catalog.html' %}
{% block styles %}
<style>
table {
width: 100%;
margin-bottom: 18px;
border: 1px solid #dddddd;
border-collapse: separate;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-spacing: 2px;
border-color: grey;
}
table th{
vertical-align: bottom;
font-weight: bold;
text-align: left;
}
table th. table td{
padding: 8px;
line-height: 18px;
text-align: left;
display: table-cell;
}
</style>
{% endblock %}
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">
<h1>{{ object }}. Статистика</h1> <h1>{{ object }}. Статистика</h1>

@ -1,4 +1,32 @@
{% extends 'base_catalog.html' %} {% extends 'client/base_catalog.html' %}
{% block styles %}
<style>
table {
width: 100%;
margin-bottom: 18px;
border: 1px solid #dddddd;
border-collapse: separate;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-spacing: 2px;
border-color: grey;
}
table th{
vertical-align: bottom;
font-weight: bold;
text-align: left;
}
table th. table td{
padding: 8px;
line-height: 18px;
text-align: left;
display: table-cell;
}
</style>
{% endblock %}
{% block page_title %} {% block page_title %}
<div class="page-title"> <div class="page-title">

@ -27,72 +27,3 @@
{% block paginator %} {% block paginator %}
{% endblock %} {% endblock %}
{% block popup%}
{% if not request.COOKIES.popover_test1 %}
{% with theme_ids=object.theme_ids %}
{% if 32 in theme_ids %}
{% with r=False|random3 %}
{% if r == 0 %}
{% include 'client/popups/cemat_modal.html' %}
{% endif %}
{% if r == 1 %}
{% include 'client/popups/cemat_banner1.html' %}
{% endif %}
{% if r == 2 %}
{% include 'client/popups/cemat_banner2.html' %}
{% endif %}
{% endwith %}
{% else %}
{% if 54 in theme_ids or 26 in theme_ids or 22 in theme_ids or 15 in theme_ids or 44 in theme_ids or 30 in theme_ids %}
{% with r=False|random3 %}
{% if r == 1 %}
{% include 'client/popups/cemat_modal.html' %}
{% else %}
{% if r == 2 %}
{% include 'client/popups/cemat_banner1.html' %}
{% else %}
{% include 'client/popups/cemat_banner2.html' %}
{% endif %}
{% endif %}
{% endwith %}
{% endif %}
{% endif %}
{% endwith %}
<script>
$(function() {
if ($('#expo-ad-popup').length > 0){
$('#expo-form-popup').on('submit', function(e){
e.preventDefault();
var link = $('#expo-form-popup').attr('action');
window.location = link;
});
setTimeout(function(){
$.fancybox.open(
[{href: '#expo-ad-popup'}],
{}
);
var rdr = $('#expo-ad-popup').attr('data-rdr');
sendData = {'rdr': rdr};
$.ajax({
url: '/ajax/get_popover/',
data: sendData,
type: 'GET',
async: true,
success: function(data){
console.log(data);
}
});
}, 5000);
}
});
</script>
{% endif %}
{% endblock %}

@ -1,2 +1,2 @@
<div id="expo_b_popup" class="popup-window" style="width:800px;"> <div id="expo_b_popup" class="popup-window" style="width:900px;">
</div> </div>

@ -5,10 +5,10 @@
<ul class="cat-list cl-exhibitions"> <ul class="cat-list cl-exhibitions">
{% for obj in objects %} {% for obj in objects %}
<li class="cl-item {% if obj.canceled %}canceled{% endif %}"> <li class="cl-item {% if obj.canceled %}canceled{% endif %}" style="border:1px solid #ff6600;">
<div class="cl-item-wrap clearfix"> <div class="cl-item-wrap clearfix">
{% if not obj.canceled %} {% if not obj.canceled %}
<a href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}"> <a href="{{ obj.get_top_link }}">
{% if obj.expohit %} {% if obj.expohit %}
<div class="hit"></div> <div class="hit"></div>
{% endif %} {% endif %}
@ -35,7 +35,7 @@
</div> </div>
{% endif %} {% endif %}
<header> <header>
<div class="cli-title"><a href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">{{ obj.name|safe }}</a></div> <div class="cli-title"><a href="{{ obj.get_top_link }}">{{ obj.name|safe }}</a></div>
</header> </header>
<div class="cli-descr"> <div class="cli-descr">
{{ obj.main_title|safe }} {{ obj.main_title|safe }}

Loading…
Cancel
Save