You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
346 lines
13 KiB
346 lines
13 KiB
{% load static %}
|
|
{% load i18n %}
|
|
{% load template_filters %}
|
|
{% load thumbnail %}
|
|
|
|
{% block page_body %}
|
|
<div class="m-article company-preview">
|
|
<div class="item-wrap clearfix">
|
|
<aside>
|
|
<div class="i-pict">
|
|
{% if company.logo %}
|
|
{% thumbnail company.logo "100x100" format="PNG" as im %}
|
|
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
|
|
{% endthumbnail %}
|
|
{% else %}
|
|
<img class="user-avatar" src="{% static 'client/img/no-logo.png' %}" width="100" height="100"/>
|
|
{% endif %}
|
|
</div>
|
|
<div class="i-rating" title="{% trans 'Рейтинг' %}: {{ company.rating }}" id="profile-rating">{{ company.rating }}</div>
|
|
|
|
</aside>
|
|
<div class="i-info">
|
|
<header>
|
|
<div class="i-title">{{ company.name|safe }}</div>
|
|
<div class="i-place p-editable editable-wrap ">
|
|
<span class="static-value">
|
|
{{ company.country.name }}, {{ company.city.name }}
|
|
</span>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="i-area brief">
|
|
{{ company.specialization|linebreaks }}
|
|
</div>
|
|
|
|
{% with themes=company.theme.all %}
|
|
<div class="i-area" id="theme-inf" data-theme="{% for th in themes %}{{ th.id }},{% endfor %}">
|
|
{% for th in themes %}
|
|
<a href="/members/theme/{{ th.url }}">{{ th.name }}</a>{% ifnotequal forloop.counter themes|length %},{% endifnotequal %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endwith %}
|
|
<hr />
|
|
|
|
|
|
{% if company.address_inf %}
|
|
<div class=" mb-1em address-wrap" id="address-wrap">
|
|
<a class="map-toggle " href="javascript:void(0);" data-show-text="{% trans 'Раскрыть карту' %}" data-hide-text="{% trans 'Скрыть карту' %}"><i class="fa fa-map-marker"> </i><span class="label">Раскрыть карту</span></a>
|
|
<div class="i-descr">
|
|
<span id="address-text">{{ company.address_inf }}</span>
|
|
</div>
|
|
|
|
<div class="map-wrap hidden">
|
|
<div id="gmap-canvas" style="height: 308px; width:800px; position: relative;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
{% endif %}
|
|
{% if company.tag.all|length > 0 %}
|
|
<div class="i-tags">
|
|
{% with tags=company.tag.all %}
|
|
{% for tag in tags %}
|
|
<a href="{{ company.catalog }}tag/{{ tag.url }}">{{ tag.name }}</a>,
|
|
{% endfor %}
|
|
{% endwith %}
|
|
|
|
</div>
|
|
<hr />
|
|
{% endif %}
|
|
<div class="i-contacts clearfix">
|
|
{% if company.facebook or company.linkedin or company.vk or company.twitter %}
|
|
<div class="ic-buttons">
|
|
{# <a class="button icon-msg pw-open" href="#pw-reply">{% trans 'отправить сообщение' %}</a> #}
|
|
|
|
<div class="ic-buttons_text">{% trans 'Профили в соц.сетях:' %}</div>
|
|
<ul class="soc-media-buttons">
|
|
{% if company.facebook %}
|
|
<li>
|
|
<a target="_blank" href="#" data-type="href" data-hash="fb" data-url="{{ company.facebook |base64_encode }}" class="link-encode"><img src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" /></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if company.linkedin %}
|
|
<li>
|
|
<a target="_blank" href="#" data-type="href" data-hash="ld" data-url="{{ company.linkedin|base64_encode }}" class="link-encode"><img src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" /></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if company.vk %}
|
|
<li>
|
|
<a target="_blank" href="#" data-type="href" data-hash="vk" data-url="{{ company.vk|base64_encode }}" class="link-encode"><img src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" /></a>
|
|
</li>
|
|
{% endif %}
|
|
{% if company.twitter %}
|
|
<li>
|
|
<a target="_blank" href="#" data-type="href" data-hash="tw" data-url="{{ company.twitter|base64_encode }}" class="link-encode"><img src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" /></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="ic-links">
|
|
{% if company.phone %}
|
|
<div class="ic-tel">
|
|
{{ company.phone|phone }}
|
|
</div>
|
|
{% endif %}
|
|
{% if company.email %}
|
|
<div class="ic-mail">
|
|
<a class="icon-mail" href="mailto:{{ company.email }}">{{ company.email }}</a>
|
|
</div>
|
|
{% endif %}
|
|
{% if company.web_page %}
|
|
<div class="ic-site">
|
|
<a target="_blank" href="#" data-type="href" data-hash="web" data-url="{{ company.web_page|base64_encode }}" class="icon-ext-link link-encode">{{ company.web_page }}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if company.foundation or company.staff_number or company.description %}
|
|
<hr />
|
|
|
|
<div class="i-additional">
|
|
<div class="ia-title">{% trans 'Дополнительная информация' %}</div>
|
|
|
|
<dl class="add-info">
|
|
{% if company.foundation %}
|
|
<dt>{% trans 'Год основания:' %}</dt>
|
|
<dd>{{ company.foundation }}</dd>
|
|
{% endif %}
|
|
|
|
{% if company.staff_number %}
|
|
<dt>{% trans 'Количество сотрудников:' %}</dt>
|
|
<dd>{{ company.staff_number }}</dd>
|
|
{% endif %}
|
|
{% if company.description %}
|
|
<dt>{% trans 'О компании:' %}</dt>
|
|
<dd>{{ company.description|safe|linebreaks }}</dd>
|
|
{% endif %}
|
|
</dl>
|
|
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="i-statistics">
|
|
{% if company.get_expositions_number > 0 or company.get_conferences_number > 0 or company.get_seminars_number > 0 %}
|
|
<hr />
|
|
<header class="clearfix">
|
|
|
|
<div class="ish-title">{% trans 'Участие в событиях' %}</div>
|
|
|
|
<div class="ish-data">
|
|
{% if company.get_expositions_number > 0 %}
|
|
<span><a href="/expositions/member-{{ company.url }}"><b>{{ company.get_expositions_number }}</b> в {% trans 'выставках' %}</a></span>
|
|
{% endif %}
|
|
{% if company.get_conferences_number > 0 %}
|
|
<span><a href="/conferences/member-{{ company.url }}"><b>{{ company.get_conferences_number }}</b> в {% trans 'конференциях' %}</a></span>
|
|
{% endif %}
|
|
{% if company.get_seminars_number > 0 %}
|
|
<span><a href="/seminars/member-{{ company.url }}"><b>{{ company.get_seminars_number }}</b> в {% trans 'семинарах' %}</a></span>
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
</header>
|
|
{% endif %}
|
|
<ul class="cat-list cl-exhibitions">
|
|
{% for event in company.get_events %}
|
|
<li class="cl-item">
|
|
<div class="cl-item-wrap clearfix">
|
|
<a href="{{ event.get_permanent_url }}">
|
|
{% if event.expohit %}
|
|
<div class="hit"></div>
|
|
{% endif %}
|
|
<div class="cli-pict">
|
|
{% with obj=event %}
|
|
{% include 'includes/show_logo.html' %}
|
|
{% endwith %}
|
|
</div>
|
|
</a>
|
|
<div class="cli-info">
|
|
<div class="cli-top clearfix">
|
|
<div class="cli-status"><b class="participant">{% trans 'Участник' %}</b></div>
|
|
<header>
|
|
<div class="cli-title"><a href="{{ event.get_permanent_url }}">{{ event.name }}</a></div>
|
|
</header>
|
|
<div class="cli-descr">
|
|
{{ event.main_title|safe }}
|
|
</div>
|
|
</div>
|
|
<div class="cli-bot clearfix">
|
|
<div class="cli-date">
|
|
{% with obj=event %}
|
|
{% include 'client/includes/show_date_block.html' %}
|
|
{% endwith %}
|
|
</div>
|
|
<div class="cli-place">
|
|
<a href="#">{{ event.country }}</a>, <a href="#">{{ event.city }}</a>
|
|
{% if event.place %}, <a href="{{ event.place.get_permanent_url }}">{{ event.place.address.address }}</a>{% endif %}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% if company.get_events %}
|
|
<a class="button more" href="/expo/members/{{ company.url }}">{% trans 'Все события' %}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% if company.get_expositions_number > 0 or company.get_conferences_number > 0 or company.get_seminars_number > 0 %}
|
|
<hr />
|
|
{% endif %}
|
|
{% if company.users.all|length > 0 %}
|
|
<div class="i-staff">
|
|
<div class="sect-title">{% trans 'Сотрудники' %}</div>
|
|
|
|
<div class="i-staff-list">
|
|
<ul>
|
|
{% with users=company.users.all %}
|
|
{% for user in users %}
|
|
<li>
|
|
<a href="{{ user.get_permanent_url }}">
|
|
<div class="sl-item clearfix">
|
|
<div class="sl-pict">
|
|
|
|
{% if user.profile.avatar %}
|
|
{% thumbnail user.profile.avatar "100x100" format="PNG" as im %}
|
|
<img class="user-avatar" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
|
|
{% endthumbnail %}
|
|
{% else %}
|
|
<img src="{% static 'client/img/no-userpic-big.gif' %}" width="90" height="90" alt="" />
|
|
{% endif %}
|
|
</div>
|
|
<div class="sl-info">
|
|
<div class="sl-info-wrap">
|
|
<div class="sl-name">{{ user.get_full_name }}</div>
|
|
<div class="sl-position">{{ user.position }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
</ul>
|
|
</div>
|
|
|
|
{% if company.users.all|length > 5 %}
|
|
<a class="button more" href="#">{% trans 'Все сотрудники' %}</a>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
</div>
|
|
<script>
|
|
|
|
$(function () {
|
|
var Map = function (opt) {
|
|
this.opt = opt;
|
|
var self = this,
|
|
canvasId = this.opt.canvasId,
|
|
initGooglemap = function () {
|
|
var mapHolder = document.getElementById(self.opt.canvasId);
|
|
|
|
self.mapOptions = {
|
|
zoom: self.opt.zoom
|
|
};
|
|
self.map = new google.maps.Map(mapHolder, self.mapOptions);
|
|
self.geocoder = new google.maps.Geocoder();
|
|
self.refresh();
|
|
|
|
};
|
|
google.maps.event.addDomListener(window, 'load', initGooglemap);
|
|
this.$wrapper= $(document.getElementById(this.opt.blockId));
|
|
this.$toggle = $(".map-toggle",this.$wrapper);
|
|
this.$container = $(".map-wrap", this.$wrapper);
|
|
|
|
this.status ={
|
|
visible:false
|
|
};
|
|
this.$toggle.on("click", function () {
|
|
if($(this).hasClass("active")){
|
|
self.hideMap();
|
|
}else{
|
|
self.showMap();
|
|
google.maps.event.trigger(self.map, 'resize');
|
|
self.refresh();
|
|
}
|
|
return false;
|
|
});
|
|
};
|
|
Map.prototype = {
|
|
showMap: function () {
|
|
this.$toggle.addClass("active").children(".label").text(this.$toggle.attr("data-hide-text"));
|
|
this.status.visible = true;
|
|
this.$container.removeClass("hidden");
|
|
},
|
|
hideMap: function () {
|
|
this.$toggle.removeClass("active").children(".label").text(this.$toggle.attr("data-show-text"));
|
|
this.status.visible = false;
|
|
this.$container.addClass("hidden");
|
|
},
|
|
refresh: function () {
|
|
var self = this,
|
|
address = $.trim($(document.getElementById(self.opt.addressId)).text());
|
|
if( address != '' && address){
|
|
this.geocoder.geocode({"address":address}, function (results, status) {
|
|
if (status == google.maps.GeocoderStatus.OK){
|
|
self.map.setCenter(results[0].geometry.location);
|
|
if(!self.marker){
|
|
self.marker = new google.maps.Marker({
|
|
map: self.map,
|
|
position: results[0].geometry.location
|
|
});
|
|
}else{
|
|
self.marker.set("position",results[0].geometry.location);
|
|
}
|
|
}else{
|
|
console.log("!ERORR: Geocode was not successful for the following reason: " + status);
|
|
}
|
|
});
|
|
}else{
|
|
this.$toggle.addClass("hidden");
|
|
this.status.visible = false;
|
|
}
|
|
}
|
|
};
|
|
var map = new Map({
|
|
blockId: "address-wrap",
|
|
canvasId: "gmap-canvas",
|
|
addressId:"address-text",
|
|
zoom: 14
|
|
});
|
|
|
|
});
|
|
</script>
|
|
{% endblock %} |