Refactored code to comply with PSR-*

Signed-off-by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely POLONKAI
2012-08-16 15:52:41 +02:00
parent de00a6ad21
commit fab08cad6f
69 changed files with 5253 additions and 4673 deletions

View File

@@ -1,18 +1,20 @@
<?xml version="1.0" ?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="kek_rozsak_front.twig_extension.events" class="KekRozsak\FrontBundle\Twig\EventsExtension">
<argument type="service" id="doctrine" />
<argument type="service" id="security.context" />
<tag name="twig.extension" />
</service>
<service id="form.type_extension.help_message" class="KekRozsak\FrontBundle\Form\Extension\HelpMessageTypeExtension">
<tag name="form.type_extension" alias="field" />
</service>
<service id="bb.twig.extension" class="KekRozsak\FrontBundle\Twig\TwigBBExtension">
<argument type="service" id="service_container" />
<tag name="twig.extension" />
</service>
</services>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="kek_rozsak_front.twig_extension.events" class="KekRozsak\FrontBundle\Twig\EventsExtension">
<argument type="service" id="doctrine" />
<argument type="service" id="security.context" />
<tag name="twig.extension" />
</service>
<service id="form.type_extension.help_message" class="KekRozsak\FrontBundle\Form\Extension\HelpMessageTypeExtension">
<tag name="form.type_extension" alias="field" />
</service>
<service id="bb.twig.extension" class="KekRozsak\FrontBundle\Twig\TwigBBExtension">
<argument type="service" id="service_container" />
<tag name="twig.extension" />
</service>
</services>
</container>

View File

@@ -21,78 +21,78 @@
}
.forum-lista thead td a {
color: #3366ff;
text-decoration: none;
color: #3366ff;
text-decoration: none;
}
.forum-lista tbody td {
padding: 5px;
border-bottom: 1px solid #3366ff;
padding: 5px;
border-bottom: 1px solid #3366ff;
}
.forum-lista tbody tr.odd td {
background-color: #060c16;
background-color: #060c16;
}
.forum-lista tbody tr.even td {
background-color: #000000;
background-color: #000000;
}
.forum-lista tbody td a {
color: #3366ff;
text-decoration: underline;
color: #3366ff;
text-decoration: underline;
}
.post-lista {
border: 1px solid #3366ff;
border-collapse: collapse;
border: 1px solid #3366ff;
border-collapse: collapse;
}
.post-lista td {
border-style: solid;
border-color: #3366ff;
border-width: 3px 1px;
vertical-align: top;
padding: 5px;
border-style: solid;
border-color: #3366ff;
border-width: 3px 1px;
vertical-align: top;
padding: 5px;
}
.post-lista td.felado {
width: 150px !important;
font-size: 80%;
width: 150px !important;
font-size: 80%;
}
.post-lista td.szoveg {
width: 510px;
width: 510px;
}
.post-lista td.szoveg div {
width: 510px;
overflow: auto;
width: 510px;
overflow: auto;
}
td.uj-post {
}
td.uj-post textarea {
width: 500px;
background-color: #000000;
color: #3366ff;
border-style: solid;
border-color: #3366ff;
border-width: 0 0 2px 0;
height: 15em;
width: 500px;
background-color: #000000;
color: #3366ff;
border-style: solid;
border-color: #3366ff;
border-width: 0 0 2px 0;
height: 15em;
}
td.uj-post p {
clear: both;
float: none;
margin: 0;
clear: both;
float: none;
margin: 0;
}
td.uj-post p .eszkoztar {
float: left;
float: left;
}
td.uj-post p .kuldes-gomb {
float: right;
float: right;
}

View File

@@ -1,11 +1,11 @@
ul#submenu {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}
ul#submenu li {
margin: 0;
padding: 3px;
display: inline;
margin: 0;
padding: 3px;
display: inline;
}

View File

@@ -7,94 +7,94 @@
*/
#popup-container {
display: none;
position: fixed;
height: 300px;
width: 200px;
background: #ffffff;
z-index: 80;
display: none;
position: fixed;
height: 300px;
width: 200px;
background: #ffffff;
z-index: 80;
}
#popup-close {
position: absolute;
width: 16px;
height: 16px;
top: -5px;
right: -5px;
background-image: url('../images/no.png');
position: absolute;
width: 16px;
height: 16px;
top: -5px;
right: -5px;
background-image: url('../images/no.png');
}
#popup-inside {
border: 1px solid black;
height: 292px;
width: 192px;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
border: 1px solid black;
height: 292px;
width: 192px;
margin-left: auto;
margin-right: auto;
margin-top: 3px;
}
#popup-title {
font-weight: bold;
padding: 5px;
font-weight: bold;
padding: 5px;
}
#popup-content {
padding: 3px;
padding: 3px;
}
#popup-scrollable {
width: 192px;
clear: both;
margin: 20px 0 10px;
width: 192px;
clear: both;
margin: 20px 0 10px;
}
#popup-scrollable .viewport {
width: 172px;
height: 246px;
overflow: hidden;
position: relative;
width: 172px;
height: 246px;
overflow: hidden;
position: relative;
}
#popup-scrollable .overview {
list-style: none;
position: absolute;
left: 0;
top: 0;
list-style: none;
position: absolute;
left: 0;
top: 0;
}
#popup-scrollable .thumb .end, #popup-scrollable .thumb {
background-color: #003D5D;
background-color: #003D5D;
}
#popup-scrollable .scrollbar {
position: relative;
float: right;
width: 15px;
position: relative;
float: right;
width: 15px;
}
#popup-scrollable .track {
background-color: #D8EEFD;
height: 100%;
width: 13px;
position: relative;
padding: 0 1px;
background-color: #D8EEFD;
height: 100%;
width: 13px;
position: relative;
padding: 0 1px;
}
#popup-scrollable .thumb {
height: 20px;
width: 13px;
cursor: pointer;
overflow: hidden;
position: absolute;
top: 0;
height: 20px;
width: 13px;
cursor: pointer;
overflow: hidden;
position: absolute;
top: 0;
}
#popup-scrollable .thumb .end {
overflow: hidden;
height: 5px;
width: 13px;
overflow: hidden;
height: 5px;
width: 13px;
}
#popup-scrollable .disable {
display: none;
display: none;
}

View File

@@ -1,63 +1,63 @@
{# vim: ft=htmljinja
#}
<p>
<strong>Szerző:</strong> {{ book.author }}<br />
<strong>Cím:</strong> {{ book.title }}<br />
<strong>Kiadás éve:</strong> {{ book.year }}<br />
<strong>Szerző:</strong> {{ book.author }}<br />
<strong>Cím:</strong> {{ book.title }}<br />
<strong>Kiadás éve:</strong> {{ book.year }}<br />
</p>
<p>
Nekem van <strong>{{ book.usersCopies(app.user)|length }}</strong>, ebből kölcsön van adva <strong>X</strong>.<br />
A teljes közösségnek összesen <strong>{{ book.copies|length }}</strong> példánya van.<br />
Kölcsönkérhető <strong>{{ book.copiesBorrowable|length }}</strong> példány, ebből <strong>{{ book.copiesBorrowedByUser(app.user)|length }}</strong> nálam van.<br />
Nekem van <strong>{{ book.usersCopies(app.user)|length }}</strong>, ebből kölcsön van adva <strong>X</strong>.<br />
A teljes közösségnek összesen <strong>{{ book.copies|length }}</strong> példánya van.<br />
Kölcsönkérhető <strong>{{ book.copiesBorrowable|length }}</strong> példány, ebből <strong>{{ book.copiesBorrowedByUser(app.user)|length }}</strong> nálam van.<br />
</p>
<p>
{% if book.usersCopies(app.user)|length == 0 %}
<span class="gomb add-copy-button" id="add-copy-button-{{ book.id }}">[Nekem is van egy]</span>
<span class="gomb add-copy-button" id="add-copy-button-{{ book.id }}">[Nekem is van egy]</span>
{% else %}
<span class="gomb delete-copy-button" id="delete-copy-button-{{ book.id }}">[Nincs már]</span>
<span class="gomb delete-copy-button" id="delete-copy-button-{{ book.id }}">[Nincs már]</span>
{# TODO
<span class="gomb">[Eladtam valakinek a körben]</span>
<span class="gomb">[Eladtam valakinek a körben]</span>
#}
{% if book.usersCopiesBorrowable(app.user)|length == 0 %}
<span class="gomb mine-is-borrowable-button" id="mine-is-borrowable-button-{{ book.id }}">[Az enyém is kölcsönkérhető]</span>
<span class="gomb mine-is-borrowable-button" id="mine-is-borrowable-button-{{ book.id }}">[Az enyém is kölcsönkérhető]</span>
{% else %}
<span class="gomb mine-is-not-borrowable-button" id="mine-is-not-borrowable-button-{{ book.id }}">[Nem szeretném kölcsönadni]</span>
<span class="gomb mine-is-not-borrowable-button" id="mine-is-not-borrowable-button-{{ book.id }}">[Nem szeretném kölcsönadni]</span>
{% endif %}
{% endif %}
{% if book.usersCopies(app.user)|length > 0 %}
{% if book.usersCopiesBuyable(app.user)|length == 0 %}
<span class="gomb mine-is-for-sale-button" id="mine-is-for-sale-button-{{ book.id }}">[Az enyém eladó]</span>
<span class="gomb mine-is-for-sale-button" id="mine-is-for-sale-button-{{ book.id }}">[Az enyém eladó]</span>
{% else %}
<span class="gomb mine-is-not-for-sale-button" id="mine-is-not-for-sale-button-{{ book.id }}">[Nem szeretném eladni]</span>
<span class="gomb mine-is-not-for-sale-button" id="mine-is-not-for-sale-button-{{ book.id }}">[Nem szeretném eladni]</span>
{% endif %}
{% endif %}
{% if book.copiesBorrowedByUser(app.user)|length == 0 and book.usersCopies(app.user)|length == 0 and not book.userWouldBorrow(app.user) %}
<span class="gomb want-to-borrow-button" id="want-to-borrow-button-{{ book.id }}">[Kérek egyet kölcsön]</span>
<span class="gomb want-to-borrow-button" id="want-to-borrow-button-{{ book.id }}">[Kérek egyet kölcsön]</span>
{% endif %}
{% if book.usersCopies(app.user)|length == 0 and not book.userWouldBuy(app.user) %}
<span class="gomb want-to-buy-button" id="want-to-buy-button-{{ book.id }}">[Vennék egyet]</span>
<span class="gomb want-to-buy-button" id="want-to-buy-button-{{ book.id }}">[Vennék egyet]</span>
{% endif %}
</p>
{% if book.wouldBuy|length > 0 %}
<p>
Ők szeretnének egyet kölcsönkérni:<br />
<ul>
Ők szeretnének egyet kölcsönkérni:<br />
<ul>
{% for user in book.wouldBorrow %}
<li>{{ user|userdataspan }}</li>
<li>{{ user|userdataspan }}</li>
{% endfor %}
</ul>
</ul>
</p>
{% endif %}
{% if book.wouldBuy|length > 0 %}
<p>
Ők szeretnének venni egyet:<br />
<ul>
Ők szeretnének venni egyet:<br />
<ul>
{% for user in book.wouldBuy %}
<li>{{ user|userdataspan }}</li>
<li>{{ user|userdataspan }}</li>
{% endfor %}
</ul>
</ul>
</p>
{% endif %}

View File

@@ -7,127 +7,155 @@
[Saját könyveim] [Nálam lévő kölcsönzött könyvek]
{% if books|length > 0 %}
<table>
<thead>
<tr>
<td>Szerző</td>
<td>Cím</td>
<td>Év</td>
<td>Összes</td>
<td>Kölcsönözhető</td>
<td>Saját</td>
<td>Nálam (Vissza)</td>
</tr>
</thead>
<tbody>
<thead>
<tr>
<td>Szerző</td>
<td>Cím</td>
<td>Év</td>
<td>Összes</td>
<td>Kölcsönözhető</td>
<td>Saját</td>
<td>Nálam (Vissza)</td>
</tr>
</thead>
<tbody>
{% for book in books %}
<tr class="book-row popup-opener" id="book-{{ book.id }}">
<td class="popup-opener">{{ book.author }}</td>
<td>{{ book.title }}</td>
<td>{{ book.year }}</td>
<td>{{ book.copies|length }}</td>
<td>{{ book.copiesBorrowable|length }}</td>
<td>{{ book.usersCopies(app.user)|length }}</td>
<td>{{ book.copiesBorrowedByUser(app.user)|length }} ({{ book.copiesBorrowedReturnedByUser(app.user)|length }})</td>
</tr>
<tr class="book-row popup-opener" id="book-{{ book.id }}">
<td class="popup-opener">{{ book.author }}</td>
<td>{{ book.title }}</td>
<td>{{ book.year }}</td>
<td>{{ book.copies|length }}</td>
<td>{{ book.copiesBorrowable|length }}</td>
<td>{{ book.usersCopies(app.user)|length }}</td>
<td>{{ book.copiesBorrowedByUser(app.user)|length }} ({{ book.copiesBorrowedReturnedByUser(app.user)|length }})</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
{% endif %}
{% endblock %}
{% block bottomscripts %}
<script type="text/javascript">
$('.book-row').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^book-\d+$/))
return false;
bookid = $(this).attr('id').replace(/^book-/, '');
bookUrl = Routing.generate('KekRozsakFrontBundle_bookAjaxData', { id: bookid, _format: 'html' });
bookCallback = function() {
// TODO: Change alert() calls to HTML flashes
$('.delete-copy-button').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^delete-copy-button-\d+$/))
return false;
bookid = $(this).attr('id').replace(/^delete-copy-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookDeleteCopy', { id: bookid });
$.ajax({
method: 'GET',
url: url
}).done(function() {
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function() {
alert('Nem sikerült törölni');
});
});
bookid = 0;
if (!$(this).attr('id').match(/^book-\d+$/)) {
return false;
}
bookid = $(this).attr('id').replace(/^book-/, '');
bookUrl = Routing.generate('KekRozsakFrontBundle_bookAjaxData', { id: bookid, _format: 'html' });
bookCallback = function()
{
// TODO: Change alert() calls to HTML flashes
$('.delete-copy-button').click(function()
{
bookid = 0;
if (!$(this).attr('id').match(/^delete-copy-button-\d+$/)) {
return false;
}
$('.add-copy-button').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^add-copy-button-\d+$/))
return false;
bookid = $(this).attr('id').replace(/^add-copy-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookAddCopy', { id: bookid });
$.ajax({
method: 'GET',
url: url
}).done(function() {
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function() {
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
bookid = $(this).attr('id').replace(/^delete-copy-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookDeleteCopy', { id: bookid });
$.ajax({
method: 'GET',
url: url
}).done(function()
{
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function()
{
// TODO: Make this a flash!
alert('Nem sikerült törölni');
});
});
$('.mine-is-borrowable-button, .mine-is-not-borrowable-button').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^mine-is-(not-)?borrowable-button-\d+$/))
return false;
isBorrowable = ($(this).attr('id').match(/^mine-is-not-borrowable-button-\d+$/)) ? 0 : 1;
bookid = $(this).attr('id').replace(/^mine-is-(not-)?borrowable-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookSetCopyBorrowable', { id: bookid, newValue: isBorrowable });
$.ajax({
method: 'GET',
url: url
}).done(function() {
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function() {
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
$('.add-copy-button').click(function()
{
bookid = 0;
if (!$(this).attr('id').match(/^add-copy-button-\d+$/)) {
return false;
}
bookid = $(this).attr('id').replace(/^add-copy-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookAddCopy', { id: bookid });
$.ajax({
method: 'GET',
url: url
}).done(function()
{
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function()
{
// TODO: Make this a flash!
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
$('.mine-is-for-sale-button, .mine-is-not-for-sale-button').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^mine-is-(not-)?for-sale-button-\d+$/))
return false;
isForSale = ($(this).attr('id').match(/^mine-is-not-for-sale-button-\d+$/)) ? 0 : 1;
bookid = $(this).attr('id').replace(/^mine-is-(not-)?for-sale-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookSetCopyForSale', { id: bookid, newValue: isForSale });
$.ajax({
method: 'GET',
url: url
}).done(function() {
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function() {
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
$('.mine-is-borrowable-button, .mine-is-not-borrowable-button').click(function()
{
bookid = 0;
if (!$(this).attr('id').match(/^mine-is-(not-)?borrowable-button-\d+$/)) {
return false;
}
isBorrowable = ($(this).attr('id').match(/^mine-is-not-borrowable-button-\d+$/)) ? 0 : 1;
bookid = $(this).attr('id').replace(/^mine-is-(not-)?borrowable-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookSetCopyBorrowable', { id: bookid, newValue: isBorrowable });
$.ajax({
method: 'GET',
url: url
}).done(function()
{
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function()
{
// TODO: Make this a flash!
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
$('.want-to-buy-button, .want-to-borrow-button').click(function() {
bookid = 0;
if (!$(this).attr('id').match(/^want-to-(buy|borrow)-button-\d+$/))
return false;
toBuy = ($(this).attr('id').match(/^want-to-buy-button-\d+$/)) ? 1 : 0;
bookid = $(this).attr('id').replace(/^want-to-(buy|borrow)-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookWantOne', { id: bookid, wantToBuy: toBuy });
$.ajax({
method: 'GET',
url: url
}).done(function() {
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function() {
alert('Nem sikerült bejegyezni a kérést');
});
});
};
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
$('.mine-is-for-sale-button, .mine-is-not-for-sale-button').click(function()
{
bookid = 0;
if (!$(this).attr('id').match(/^mine-is-(not-)?for-sale-button-\d+$/)) {
return false;
}
isForSale = ($(this).attr('id').match(/^mine-is-not-for-sale-button-\d+$/)) ? 0 : 1;
bookid = $(this).attr('id').replace(/^mine-is-(not-)?for-sale-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookSetCopyForSale', { id: bookid, newValue: isForSale });
$.ajax({
method: 'GET',
url: url
}).done(function()
{
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function()
{
// TODO: Make this a flash!
alert('Nem sikerült bejegyezni ezt a példányt');
});
});
$('.want-to-buy-button, .want-to-borrow-button').click(function()
{
bookid = 0;
if (!$(this).attr('id').match(/^want-to-(buy|borrow)-button-\d+$/)) {
return false;
}
toBuy = ($(this).attr('id').match(/^want-to-buy-button-\d+$/)) ? 1 : 0;
bookid = $(this).attr('id').replace(/^want-to-(buy|borrow)-button-/, '');
url = Routing.generate('KekRozsakFrontBundle_bookWantOne', { id: bookid, wantToBuy: toBuy });
$.ajax({
method: 'GET',
url: url
}).done(function()
{
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
}).error(function()
{
alert('Nem sikerült bejegyezni a kérést');
});
});
};
doPopup('', 'Betöltés...', bookUrl, 400, 300, bookCallback);
});
</script>
{% endblock bottomscripts %}

View File

@@ -1,31 +1,31 @@
{# vim: ft=htmljinja
#}
<div id="events-button">
<span id="event-shower" class="gomb">[események gomb]</span>
<div id="event-box">
<div id="event-inside">
<p class="month">{{ firstDay|date('Y-m') }}</p>
<table>
<thead>
<tr>
<td></td>
<td>H</td>
<td>K</td>
<td>Sze</td>
<td>Cs</td>
<td>P</td>
<td>Szo</td>
<td>V</td>
</tr>
</thead>
<tbody>
<tr>
<td class="woy">{{ firstDay|date('W') }}</td>
<div id="events-button">
<span id="event-shower" class="gomb">[események gomb]</span>
<div id="event-box">
<div id="event-inside">
<p class="month">{{ firstDay|date('Y-m') }}</p>
<table>
<thead>
<tr>
<td></td>
<td>H</td>
<td>K</td>
<td>Sze</td>
<td>Cs</td>
<td>P</td>
<td>Szo</td>
<td>V</td>
</tr>
</thead>
<tbody>
<tr>
<td class="woy">{{ firstDay|date('W') }}</td>
{% set curDow = 0 %}
{% if firstDayWeekday != 1 %}
{% for i in 1..(firstDayWeekday - 1) %}
{% set curDow = curDow + 1 %}{% if curDow == 8 %}{% set curDow = 1 %}{% endif %}
<td></td>
<td></td>
{% endfor %}
{% endif %}
{% set cur = firstDayWeekday - 1 %}
@@ -33,30 +33,26 @@
{% set cur = cur + 1 %}
{% set curDow = curDow + 1 %}{% if curDow == 8 %}{% set curDow = 1 %}{% endif %}
{% set eventCount = 0 %}
{# TODO Check if an event occurs on this date:
(event.startDate = this day AND event.endDate is NULL)
OR (event.startDate <= this day AND evend.endDate >= this day)
#}
<td id="event-calendar-{{ i }}"{% if eventList[i].events|length > 0 %} class="program" rel="{{ path('KekRozsakFrontBundle_eventAjaxList', {date: eventList[i].date|date('Y-m-d'), _format: 'html'}) }}"{% endif %}>
<a href="{{ path('KekRozsakFrontBundle_eventList', { date: eventList[i].date|date('Y-m-d')}) }}">{{ eventList[i].date|date('d') }}</a>
</td>
<td id="event-calendar-{{ i }}"{% if eventList[i].events|length > 0 %} class="program" rel="{{ path('KekRozsakFrontBundle_eventAjaxList', {date: eventList[i].date|date('Y-m-d'), _format: 'html'}) }}"{% endif %}>
<a href="{{ path('KekRozsakFrontBundle_eventList', { date: eventList[i].date|date('Y-m-d')}) }}">{{ eventList[i].date|date('d') }}</a>
</td>
{% if cur is divisibleby(7) %}
</tr>
</tr>
{% if cur != numDays %}
<tr>
<td class="woy">{{ eventList[i + 1].date|date('W') }}</td>
<tr>
<td class="woy">{{ eventList[i + 1].date|date('W') }}</td>
{% endif %}
{% endif %}
{% endfor %}
{% if curDow != 7 %}
{% for i in (curDow + 1)..7 %}
<td></td>
<td></td>
{% endfor %}
{% endif %}
</tr>
</tbody>
</table>
<a href="{{ path('KekRozsakFrontBundle_eventList') }}">További események</a>
</div>
</div>
</div>
</tr>
</tbody>
</table>
<a href="{{ path('KekRozsakFrontBundle_eventList') }}">További események</a>
</div>
</div>
</div>

View File

@@ -1,14 +1,14 @@
{# vim: ft=htmljinja
#}
<div id="login-gomb">
<span id="login-mutato" class="gomb">Bejelentkezés</span>
<div id="login-box">
<div id="login-belso">
<form method="post" action="{{ path('KekRozsakSecurityBundle_login_check') }}">
Felhasználónév: <input type="text" name="_username" /><br />
Jelszó: <input type="password" name="_password" /><br />
<button type="submit">Bejelentkezés</button>
</form>
</div>
</div>
</div>
<div id="login-gomb">
<span id="login-mutato" class="gomb">Bejelentkezés</span>
<div id="login-box">
<div id="login-belso">
<form method="post" action="{{ path('KekRozsakSecurityBundle_login_check') }}">
Felhasználónév: <input type="text" name="_username" /><br />
Jelszó: <input type="password" name="_password" /><br />
<button type="submit">Bejelentkezés</button>
</form>
</div>
</div>
</div>

View File

@@ -1,28 +1,27 @@
{# vim: ft=htmljinja
#}
<div id="profil-gomb">
<span id="profil-mutato" class="gomb">[avatar] {{ app.user.displayName }}</span>
<div id="profil-box">
<div id="profil-belso">
[avatar]
{{ app.user.displayName }}<br />
<span id="jog-lista" title="|Jogosultságok|{% for role in app.user.roles %}{{ role.shortDescription }}<br />{% endfor %}">Jogosultság{% if app.user.roles|length > 1 %}ok{% endif %}</span><br />
<dl>
<dt>Csoportjaim</dt>
<div id="profil-gomb">
<span id="profil-mutato" class="gomb">[avatar] {{ app.user.displayName }}</span>
<div id="profil-box">
<div id="profil-belso">
<span class="avatar">[avatar]</span>
{{ app.user.displayName }}<br />
<span id="jog-lista" title="|Jogosultságok|{% for role in app.user.roles %}{{ role.shortDescription }}<br />{% endfor %}">Jogosultság{% if app.user.roles|length > 1 %}ok{% endif %}</span><br />
<dl>
<dt>Csoportjaim</dt>
{% for group in app.user.groups %}
{% if group.group.open or group.membershipAcceptedAt %}
<dl><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.group.slug}) }}">{{ group.group.name }}</a></dl>
<dd><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.group.slug}) }}">{{ group.group.name }}</a></dd>
{% endif %}
{% endfor %}
<dl><a href="{{ path('KekRozsakFrontBundle_groupList') }}">További csoportok</a></dl>
<dd><a href="{{ path('KekRozsakFrontBundle_groupList') }}">További csoportok</a></dd>
<dt>Kedvenc Fórum-témáim</dt>
<dt>Kedvenc Fórum-témáim</dt>
<dd><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a></dd>
<dl><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a></dl>
<dt>Üzenetek</dt>
</dl>
</div>
<div id="profil-szerkesztes"><a href="{{ path('KekRozsakFrontBundle_profile_edit') }}">Profil szerkesztése</a></div>
</div>
</div>
<dt>Üzenetek</dt>
</dl>
</div>
<div id="profil-szerkesztes"><a href="{{ path('KekRozsakFrontBundle_profile_edit') }}">Profil szerkesztése</a></div>
</div>
</div>

View File

@@ -8,9 +8,9 @@
<p>Az itt megadott adataidat szigorúan kezeljük, azt más számára kizárólag hatósági felszólításra adjuk ki.</p>
<p>A publikusnak megjelölt adataidat csak a kör tagjai láthatják, míg a nem publikusnak megjelölteket kizárólag az oldal adminisztrátorai.</p>
<form method="post" action="{{ path('KekRozsakFrontBundle_profile_edit') }}">
<table>
<table>
{{ form_widget(form) }}
</table>
<button type="submit">Mentés</button>
</table>
<button type="submit">Mentés</button>
</form>
{% endblock content %}

View File

@@ -5,7 +5,7 @@
{% block content %}
<h3>Új dokumentum létrehozása</h3>
<form method="post" action="{{ path('KekRozsakFrontBundle_documentCreate') }}">
{{ form_widget(form) }}
<button type="submit">Mentés</button>
{{ form_widget(form) }}
<button type="submit">Mentés</button>
</form>
{% endblock content %}

View File

@@ -5,7 +5,7 @@
{% block content %}
<h3>Dokumentum szerkesztése - {{ document.title }}</h3>
<form method="post" action="{{ path('KekRozsakFrontBundle_documentEdit', {slug: document.slug}) }}">
{{ form_widget(form) }}
<button type="submit">Mentés</button>
{{ form_widget(form) }}
<button type="submit">Mentés</button>
</form>
{% endblock content %}

View File

@@ -4,7 +4,7 @@
{% block title %} - Dokumentum - {{ document.title }}{% endblock %}
{% block content %}
<h3>
{{ document.title }}{% if document.createdBy == app.user %} [ <a href="{{ path('KekRozsakFrontBundle_documentEdit', {slug: document.slug}) }}">Szerkesztés</a> ] {% endif %}
{{ document.title }}{% if document.createdBy == app.user %} [ <a href="{{ path('KekRozsakFrontBundle_documentEdit', {slug: document.slug}) }}">Szerkesztés</a> ] {% endif %}
</h3>
{{ document.content|raw }}
<div class="szerzo">{{ document.createdBy|userdataspan }}</div>

View File

@@ -1,16 +1,16 @@
{# vim: ft=htmljinja
#}
<html>
<head>
<title>Események</title>
</head>
<body>
<head>
<title>Események</title>
</head>
<body>
{% if events|length > 0 %}
<ul>
<ul>
{% for event in events %}
<li>{{ event.title }}</li>
<li>{{ event.title }}</li>
{% endfor %}
</ul>
</ul>
{% endif %}
</body>
</body>
</html>

View File

@@ -7,7 +7,7 @@
{% if events %}
<ul>
{% for event in events %}
<li><a href="{{ path('KekRozsakFrontBundle_eventView', {startDate: event.startDate|date('Y-m-d'), eventSlug: event.slug}) }}">{{ event.title }}</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_eventView', {startDate: event.startDate|date('Y-m-d'), eventSlug: event.slug}) }}">{{ event.title }}</a></li>
{% endfor %}
</ul>
{% else %}

View File

@@ -7,12 +7,12 @@
<p class="esemeny-idopont">{{ event.startDate|date('Y-m-d') }} {{ event.startTime|date('H:i') }}{% if event.endDate or event.endTime %} - {% endif %}{% if event.endDate is not null %} {{ event.endDate|date('Y-m-d') }}{% endif %}{% if event.endTime is not null %} {{ event.endTime|date('H:i') }}{% endif %}</p>
<p class="esemeny-szervezo">Az eseményt szervezi: {{ event.createdBy|userdataspan }}</p>
<p>
{{ event.description }}
{{ event.description }}
</p>
<h4>Eddigi résztvevők</h4>
<ul>
{% for attendee in event.attendees %}
<li>{{ attendee|userdataspan }}</li>
<li>{{ attendee|userdataspan }}</li>
{% endfor %}
</ul>
{% if not event.isAttending(app.user) and not event.isPast %}

View File

@@ -2,11 +2,11 @@
#}
{% block field_row %}
<tr>
<td>{{ form_label(form) }}</td>
<td>{{ form_widget(form) }}</td>
<td>
{{ help }}
</td>
<td>{{ form_errors(form) }}</td>
<td>{{ form_label(form) }}</td>
<td>{{ form_widget(form) }}</td>
<td>
{{ help }}
</td>
<td>{{ form_errors(form) }}</td>
</td>
{% endblock %}

View File

@@ -5,42 +5,42 @@
{% block content %}
<h3><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> - <a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a> - {{ topic.title }}</h3>
<table class="post-lista">
<tbody>
<tr>
<td class="uj-post">
<form method="post" action="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug } ) }}">
{{ form_widget(form) }}
<p>
<span class="eszkoztar">Súgó</span><span class="kuldes-gomb" /><button type="submit">Küldés</button>
</p>
</form>
</td>
<td class="felado">
<br />
<br />
[avatar]<br />
{{ app.user.displayName }}<br />
Saját szint<br />
<br />
Tagság kezdete:<br />
{{ app.user.registeredAt|date('Y-m-d') }}
</td>
</tr>
<tbody>
<tr>
<td class="uj-post">
<form method="post" action="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug } ) }}">
{{ form_widget(form) }}
<p>
<span class="eszkoztar">Súgó</span><span class="kuldes-gomb" /><button type="submit">Küldés</button>
</p>
</form>
</td>
<td class="felado">
<br />
<br />
[avatar]<br />
{{ app.user.displayName }}<br />
Saját szint<br />
<br />
Tagság kezdete:<br />
{{ app.user.registeredAt|date('Y-m-d') }}
</td>
</tr>
{% for post in posts %}
<tr>
<td class="szoveg"><div>{{ post.text|bbdecode }}</div></td>
<td class="felado">
{{ post.createdAt|date('Y-m-d') }}<br />
{{ post.createdAt|date('H:i') }}<br />
[avatar]<br />
{{ post.createdBy|userdataspan }}<br />
Szint<br />
<br />
Tagság kezdete:<br />
{{ post.createdBy.RegisteredAt|date('Y-m-d') }}
</td>
</tr>
<tr>
<td class="szoveg"><div>{{ post.text|bbdecode }}</div></td>
<td class="felado">
{{ post.createdAt|date('Y-m-d') }}<br />
{{ post.createdAt|date('H:i') }}<br />
[avatar]<br />
{{ post.createdBy|userdataspan }}<br />
Szint<br />
<br />
Tagság kezdete:<br />
{{ post.createdBy.RegisteredAt|date('Y-m-d') }}
</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
{% endblock %}

View File

@@ -6,36 +6,36 @@
<h3>Fórum</h3>
{% for topicGroup in topicGroups %}
<table class="forum-lista">
<thead>
<tr>
<td colspan="2"><a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a></td>
<td>Hozzászólások száma</td>
<td>Utolsó hozzászólás</td>
</tr>
</thead>
<tbody>
<thead>
<tr>
<td colspan="2"><a href="{{ path('KekRozsakFrontBundle_forumTopicList', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a></td>
<td>Hozzászólások száma</td>
<td>Utolsó hozzászólás</td>
</tr>
</thead>
<tbody>
{% if topicGroup.topics|length > 0 %}
{% for topic in topicGroup.topics %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>
<td></td>
<td>
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>
<td></td>
<td>
{% if topic.lastPost %}
{{ topic.lastPost.createdBy|userdataspan }}<br />
{{ topic.lastPost.createdAt|date('Y-m-d H:i') }}
{{ topic.lastPost.createdBy|userdataspan }}<br />
{{ topic.lastPost.createdAt|date('Y-m-d H:i') }}
{% else %}
&nbsp;<br />&nbsp;
&nbsp;<br />&nbsp;
{% endif %}
</td>
</tr>
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="4">Ebben a kategóriában nincsenek témák</td>
</tr>
<tr>
<td colspan="4">Ebben a kategóriában nincsenek témák</td>
</tr>
{% endif %}
</tbody>
</tbody>
</table>
{% endfor %}
{% endblock content %}

View File

@@ -6,29 +6,29 @@
<h3><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> - {{ topicGroup.title }}</h3>
{% if topicGroup.topics|length > 0 %}
<table class="forum-lista">
<thead>
<tr>
<td></td>
<td>Hozzászólások száma</td>
<td>Utolsó hozzászólás</td>
</tr>
</thead>
<tbody>
<thead>
<tr>
<td></td>
<td>Hozzászólások száma</td>
<td>Utolsó hozzászólás</td>
</tr>
</thead>
<tbody>
{% for topic in topicGroup.topics %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>
<td></td>
<td>
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>
<td></td>
<td>
{% if topic.lastPost %}
{{ topic.lastPost.createdBy|userdataspan }}<br />
{{ topic.lastPost.createdAt|date('Y-m-d H:i') }}
{{ topic.lastPost.createdBy|userdataspan }}<br />
{{ topic.lastPost.createdAt|date('Y-m-d H:i') }}
{% else %}
&nbsp;<br />&nbsp;
&nbsp;<br />&nbsp;
{% endif %}
</td>
</tr>
</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
{% else %}
Ebben a témakörben nincsenek témák.

View File

@@ -4,7 +4,8 @@
{% block title %} - Csoport létrehozása{% endblock %}
{% block content %}
<h3>Csoport létrehozása</h3>
<p>Warning</p>
{# TODO: Leírást készíteni ide, hogy mivel jár a csoportok létrehozása #}
<p></p>
<form method="post" action="{{ path('KekRozsakFrontBundle_groupCreate') }}">
{{ form_widget(form) }}
<button type="submit">Létrehozás</button>

View File

@@ -2,34 +2,31 @@
#}
{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %}
{% block title %} - {{ group.name }}{% endblock %}
{% block additional_css %}
<link rel="stylesheet" href="{{ asset('css/group.css') }}" type="text/css" />
{% endblock additional_css %}
{% block content %}
<ul id="submenu">
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', {slug: group.slug}) }}">Tagok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">Leírás</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', {slug: group.slug}) }}">Tagok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">Leírás</a></li>
</ul>
<h3>{{ group.name }} - Dokumentumok</h3>
<table>
<thead>
<tr>
<td colspan="2">Cím</td>
<td>Készítette</td>
</tr>
</thead>
<tbody>
<thead>
<tr>
<td colspan="2">Cím</td>
<td>Készítette</td>
</tr>
</thead>
<tbody>
{% for document in group.documents %}
<tr>
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_documentView', {slug: document.slug}) }}">{{ document.title }}</a></td>
<td>
{{ document.createdBy|userdataspan }}<br />
{{ document.createdAt|date('Y-m-d H:i') }}
</td>
</tr>
<tr>
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_documentView', {slug: document.slug}) }}">{{ document.title }}</a></td>
<td>
{{ document.createdBy|userdataspan }}<br />
{{ document.createdAt|date('Y-m-d H:i') }}
</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
<a href="{{ path('KekRozsakFrontBundle_documentCreate', {slug: group.slug}) }}">Új dokumentum</a>
{% endblock %}

View File

@@ -9,53 +9,47 @@
<p>Szintén fontos, hogy egy új csoport létrehozása nem tesz azonnal annak vezetőjévé, azt a csoport tagjainak meg kell szavazniuk, vagy a Véneknek jóváhagyniuk, hiszen a Kék Rózsák, ezáltal annak csoportjai is az egyenlőség elvén működnek.</p>
<p>Amennyiben látni szeretnéd egy csoport leírását, kattints a csoport nevére!</p>
<table>
<thead>
<tr>
<td colspan="2">Csoport neve</td>
<td>Státusz</td>
<td>Vezető</td>
</tr>
</thead>
<tbody>
<thead>
<tr>
<td colspan="2">Csoport neve</td>
<td>Státusz</td>
<td>Vezető</td>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>[ikon]</td>
<td class="csoport" title="|Csoport leírás|{{ group.description }}"><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">{{ group.name }}</a></td>
<td>
{% if group.isMember(app.user) %}
<span title="|Állapot|Már tag vagy" class="ikon">[tag ikon]</span>
{% elseif group.isRequested(app.user) %}
<span title="|Állapot|Már jelentkeztél, de a jelentkezésedet a csoport vezetője még nem fogadta el" class="ikon">[jelentkeztél ikon]</span>
{% else %}
{% if group.isOpen %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin', {slug: group.slug}) }}"><span title="|Állapot|Nyílt csoport, kattints a belépéshez!" class="ikon">[nyílt ikon]</span></a>
{% else %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin', {slug: group.slug}) }}"><span title="|Állapot|Zárt csoport, kattints a jelentkezéshez!" class="ikon">[zárt ikon]</span></a>
{% endif %}
{% endif %}
</td>
<td>{% if group.leader %}{{ group.leader|userdataspan }}{% else %}Nincs{% endif %}</td>
</tr>
<tr>
<td>[ikon]</td>
<td class="csoport" title="|Csoport leírás|{{ group.description }}"><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">{{ group.name }}</a></td>
<td>
{% if group.isMember(app.user) %}
<span title="|Állapot|Már tag vagy" class="ikon">[tag ikon]</span>
{% elseif group.isRequested(app.user) %}
<span title="|Állapot|Már jelentkeztél, de a jelentkezésedet a csoport vezetője még nem fogadta el" class="ikon">[jelentkeztél ikon]</span>
{% else %}
{% if group.isOpen %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin', {slug: group.slug}) }}"><span title="|Állapot|Nyílt csoport, kattints a belépéshez!" class="ikon">[nyílt ikon]</span></a>
{% else %}
<a href="{{ path('KekRozsakFrontBundle_groupJoin', {slug: group.slug}) }}"><span title="|Állapot|Zárt csoport, kattints a jelentkezéshez!" class="ikon">[zárt ikon]</span></a>
{% endif %}
{% endif %}
</td>
<td>{% if group.leader %}{{ group.leader|userdataspan }}{% else %}Nincs{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</tbody>
</table>
<a href="{{ path('KekRozsakFrontBundle_groupCreate') }}">Új csoport létrehozása</a>
{% endblock content %}
{% block bottomscripts %}
<script type="text/javascript">
$('.csoport').cluetip({
splitTitle: '|',
showTitle: false
});
$('.ikon').tooltip({
splitTitle: '|',
showTitle: false
});
</script>
<script type="text/javascript">
$('.csoport').cluetip({
splitTitle: '|',
showTitle: false
});
$('.ikon').tooltip({
splitTitle: '|',
showTitle: false
});
</script>
{% endblock bottomscripts %}

View File

@@ -2,13 +2,10 @@
#}
{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %}
{% block title %} - {{ group.name }}{% endblock %}
{% block additional_css %}
<link rel="stylesheet" href="{{ asset('css/group.css') }}" type="text/css" />
{% endblock additional_css %}
{% block content %}
<ul id="submenu">
<li><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">Leírás</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {slug: group.slug}) }}">Dokumentumok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupView', {slug: group.slug}) }}">Leírás</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {slug: group.slug}) }}">Dokumentumok</a></li>
</ul>
<h3>{{ group.name }} - Tagok</h3>
<ul>
@@ -18,4 +15,4 @@
{% endif %}
{% endfor %}
</ul>
{% endblock %}
{% endblock content %}

View File

@@ -3,12 +3,12 @@
{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %}
{% block title %} - {{ group.name }}{% endblock %}
{% block additional_css %}
<link rel="stylesheet" href="{{ asset('css/group.css') }}" type="text/css" />
<link rel="stylesheet" href="{{ asset('css/group.css') }}" type="text/css" />
{% endblock additional_css %}
{% block content %}
<ul id="submenu">
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', {slug: group.slug}) }}">Tagok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {slug: group.slug}) }}">Dokumentumok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', {slug: group.slug}) }}">Tagok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {slug: group.slug}) }}">Dokumentumok</a></li>
</ul>
<h3>{{ group.name }}</h3>
{{ group.description|raw }}