Skip to content

Commit

Permalink
Fixed liuggio#16
Browse files Browse the repository at this point in the history
  • Loading branch information
gliderShip committed Jun 6, 2012
1 parent dbc51fd commit b846964
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 37 deletions.
15 changes: 10 additions & 5 deletions Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -169,25 +169,30 @@
<source>no_comments_available</source>
<target>There are no Comments available for this ticket</target>
</trans-unit>
<trans-unit id="40">
<source>no_ticket_found_message</source>
<target>no tickets found</target>
</trans-unit>


<!-- :::::::::: FORM LABELS :::::::::: -->
<trans-unit id="40">
<trans-unit id="41">
<source>search_ticket_label</source>
<target>search pattern</target>
</trans-unit>
<trans-unit id="41">
<trans-unit id="42">
<source>closeTicket_button</source>
<target>close ticket</target>
</trans-unit>
<trans-unit id="42">
<trans-unit id="43">
<source>comment_textarea_label</source>
<target>comment</target>
</trans-unit>
<trans-unit id="43">
<trans-unit id="44">
<source>addComment_button</source>
<target>add comment</target>
</trans-unit>
<trans-unit id="44">
<trans-unit id="45">
<source>replyComment_button</source>
<target>reply</target>
</trans-unit>
Expand Down
72 changes: 40 additions & 32 deletions Resources/views/Ticket/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h1>{{ "tickets_entity"|trans }}</h1>
<br />
<hr />
<hr />
<br />
<a href="{{ path('ticket', { 'state': 'open' }) }}">{{ "open_state"|trans }}</a>
<a href="{{ path('ticket', { 'state': 'closed' }) }}">{{ "closed_state"|trans }}</a>
Expand All @@ -15,57 +15,65 @@
<button type="submit">{{ "search_action"|trans }}</button>
</p>
</form>
<hr />
<hr />
<hr />

<br />
{% if app.session.hasFlash('notice') %}
<div class="flash-notice">
{{ app.session.flash('notice') }}
{{ app.session.flash('notice') }}
</div>
{% endif %}
<br />

{% if entities|length %}
<table class="records_list">
<thead>
<tr>
<th>{{ "id_property"|trans }}</th>
<th>{{ "subject_property"|trans }}</th>
<th>{{ "body_property"|trans }}</th>
<th>{{ "language_property"|trans }}</th>
<th>{{ "createdAt_property"|trans }}</th>
<th>{{ "updatedAt_property"|trans }}</th>
<th>{{ "actions_action"|trans }}</th>
</tr>
<tr>
<th>{{ "id_property"|trans }}</th>
<th>{{ "subject_property"|trans }}</th>
<th>{{ "body_property"|trans }}</th>
<th>{{ "language_property"|trans }}</th>
<th>{{ "createdAt_property"|trans }}</th>
<th>{{ "updatedAt_property"|trans }}</th>
<th>{{ "actions_action"|trans }}</th>
</tr>
</thead>
<tbody>
{% for entity in entities %}
<tr>
<td><a href="{{ path('ticket_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.subject }}</td>
<td>{{ entity.body }}</td>
<td>{{ entity.language }}</td>
<td>{% if entity.createdAt %}{{ entity.createdAt|date('Y-m-d H:i:s') }}{% endif%}</td>
<td>{% if entity.updatedAt %}{{ entity.updatedAt|date('Y-m-d H:i:s') }}{% endif%}</td>
<td>
<ul>
<li>
<a href="{{ path('ticket_show', { 'id': entity.id }) }}">{{ "show_action"|trans }}</a>
</li>
</ul>
</td>
</tr>
<tr>
<td><a href="{{ path('ticket_show', { 'id': entity.id }) }}">{{ entity.id }}</a></td>
<td>{{ entity.subject }}</td>
<td>{{ entity.body }}</td>
<td>{{ entity.language }}</td>
<td>{% if entity.createdAt %}{{ entity.createdAt|date('Y-m-d H:i:s') }}{% endif%}</td>
<td>{% if entity.updatedAt %}{{ entity.updatedAt|date('Y-m-d H:i:s') }}{% endif%}</td>
<td>
<ul>
<li>
<a href="{{ path('ticket_show', { 'id': entity.id }) }}">{{ "show_action"|trans }}</a>
</li>
</ul>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<br />
<p>
<h3>{{ "no_ticket_found_message"|trans }}</h3>
</p>
<br />
{% endif %}

{% if app.session.hasFlash('reRate_error_msg') %}
<div class="flash-notice">
{{ app.session.flash('reRate_error_msg'|trans) }}
<br />
{{ "ticket_id"|trans }}:{{ app.session.flash('ratedTickedId') }}
<br />
{{ "rating_assigned"|trans }}:{{ app.session.flash('rating') }}
{{ app.session.flash('reRate_error_msg'|trans) }}
<br />
{{ "ticket_id"|trans }}:{{ app.session.flash('ratedTickedId') }}
<br />
{{ "rating_assigned"|trans }}:{{ app.session.flash('rating') }}
</div>
{% endif %}
{% if app.session.hasFlash('thank_rate_msg') %}
Expand Down
8 changes: 8 additions & 0 deletions Resources/views/TicketAdmin/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{% endif %}
<br />

{% if entities|length %}
<table class="records_list">
<thead>
<tr>
Expand Down Expand Up @@ -53,3 +54,10 @@
{% endfor %}
</tbody>
</table>
% else %}
<br />
<p>
<h3>{{ "no_ticket_found_message"|trans }}</h3>
</p>
<br />
{% endif %}

0 comments on commit b846964

Please sign in to comment.