1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {#
- This file is part of the Sonata package.
- (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
- For the full copyright and license information, please view the LICENSE
- file that was distributed with this source code.
- #}
- {% extends base_template %}
- {% block actions %}
- <div class="sonata-actions btn-group">
- {% include 'SonataAdminBundle:Button:edit_button.html.twig' %}
- {% include 'SonataAdminBundle:Button:acl_button.html.twig' %}
- {% include 'SonataAdminBundle:Button:show_button.html.twig' %}
- {% include 'SonataAdminBundle:Button:list_button.html.twig' %}
- </div>
- {% endblock %}
- {% block content %}
- <div class="span5">
- <table class="table" id="revisions">
- <thead>
- <tr>
- <th>{{ "td_revision"|trans({}, 'SonataAdminBundle') }}</th>
- <th>{{ "td_timestamp"|trans({}, 'SonataAdminBundle') }}</th>
- <th>{{ "td_username"|trans({}, 'SonataAdminBundle') }}</th>
- <th>{{ "td_action"|trans({}, 'SonataAdminBundle') }}</th>
- </tr>
- </thead>
- <tbody>
- {% for revision in revisions %}
- <tr>
- <td>{{ revision.rev}}</td>
- <td>{% include admin.getTemplate('history_revision_timestamp') %}</td>
- <td>{{ revision.username}}</td>
- <td><a href="{{ admin.generateObjectUrl('history_view_revision', object, {'revision': revision.rev }) }}" class="revision-link" rel="{{ revision.rev }}">{{ "label_view_revision"|trans({}, 'SonataAdminBundle') }}</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- <div id="revision-detail" class="span7 revision-detail">
- </div>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- jQuery('a.revision-link').bind('click', function(event) {
- event.stopPropagation();
- event.preventDefault();
- jQuery('#revision-detail').html('');
- jQuery('table#revisions tbody tr').removeClass('current');
- jQuery(this).parent('').removeClass('current');
- jQuery.ajax({
- url: jQuery(this).attr('href'),
- dataType: 'html',
- success: function(data) {
- jQuery('#revision-detail').html(data);
- }
- });
- return false;
- })
- });
- </script>
- {% endblock %}
|