parent
73ef65f787
commit
0f3760ff93
@ -1 +1,18 @@ |
||||
123 |
||||
{% extends "AvanzuAdminThemeBundle:layout:base-layout.html.twig" %} |
||||
|
||||
{% block title %} |
||||
{#{{ parent() }}#} |
||||
{{ 'Institution' | get_setting }} - {{ 'siteName' | get_setting }} |
||||
{% endblock %} |
||||
|
||||
{% block avanzu_logo %} |
||||
{{ 'Institution' | get_setting }} |
||||
{% endblock %} |
||||
|
||||
{% block page_title %} |
||||
{% if page is defined %} |
||||
{{ page.name }} |
||||
{% else %} |
||||
{{ parent() }} |
||||
{% endif %} |
||||
{% endblock %} |
||||
|
@ -0,0 +1,19 @@ |
||||
<?php |
||||
|
||||
namespace ChamiloLMS\MessageBundle; |
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle; |
||||
use Symfony\Component\Console\Application; |
||||
use ChamiloLMS\InstallerBundle\Command\InstallCommand; |
||||
|
||||
/** |
||||
* Class ChamiloLMSMessageBundle |
||||
* @package ChamiloLMS\ChamiloLMSMessageBundle |
||||
*/ |
||||
class ChamiloLMSMessageBundle extends Bundle |
||||
{ |
||||
public function getParent() |
||||
{ |
||||
return 'FOSMessageBundle'; |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
{% extends 'FOSMessageBundle::layout.html.twig' %} |
||||
|
||||
{% block fos_message_content %} |
||||
|
||||
<h2>{% trans from 'FOSMessageBundle' %}inbox{% endtrans %}</h2> |
||||
|
||||
{% include 'FOSMessageBundle:Message:threads_list.html.twig' with {'threads': threads} %} |
||||
|
||||
{% endblock %} |
@ -0,0 +1,74 @@ |
||||
<table class="table table-mailbox"> |
||||
<thead> |
||||
<tr> |
||||
<th>{% trans from 'FOSMessageBundle' %}subject{% endtrans %}</th> |
||||
<th>{% trans from 'FOSMessageBundle' %}starter{% endtrans %}</th> |
||||
<th>{% trans from 'FOSMessageBundle' %}startdate{% endtrans %}</th> |
||||
<th>{% trans from 'FOSMessageBundle' %}messages{% endtrans %}</th> |
||||
<th>{% trans from 'FOSMessageBundle' %}last_message{% endtrans %}</th> |
||||
<th>{% trans from 'FOSMessageBundle' %}actions{% endtrans %}</th> |
||||
</tr> |
||||
</thead> |
||||
|
||||
<tbody> |
||||
|
||||
{% if threads %} |
||||
{% for thread in threads %} |
||||
<tr> |
||||
<td> |
||||
<a href="{{ url('fos_message_thread_view', {'threadId': thread.id}) }}"> |
||||
{{ thread.subject }} |
||||
</a> |
||||
|
||||
{% if not fos_message_is_read(thread) %} |
||||
({% trans from 'FOSMessageBundle' %}new{% endtrans %}) |
||||
{% endif %} |
||||
</td> |
||||
<td> |
||||
{{ thread.createdBy }} |
||||
</td> |
||||
<td> |
||||
{{ thread.createdAt|date }} |
||||
</td> |
||||
<td> |
||||
{{ thread.messages|length }} |
||||
</td> |
||||
<td> |
||||
{% if thread.lastMessage %} |
||||
<a href="{{ url('fos_message_thread_view', {'threadId': thread.id}) }}#message_{{ thread.lastMessage.id }}" title="{% trans from 'FOSMessageBundle' %}goto_last{% endtrans %}"> |
||||
→ |
||||
</a> |
||||
{% trans with {'%date%': thread.lastMessage.createdAt|date} from 'FOSMessageBundle' %}on{% endtrans %} |
||||
<br /> |
||||
{% trans with {'%sender%': thread.lastMessage.sender|e } from 'FOSMessageBundle' %}by{% endtrans %} |
||||
{% else %} |
||||
---- |
||||
{% endif %} |
||||
</td> |
||||
<td> |
||||
{% if fos_message_can_delete_thread(thread) %} |
||||
{% if fos_message_deleted_by_participant(thread) %} |
||||
{% set formAction %}{{ url('fos_message_thread_undelete', {'threadId': thread.id}) }}{% endset %} |
||||
{% set submitValue %}{% trans from 'FOSMessageBundle' %}undelete{% endtrans %}{% endset %} |
||||
{% else %} |
||||
{% set formAction %}{{ url('fos_message_thread_delete', {'threadId': thread.id}) }}{% endset %} |
||||
{% set submitValue %}{% trans from 'FOSMessageBundle' %}delete{% endtrans %}{% endset %} |
||||
{% endif %} |
||||
<form action="{{ formAction }}" method="post"> |
||||
<input type="submit" value="{{ submitValue }}" /> |
||||
</form> |
||||
{% endif %} |
||||
</td> |
||||
</tr> |
||||
{% endfor %} |
||||
{% else %} |
||||
<tr> |
||||
<td colspan="6"> |
||||
{% trans from 'FOSMessageBundle' %}no_thread{% endtrans %}. |
||||
</td> |
||||
</tr> |
||||
{% endif %} |
||||
|
||||
</tbody> |
||||
|
||||
</table> |
Loading…
Reference in new issue