remotes/origin/1203
Назар Котюк 11 years ago
parent 11ade8477b
commit c782b59347
  1. 2
      accounts/views.py
  2. 4
      company/edit_forms.py
  3. 2
      company/edit_views.py
  4. 2
      templates/client/includes/accounts/current_user.html
  5. 2
      templates/client/includes/accounts/simple_user.html
  6. 2
      templates/client/includes/company/company_edit.html
  7. 2
      templates/client/includes/company/company_object.html
  8. 10
      templates/client/includes/show_logo.html

@ -296,7 +296,7 @@ class AvatarView(BaseProfileView):
form = self.form_class(self.request.POST, self.request.FILES, instance=profile)
profile = form.save()
if self.request.is_ajax():
im = get_thumbnail(profile.avatar, '100x100', crop='center')
im = get_thumbnail(profile.avatar, '100x100')
response = {'success': True, 'url': im.url, 'rating': profile.user.rating}
return HttpResponse(json.dumps(response), content_type='application/json')
else:

@ -37,7 +37,7 @@ class SpecializationForm(BaseForm):
class HomeForm(BaseForm):
city = forms.CharField(label='Город', required=False,
widget=forms.HiddenInput(attrs={'class': 'select2'}))
country = forms.ChoiceField(label=_(u'Страна'), choices=[(c.id, c.name) for c in Country.objects.all()], required=False,
country = forms.ChoiceField(label=_(u'Страна'), choices=[('', '')]+[(c.id, c.name) for c in list(Country.objects.all())], required=False,
widget=forms.Select(attrs={'class': 'select2'}))
def __init__(self, *args, **kwargs):
super(HomeForm, self).__init__(*args, **kwargs)
@ -109,7 +109,7 @@ class SocialForm(BaseForm):
class ThemeForm(BaseForm):
theme = forms.ModelMultipleChoiceField(queryset=Theme.objects.all())
theme = forms.ModelMultipleChoiceField(oqueryset=Theme.objects.all())
class Meta:
model = Company
fields = ('theme',)

@ -53,7 +53,7 @@ class LogoView(BaseView):
form = self.form_class(self.request.POST, self.request.FILES, instance=company)
company = form.save()
if self.request.is_ajax():
im = get_thumbnail(company.logo, '100x100', crop='center')
im = get_thumbnail(company.logo, '100x100')
response = {'success': True, 'url': im.url, 'rating': company.rating}
return HttpResponse(json.dumps(response), content_type='application/json')
else:

@ -22,7 +22,7 @@
<div id="pick-block" class="pic_block">
{% if request.user.profile.avatar %}
{% thumbnail request.user.profile.avatar "100x100" crop="center" as im %}
{% thumbnail request.user.profile.avatar "100x100" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}

@ -8,7 +8,7 @@
<aside>
<div class="i-pict">
{% if member.profile.avatar %}
{% thumbnail member.profile.avatar "100x100" crop="center" as im %}
{% thumbnail member.profile.avatar "100x100" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}

@ -20,7 +20,7 @@
<div id="pick-block" class="pic_block">
{% if company.logo %}
{% thumbnail company.logo "100x100" crop="center" as im %}
{% thumbnail company.logo "100x100" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}

@ -9,7 +9,7 @@
<aside>
<div class="i-pict">
{% if company.logo %}
{% thumbnail company.logo "100x100" crop="center" as im %}
{% thumbnail company.logo "100x100" as im %}
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}

@ -1,4 +1,5 @@
{% load static %}
{% load thumbnail %}
{% if obj.get_logo %}
{# delete after changing all logos #}
@ -9,5 +10,12 @@
{% endif %}
{% else %}
<img src="{% static 'client/img/no-logo.png' %}" class="no-logo" alt="" />
{% if obj.logo %}
{% thumbnail obj.logo "100x100" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
{% endthumbnail %}
{% else %}
<img src="{% static 'client/img/no-logo.png' %}" class="no-logo" alt="" />
{% endif %}
{% endif %}
Loading…
Cancel
Save