t92: сформировал ссылку на переводчиков для стран

remotes/origin/t90_expo_page
Slava Kyrachevsky 9 years ago
parent 3824c26670
commit 5ca9e32c2c
  1. 2
      apps/country/admin.py
  2. 2
      templates/c_admin/country/country_add.html
  3. 28
      templates/c_admin/country/country_list.html
  4. 4
      templates/client/specialist_catalog/catalog_detailed.html

@ -81,7 +81,7 @@ def country_change(request, url):
'logo': c.logo}
if c.capital:
data['capital'] = c.capital.id
data['capital'] = c.capital_id
#data from translated fields
for code, name in settings.LANGUAGES:

@ -50,7 +50,7 @@
{# capital #}
<div class="control-group {% if form.capital.errors %}error{% endif %}">
<label class="control-label">{{ form.capital.label }}:</label>
<div class="controls">{{ form.capital}}
<div class="controls">{{ form.capital }}
<span class="help-inline">{{ form.capital.errors }}</span>
</div>
</div>

@ -21,21 +21,21 @@
</div>
<div class="box-content">
<table class="table table-hover">
<thead>
<tr>
<thead>
<tr>
<th>id</th>
<th>Страна</th>
<th>Столица</th>
<th>Страна</th>
<th>Столица</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
</tr>
</thead>
<tbody>
{% for item in object_list %}
<tr>
<tr>
<td>{{ item.id }}</td>
<td>{{ item.name }}</td>
<td>{% ifnotequal item.capital None %}{{ item.capital }} {% endifnotequal %}</td>
<td class="center sorting_1">
<td>{{ item.name }}</td>
<td>{{ item.capital|default_if_none:'' }}</td>
<td class="center sorting_1">
<a class="btn btn-info" href="/admin/country/change/{{ item.url|lower }}">
<i class="icon-edit icon-white"></i> Изменить
</a>
@ -44,10 +44,10 @@
</a>
</td>
</tr>
</tr>
{% endfor %}
</tbody>
</table>
</tbody>
</table>
<a class="btn btn-success" href="/admin/country/add"><i class="icon-plus-sign icon-white"></i> Добавить страну</a>
</div>

@ -230,9 +230,9 @@
<div class="rqob-button">
{# вместо формы выше временно ставим ссылку на партнёров #}
{% if object.type == 1 %}
<a class="ob-text" href="#">{% trans 'заказать услугу' %}</a>
<a class="ob-text link" href="https://www.interpreters.travel/ru/new_partner_search?partner_id=44&search[city_name]={{ object.place.capital }}" target="_blank">{% trans 'найти переводчика' %}</a>
{% else %}
<a class="ob-text link" href="https://www.interpreters.travel/ru/new_partner_search?partner_id=44&search[city_name]={{ object.place }}" target="_blank">{% trans 'заказать услугу' %}</a>
<a class="ob-text link" href="https://www.interpreters.travel/ru/new_partner_search?partner_id=44&search[city_name]={{ object.place }}" target="_blank">{% trans 'найти переводчика' %}</a>
{% endif %}
</div>
</div>

Loading…
Cancel
Save