The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ
blueroses.hu project repository
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.
 
 
 
 
kekrozsak/src/KekRozsak/FrontBundle/Resources/views/Forum/topicGroupList.html.twig

77 lines
2.7 KiB

{# vim: ft=htmljinja
#}
{% extends 'KekRozsakFrontBundle:Default:main_template.html.twig' %}
{% form_theme newTopicGroupForm 'KekRozsakFrontBundle:Form:user_form.html.twig' %}
{% block title %} - Fórum{% endblock %}
{% block content %}
<h3>Fórum</h3>
{% if is_granted('ROLE_ADMIN') %}
<span class="gomb" id="new-topic-group-button">[Új témakör]</span><br />
<div id="new-topic-group">
{# TODO: make this an AJAX form #}
<form method="post" action="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">
<table>
{{ form_widget(newTopicGroupForm) }}
</table>
<button type="submit">Mentés</button>
</form>
</div>
{#
{% else %}
<span class="gomb">[Új témakör kérése]</span>
#}
{% endif %}
{% 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>
{% if topicGroup.topics|length > 0 %}
{% for topic in topicGroup.topics %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td>
[ikon]
{% if app.user.userData and app.user.userData.isFavouriteForumTopic(topic) %}
<span class="unfavourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="unfavourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-yellow-24.png') }}" alt="[Kedvenc]" /></span>
{% else %}
<span class="favourite-topic-button topicgroup-{{ topic.topicGroup.slug }}" id="favourite-topic-button-{{ topic.slug }}"><img src="{{ asset('bundles/kekrozsakfront/images/penta-blue-24.png') }}" alt="[Nem kedvenc]" /></span>
{% endif %}
</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') }}
{% else %}
&nbsp;<br />&nbsp;
{% endif %}
</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="4">Ebben a kategóriában nincsenek témák</td>
</tr>
{% endif %}
</tbody>
</table>
{% endfor %}
{% endblock content %}
{% block bottomscripts %}
<script type="text/javascript">
$(document).ready(function() {
$('#new-topic-group-button').click(function() {
alert('Juj!');
});
});
</script>
{% endblock bottomscripts %}