Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webapp/polls/templates/poll-list.html
blob: 5709150edcfffb8b1bd0e060da2559f9c626a0ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{% extends "base-poll.html" %}
{% load poll_tags util_tags %}

{% block main_container %}
    <script type="text/javascript">
        var sortingOrder = 'status';
        var searchableFields = ['name', 'status', 'assigned_to'];
    </script>

    <div ng-app ng-controller="ctrlRead">
        <div class="input-append">
            <input type="text" ng-model="query" ng-change="search()" class="input-large search-query" placeholder="Buscar">
        <span class="add-on"><i class="icon-search"></i></span>
        </div>
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="name span3">Nombre&nbsp;<a ng-click="sort_by('name')"><i class="icon-sort"></i></a></th>
                    <th class="assigned_to span3">Asignada a&nbsp;<a ng-click="sort_by('assigned_to')"><i class="icon-sort"></i></a></th>
                    <th class="status">Estado&nbsp;<a ng-click="sort_by('status')"><i class="icon-sort"></i></a></th>
                    <th colspan="5"><center>Acciones</center></th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="item in pagedItems[currentPage] | orderBy:sortingOrder:reverse" style="background-color: {% ng item.background_color %};">
                    <td>{% ng item.name %}</td>
                    <td>{% ng item.assigned_to %}</td>
                    <td>{% ng item.status %}</td>
                    <td>
                        <a class="btn {% ng item.action_result_view.disabled %}" href="{% ng item.action_result_view.url %}">
                            <i class="icon-eye-open"></i>&nbsp;Resultados
                        </a>
                    </td>
                    <td>
                        <a class="btn {% ng item.action_edit.disabled %}" href="{% ng item.action_edit.url %}">
                            <i class="icon-edit"></i>&nbsp;Modificar
                        </a>
                    </td>
                    <td>
                        <a class="btn {% ng item.action_structure_builder.disabled %}" href="{% ng item.action_structure_builder.url %}">
                            <i class="icon-wrench"></i>&nbsp;Modificar estructura
                        </a>
                    </td>
                    <td>
                        <a class="download_button btn {% ng item.action_download.disabled %}" href="{% ng item.action_download.url %}">
                            <i class="icon-download-alt"></i>&nbsp;Descargar
                        </a>
                    </td>
                    <td>
                        <a class="btn" href="{% ng item.action_clone.url %}">
                            <i class="icon-copy"></i>&nbsp;Clonar
                        </a>
                    </td>
                </tr>
            </tbody>
            {% include "paginator_footer.html" %}
        </table>
    </div>

    {% paginator_for polls|json %}

    <script type="text/javascript">

        (function($){

            $(document).ready(function(){
                $('a.disabled').click(function() { return false; });

                $(".download_button").on('click', function(event){

                    if(!confirm('Usted esta por descargar una encuesta con rol de "investigar" o "administrador del sitio" y debe tener en encuenta lo siguiente:\n\n \
1) Esta encuesta debe ser usada solo con el fin de probar la interfaz de completado.\n\n \
2) Un "Encuestador" debe descargar la encuesta correspondiente para poder seguir el flujo que indica el sistema.\n\n \
¿Desea continuar con la descarga de todas maneras?\n \
                    ')) {
                        event.preventDefault();
                    }
                });

            });

        })(jQuery);

    </script>

{% endblock %}