{% extends 'DMDashboardBundle::layout.html.twig' %}
{% set title = "Źródło klientów - lista" %}
{% set icon = "menu_sieciafiliacyjne_icon.png" %}
{% block title %}{{ title }} {{ parent() }}{% endblock %}
{% block code_header %}
{% endblock %}
{% block body %}
<header>
<div class="icon"><div class="img"><img src="{{ asset('bundles/dmdashboard/images/' ~ icon) }}" alt="{{ title }}"></div></div>
<h1>{{ title }}</h1>
<div class="btn-group">
<a href="{{ path('dm_client_source_add') }}" class="btn btn-primary">Dodaj</a>
</div>
</header>
{% include 'DMDashboardBundle::modules/alerts.html.twig' %}
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="row">
{{form_start(form)}}
<div class="col-md-6">
{{ form_label(form.name) }}
{{ form_widget(form.name) }}
</div>
<div class="col-md-6">
{{ form_label(form.submit) }}
{{ form_widget(form.submit) }}
</div>
{{form_end(form)}}
</div>
</div>
</div>
</div>
{% if items|length == 0 %}
<big><i>Brak pozycji</i></big>
{% else %}
Wyników: <strong>{{ itemsCount }}</strong>
{% if items|length == 0 %}
<big><i>Brak pozycji</i></big>
{% else %}
<table class="table table-striped table-list" style="width: 98%;">
<theader>
<tr>
<th style="width: 5%;">ID</th>
<th style="width: 50%;">Nazwa</th>
<th style="width: 5%;">Akcje</th>
</tr>
</theader>
<tbody>
{% for item in items%}
<tr>
<td class="">
{{ item.id }}
</td>
<td class="">
{{ item.name }}
</td>
<td>
<a href="{{ path('dm_client_source_edit',{'item': item.id}) }}" class="btn btn-primary">Edytuj</a>
<a href="{{ path('dm_client_source_remove',{'item':item.id}) }}" class="btn btn-danger" onclick="return confirm('Napewno usunąc?');">Usuń</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if paginationCount > 1 %}
<div style="width: 100%; text-align:center; margin-bottom: 20px;">
{% if paginationPage != 1 %}
<a href="javascript:void(0)" onclick="javascript:changePaginationStrona({{ paginationPage - 1}})" class="elem back">{{ '< poprzednia' }}</a>
{% endif %}
{% for i in 1..paginationCount %}
<a href="javascript:void(0)" onclick="javascript:changePaginationStrona({{ i }})" class="elem" {% if i == paginationPage %}style="color:#000; font-weight:bold; font-size: 16px;"{% endif %}>{{ i }}</a>
{% endfor %}
{% if paginationPage != paginationCount %}
<a href="javascript:void(0)" onclick="javascript:changePaginationStrona({{ paginationPage + 1}})" class="elem next">{{ 'nastepna >' }}</a>
{% endif %}
</div>
{% endif %}
<script type="text/javascript">
function changePaginationStrona(newStr) {
$('input#client_source_filter_paginationPage').val(newStr);
$("form[name='client_source_filter']").submit();
}
</script>
{% endif %}
{% endblock body %}
//add edit
{% extends 'DMDashboardBundle::layout.html.twig' %}
{% if mode == 'edit' %}
{% set title = "Źródło klientów edycja" %}
{% else %}
{% set title = "Źródło klientów dodaj nową pozycję" %}
{% endif %}
{% set icon = "menu_sieciafiliacyjne_icon.png" %}
{% block title %}{{ title }} {{ parent() }}{% endblock %}
{% block code_header %}
{% endblock %}
{% block body %}
<header>
<div class="icon"><div class="img"><img src="{{ asset('bundles/dmdashboard/images/' ~ icon) }}" alt="{{ title }}"></div></div>
<h1>{{ title }}</h1>
<div class="btn-group">
<a href="{{ path('dm_client_source_add') }}" class="btn btn-primary">Dodaj</a>
</div>
</header>
{% include 'DMDashboardBundle::modules/alerts.html.twig' %}
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-md-offset-2">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading"> <h4>{% if mode == 'add' %}Dodaj nowy{% endif %}{% if mode == 'edit' %}Edycja{% endif %}</h4></div>
<div class="panel-body body-form">
{{form_start(form)}}
{{form_end(form)}}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock body %}
//nowy
{% extends 'DMDashboardBundle::layout.html.twig' %}
{% block title %} {{ parent() }} - Automatyczne raporty walidacyjne - konfiguracja {% endblock %}
{% block code_header %}
<style>
.checkbox-container > div > label{
width: 35%
}
.checkbox-container .has-switch {
width: 10%;
margin-right: 1%;
}
</style>
{% endblock %}
{% block body %}
<header>
<div class="icon"><div class="img"><img src="{{ asset('bundles/dmdashboard/images/menu_kategorie_icon.png') }}" alt="Group"></div></div>
<h1>Automatyczne raporty walidacyjne - dodawanie/edycja</h1>
<a href="{{ path('dm_reportvalidation_auto_report_configuration')}}" class="btn btn-default btn-add">« Wstecz</a>
</header>
{% include 'DMDashboardBundle::modules/alerts.html.twig' %}
{{ form_start(form) }}
{{ form_errors(form) }}
<div class="left">
<div class="panel-group" id="ustawienia">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#Parametry">
Parametry
</a>
</h4>
</div>
<div id="Parametry" class="panel-collapse collapse in">
<div class="panel-body">
<div class="form_row">
{{ form_label(form.mailTitle) }}
{{ form_widget(form.mailTitle) }}
</div>
<div class="form_row">
{{ form_label(form.mailsToSend) }}
{{ form_widget(form.mailsToSend) }}
</div>
<div class="form_row">
{{ form_label(form.mailContent) }}
{{ form_widget(form.mailContent) }}
</div>
<div class="form_row">
{{ form_label(form.report_validation_report) }}
{{ form_widget(form.report_validation_report) }}
</div>
<div class="row">
<div class="col-sm-6 col-xs-12">
<div class="form_row">
{{ form_label(form.dateRange) }}
{{ form_widget(form.dateRange) }}
</div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="form_row">
{{ form_label(form.sendDay) }}
{{ form_widget(form.sendDay) }}
</div>
</div>
</div>
<div class="form_row checkbox-container">
{{ form_label(form.celsToSend) }}
{{ form_widget(form.celsToSend) }}
<br>
<a class="btn btn-primary" id="cell" >Zaznacz wszystkie pola do wyświetlania</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="right">
<div class="panel-group" id="ustawienia">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#Akcje">
Akcje
</a>
</h4>
</div>
<div id="Akcje" class="panel-collapse collapse in">
<div class="panel-body">
<div class="btn-group" style="float: right; width: 100%;">
<a class="btn btn-default btn-lg" style="width:40%;" href = "{{ path('dm_reportvalidation_auto_report_configuration') }}" >Anuluj</a>
{{ form_widget(form.submit,{'attr':{'style':'width:60%'}}) }}
</div>
</div>
</div>
</div>
</div>
</div>
{{ form_end(form) }}
<script type="text/javascript">
$('#cell').click(function () {
$('#auto_report_validation_configuration_celsToSend').find('input[type=checkbox]').trigger('click');
});
</script>
{% endblock body %}