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

Added group views

master
Polonkai Gergely 10 years ago
parent 973b331825
commit 91b6f9f8b9
  1. 8
      app/Resources/views/main_template.html.twig
  2. 45
      src/KekRozsak/FrontBundle/Controller/DefaultController.php
  3. 12
      src/KekRozsak/FrontBundle/Resources/views/Default/groupDocuments.html.twig
  4. 19
      src/KekRozsak/FrontBundle/Resources/views/Default/groupMembers.html.twig
  5. 13
      src/KekRozsak/FrontBundle/Resources/views/Default/groupView.html.twig
  6. 11
      web/css/group.css

@ -4,10 +4,12 @@
<title>Kék Rózsák{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ asset('css/kekrozsak_front.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ asset('css/jquery.tooltip.css') }}" />
{% block additional_css %}{% endblock %}
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="{{ asset('js/jquery.bgiframe.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/jquery.dimensions.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/jquery.tooltip.min.js') }}"></script>
{% block additional_js %}{% endblock %}
</head>
<body>
<div id="top-line-wrapper">
@ -22,6 +24,12 @@
Jogosultság<br />
<dl>
<dt>Csoportjaim</dt>
{% for group in app.user.groups %}
{% if group.group.open or group.membershipAcceptedAt %}
<dl><a href="{{ path('KekRozsakFrontBundle_groupView', {groupSlug: group.group.slug}) }}">{{ group.group.name }}</a></dl>
{% endif %}
<dl><a href="{{ path('KekRozsakFrontBundle_groupList') }}">További csoportok</a></dl>
{% endfor %}
<dt>Kedvenc Fórum-témáim</dt>

@ -91,6 +91,51 @@ class DefaultController extends Controller
);
}
/**
* @Route("/csoport/{groupSlug}", name="KekRozsakFrontBundle_groupView")
* @Template()
*/
public function groupViewAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/tagok", name="KekRozsakFrontBundle_groupMembers")
* @Template()
*/
public function groupMembersAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/dokumentumok", name="KekRozsakFrontBundle_groupDocuments")
* @Template()
*/
public function groupDocumentsAction($groupSlug)
{
$groupRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Group');
if (!($group = $groupRepo->findOneBySlug($groupSlug)))
throw $this->createNotFoundException('A kért csoport nem létezik!');
return array(
'group' => $group,
);
}
/**
* @Route("/csoport/{groupSlug}/belepes", name="KekRozsakFrontBundle_groupJoin")
* @Template()

@ -0,0 +1,12 @@
{% extends '::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', {groupSlug: group.slug }) }}">Leírás</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', {groupSlug: group.slug }) }}">Tagok</a></li>
</ul>
<h3>{{ group.name }} - Dokumentumok</h3>
{% endblock %}

@ -0,0 +1,19 @@
{% extends '::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', {groupSlug: group.slug }) }}">Leírás</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {groupSlug: group.slug }) }}">Dokumentumok</a></li>
</ul>
<h3>{{ group.name }} - Tagok</h3>
<ul>
{% for user in group.members %}
{% if group.isMember(user.user) %}
<li>{{ user.user.displayName }}</li>
{% endif %}
{% endfor %}
</ul>
{% endblock %}

@ -0,0 +1,13 @@
{% extends '::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', {groupSlug: group.slug }) }}">Tagok</a></li>
<li><a href="{{ path('KekRozsakFrontBundle_groupDocuments', {groupSlug: group.slug }) }}">Dokumentumok</a></li>
</ul>
<h3>{{ group.name }}</h3>
{{ group.description }}
{% endblock %}

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