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.
97 lines
3.6 KiB
97 lines
3.6 KiB
{% extends 'base_catalog.html' %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
{% load template_filters %}
|
|
|
|
{% block bread_scrumbs %}
|
|
<div class="bread-crumbs">
|
|
<a href="/">{% trans 'Главная страница' %}</a>
|
|
<a href="/profile/">{% trans 'Личный кабинет' %}</a>
|
|
<strong>{% trans 'Календарь' %}</strong>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block page_title %}
|
|
<div class="page-title">
|
|
<h1>{% trans 'Личный календарь' %}</h1>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content_list %}
|
|
<div class="m-article p-calendar">
|
|
{% with days=days events=events current_day=current_day %}
|
|
{% include 'client/includes/accounts/calendar_table.html' %}
|
|
{% endwith %}
|
|
|
|
</div>
|
|
<div class="m-article cal-lists">
|
|
{% if events|length > 0 %}
|
|
<div class="cl-sect">
|
|
<div class="cls-title">{{ days.15|date:"F"}}’{{ days.15|date:"y"}}
|
|
<div style="float:right;margin-right: 5px;" class="check-wrap">
|
|
<label class="check"><input type="checkbox" id="selectall"/></label>
|
|
</div>
|
|
</div>
|
|
{% include 'client/includes/accounts/calendar_list.html' with events=events %}
|
|
</div>
|
|
|
|
<div class="cl-actions clearfix">
|
|
<div class="cla-title">{% trans 'Все / выделенные:' %}</div>
|
|
<div class="cla-btns">
|
|
<a class="button" id="btn_delete" href="#">{% trans 'удалить из расписания' %}</a>
|
|
<a id ='export' class="button icon-save" href="#">{% trans 'выбраные в xls' %}</a>
|
|
<a id ='future' class="button icon-save" href="#">{% trans 'все предстоящие в xls' %}</a>
|
|
|
|
<!--<a class="button icon-calendar-o" href="#">{% trans 'ЭКСПОРТИРОВАТЬ В' %} <span class="lc">iCal</span></a>
|
|
|
|
<a class="button icon-save" href="#">{% trans 'сохранить в pdf' %}</a>
|
|
<a class="button icon-print" href="#">{% trans 'Распечатать' %}</a>
|
|
-->
|
|
</div>
|
|
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="to-prev-cal">
|
|
<a class="icon-back" href="/profile/calendar/?year={{ days.15|add_month:'-1'|date:'Y' }}&month={{ days.15|add_month:'-1'|date:'m' }}">{% trans 'Посмотреть прошедший календарь' %}</a>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function(){
|
|
if(window.location.search === "?message=empty"){
|
|
alert("{% trans 'У вас нету событий в будущем!' %}");
|
|
window.location.search = ""
|
|
}
|
|
$('#selectall').click(function(event) { //on click
|
|
$(".qwer").trigger("click");
|
|
});
|
|
$("#future").click(function(event) {
|
|
window.location.href = "/profile/calendar/export/?" + "filter=future";
|
|
});
|
|
$("#export").click(function(event){
|
|
event.preventDefault();
|
|
var list = $('.qwer');
|
|
var clear_list = [], obj = {name:'', value:''};
|
|
for (var i = 0; i < list.length; i++){
|
|
if(list[i].checked == true) {
|
|
clear_list.push({name:list[i].name, value:list[i].value});
|
|
}
|
|
}
|
|
console.log(clear_list);
|
|
var query = $.param({data:clear_list});
|
|
if(clear_list.length > 0){
|
|
window.location.href = "/profile/calendar/export/?" + query;
|
|
}
|
|
else{
|
|
alert('{% trans "Не выбрано ни одного события!" %}');
|
|
}
|
|
});
|
|
|
|
})
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{% static 'client/js/profile.js' %}"></script>+++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
{% endblock %} |