The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Revised Forum Controller and Templates

Signed-off-by: Polonkai Gergely <polesz@w00d5t0ck.info>
master
Polonkai Gergely 11 years ago
parent b82eb93bf7
commit aa884ae798
  1. 2
      app/Resources/views/Box/UserProfile.html.twig
  2. 16
      src/KekRozsak/FrontBundle/Controller/ForumController.php
  3. 4
      src/KekRozsak/FrontBundle/Resources/views/Forum/postList.html.twig
  4. 4
      src/KekRozsak/FrontBundle/Resources/views/Forum/topicGroupList.html.twig
  5. 4
      src/KekRozsak/FrontBundle/Resources/views/Forum/topicList.html.twig

@ -18,7 +18,7 @@
<dt>Kedvenc Fórum-témáim</dt>
<dl><a href="{{ path('KekRozsakFrontBundle_forum_main') }}">Fórum</a></dl>
<dl><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a></dl>
<dt>Üzenetek</dt>
</dl>

@ -18,10 +18,10 @@ use KekRozsak\FrontBundle\Form\Type\ForumPostType;
class ForumController extends Controller
{
/**
* @Route("", name="KekRozsakFrontBundle_forum_main")
* @Template("KekRozsakFrontBundle:Forum:topic_group_list.html.twig")
* @Route("", name="KekRozsakFrontBundle_forumTopicGroupList")
* @Template()
*/
public function mainAction()
public function topicGroupListAction()
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:ForumTopicGroup');
@ -34,8 +34,8 @@ class ForumController extends Controller
}
/**
* @Route("/{slug}", name="KekRozsakFrontBundle_forum_topic_list")
* @Template("KekRozsakFrontBundle:Forum:topic_list.html.twig")
* @Route("/{slug}", name="KekRozsakFrontBundle_forumTopicList")
* @Template()
* @ParamConverter("topicGroup")
*/
public function topicListAction(ForumTopicgRoup $topicGroup)
@ -46,8 +46,8 @@ class ForumController extends Controller
}
/**
* @Route("/{topicGroupSlug}/{topicSlug}", name="KekRozsakFrontBundle_forum_post_list")
* @Template("KekRozsakFrontBundle:Forum:post_list.html.twig")
* @Route("/{topicGroupSlug}/{topicSlug}", name="KekRozsakFrontBundle_forumPostList")
* @Template()
* @ParamConverter("topic", options={"mapping"={"topicGroup"="topicGroup", "topicSlug"="slug"}})
* @ParamConverter("topicGroup", options={"mapping"={"topicGroupSlug"="slug"}})
*/
@ -76,7 +76,7 @@ class ForumController extends Controller
$em->persist($topic);
$em->flush();
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_forum_post_list', array(
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_forumPostList', array(
'topicGroupSlug' => $topicGroup->getSlug(),
'topicSlug' => $topic->getSlug(),
)));

@ -3,12 +3,12 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Fórum - {{ topicGroup.title }} - {{ topic.title }}{% endblock %}
{% block content %}
<h3><a href="{{ path('KekRozsakFrontBundle_forum_main') }}">Fórum</a> - <a href="{{ path('KekRozsakFrontBundle_forum_topic_list', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a> - {{ topic.title }}</h3>
<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_forum_post_list', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug } ) }}">
<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>

@ -8,7 +8,7 @@
<table class="forum-lista">
<thead>
<tr>
<td colspan="2"><a href="{{ path('KekRozsakFrontBundle_forum_topic_list', {slug: topicGroup.slug}) }}">{{ topicGroup.title }}</a></td>
<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>
@ -18,7 +18,7 @@
{% for topic in topicGroup.topics %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_forum_post_list', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', {topicGroupSlug: topicGroup.slug, topicSlug: topic.slug}) }}">{{ topic.title }}</a></td>
<td></td>
<td>
{% if topic.lastPost %}

@ -3,7 +3,7 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Fórum - {{ topicGroup.title }}{% endblock %}
{% block content %}
<h3><a href="{{ path('KekRozsakFrontBundle_forum_main') }}">Fórum</a> - {{ topicGroup.title }}</h3>
<h3><a href="{{ path('KekRozsakFrontBundle_forumTopicGroupList') }}">Fórum</a> - {{ topicGroup.title }}</h3>
{% if topicGroup.topics|length > 0 %}
<table class="forum-lista">
<thead>
@ -16,7 +16,7 @@
<tbody>
{% for topic in topicGroup.topics %}
<tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
<td><a href="{{ path('KekRozsakFrontBundle_forum_post_list', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>
<td><a href="{{ path('KekRozsakFrontBundle_forumPostList', { topicGroupSlug: topicGroup.slug, topicSlug: topic.slug }) }}">{{ topic.title }}</a></td>
<td></td>
<td>
{% if topic.lastPost %}
Loading…
Cancel
Save