Added very basic forum functionality

This commit is contained in:
Polonkai Gergely
2012-07-03 14:56:28 +02:00
parent 0649408e60
commit 1af3a30c2a
10 changed files with 379 additions and 5 deletions

View File

@@ -1,5 +1,26 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Fórum - {{ topicGroup.title }} - {{ topic.title }}{% endblock %}
{% block content %}
<h3>Fórum - {{ topicGroup.title }} - {{ topic.title }}</h3>
<h3><a href="{{ path('KekRozsakFrontBundle_forum_main') }}">Fórum</a> - <a href="{{ path('KekRozsakFrontBundle_forum_topic_list', { topicGroupSlug: topicGroup.slug }) }}">{{ topicGroup.title }}</a> - {{ topic.title }}</h3>
{% if topic.posts|length > 0 %}
<table>
<thead>
</thead>
<tbody>
{% for post in topic.posts %}
<tr>
<td>
{{ post.createdBy.displayName }}<br />
{{ post.createdAt|date('Y-m-d H:i') }}<br />
Admin<br />
Tagság kezdete: {{ post.createdBy.RegisteredAt|date('Y-m-d') }}
</td>
<td>{{ post.text }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
A témában még nincsenek hozzászólások.
{% endif %}
{% endblock %}

View File

@@ -6,21 +6,26 @@
<table id="temakor-lista">
<thead>
<tr>
<td><a href="{{ path('KekRozsakFrontBundle_forum_topic_list', {topicGroupSlug: topicGroup.slug}) }}">{{ topicGroup.title }}</a></td>
<td></td>
<td colspan="2"><a href="{{ path('KekRozsakFrontBundle_forum_topic_list', {topicGroupSlug: topicGroup.slug}) }}">{{ topicGroup.title }}</a></td>
<td>Témák száma</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>
<td>[]</td>
<td><a href="{{ path('KekRozsakFrontBundle_forum_post_list', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>
<td></td>
<td></td>
<td></td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="2">Ebben a kategóriában nincsenek témák</td>
<td colspan="4">Ebben a kategóriában nincsenek témák</td>
</tr>
{% endif %}
</tbody>

View File

@@ -1,7 +1,7 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Fórum - {{ topicGroup.title }}{% endblock %}
{% block content %}
<h3>Fórum - {{ topicGroup.title }}</h3>
<h3><a href="{{ path('KekRozsakFrontBundle_forum_main') }}">Fórum</a> - {{ topicGroup.title }}</h3>
{% if topicGroup.topics|length > 0 %}
<table>
<thead>