Made document editing possible

This commit is contained in:
Polonkai Gergely
2012-07-22 19:38:00 +02:00
parent 1b55b079f4
commit b82b4ffd34
136 changed files with 2734 additions and 1289 deletions

View File

@@ -0,0 +1,9 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Dokumentum létrehozása{% endblock %}
{% block content %}
<h3>Új dokumentum létrehozása</h3>
<form method="post" action="{{ path('KekRozsakFrontBundle_documentCreate', { groupSlug: defaultGroup }) }}">
{{ form_widget(form) }}
<button type="submit">Mentés</button>
</form>
{% endblock content %}

View File

@@ -1,7 +0,0 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Dokumentum - {{ document.title }}{% endblock %}
{% block content %}
<h3>{{ document.title }}</h3>
{{ document.content }}
<div class="szerzo">{{ document.createdBy.displayName }}</div>
{% endblock content %}

View File

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

View File

@@ -0,0 +1,9 @@
{% extends '::main_template.html.twig' %}
{% block title %} - Dokumentum - {{ document.title }}{% endblock %}
{% block content %}
<h3>
{{ document.title }}{% if document.createdBy == app.user %} [ <a href="{{ path('KekRozsakFrontBundle_documentEdit', { documentSlug: document.slug }) }}">Szerkesztés</a> ] {% endif %}
</h3>
{{ document.content|raw }}
<div class="szerzo">{{ document.createdBy.displayName }}</div>
{% endblock content %}

View File

@@ -9,9 +9,25 @@
<li><a href="{{ path('KekRozsakFrontBundle_groupMembers', { groupSlug: group.slug }) }}">Tagok</a></li>
</ul>
<h3>{{ group.name }} - Dokumentumok</h3>
<ul>
<table>
<thead>
<tr>
<td colspan="2">Cím</td>
<td>Készítette</td>
</tr>
</thead>
<tbody>
{% for document in group.documents %}
<li><a href="{{ path('KekRozsakFrontBundle_documentView', { documentSlug: document.slug }) }}">{{ document.title }}</a></li>
<tr>
<td>[ikon]</td>
<td><a href="{{ path('KekRozsakFrontBundle_documentView', { documentSlug: document.slug }) }}">{{ document.title }}</a></td>
<td>
{{ document.createdBy.displayName }}<br />
{{ document.createdAt|date('Y-m-d H:i') }}
</td>
</tr>
{% endfor %}
</ul>
</tbody>
</table>
<a href="{{ path('KekRozsakFrontBundle_documentCreate', { groupSlug: group.slug }) }}">Új dokumentum</a>
{% endblock %}