summaryrefslogtreecommitdiff
path: root/static/website/templates/ajax-keyword-search.html
blob: 234332a348258b0e73ad40abd76aaa348370c7e7 (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
{% if questions %}
<br>
<table class="table table-striped table-bordered table-hover">
    <th> FOSS </th>
    <th>TUTORIAL</th>
    <th> MIN</th>
    <th> SEC </th>
    <th> QUESTION</th>
    <th> DATE</th>
    <th> USER</th>
    {% for question in questions %}
    <tr>
        <td>
            <span href="#" class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
                {{ question.category|truncatechars:15 }} 
            </span>
            <a class="pull-right" href="{% url 'website:filter' question.category %}?qid={{ question.id }}">
                <span class="glyphicon glyphicon-search"></span>
            </a>
        </td>

        <td>
            <span class="tutorial" data-toggle="tooltip" data-placement="top" title="{{ question.tutorial}}">
                {{ question.tutorial|truncatechars:15 }}
            </span>
            <a class="pull-right" href="{% url 'website:filter' question.category question.tutorial %}?qid={{ question.id }}">
                <span class="glyphicon glyphicon-search"></span>
            </a>
        </td>

        <td>
            <span>
                <a href="{% url 'website:filter' question.category question.tutorial question.minute_range %}?qid={{ question.id }}">
                    {{ question.minute_range }}
                </a>
            </span>
        </td>

        <td>        
            <span>
                <a href="{% url 'website:filter' question.category question.tutorial question.minute_range question.second_range%}?qid={{ question.id }}">
                    {{ question.second_range }}
                </a>
            </span>
        </td>

        <td>
            <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
                <a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:45 }}</a>
            </span>            
        </td>

        <td>    
            <span>
                <i>
                    {{ question.date_created|date:"y-d-m" }}
                </i>
            </span>
        </td>
                
        <td>
                {{ question.user }}
        </td>
    </tr>
    {% endfor %}
</table>
{% else %}
    <h4>No results found . . .</h4>
{% endif %}

{% block javascript %}
<script>
    $('span').tooltip();
</script>
{% endblock %}