|
30 | 30 | </head>
|
31 | 31 |
|
32 | 32 | <body id="{{ explore }}" class="interior {{active}} g-font-muli">
|
33 |
| - {% include 'shared/tag_manager_2.html' %} |
34 |
| - <div class="container-fluid header dash"> |
35 |
| - {% include 'shared/top_nav.html' with class='d-md-flex' %} |
36 |
| - {% include 'home/nav.html' %} |
37 |
| - </div> |
38 |
| - {% block content %} |
39 |
| - <h2>Search</h2> |
40 |
| - |
41 |
| - <form method="get" action=""> |
42 |
| - <table> |
43 |
| - {{ form.as_table }} |
44 |
| - <tr> |
45 |
| - <td> </td> |
46 |
| - <td> |
47 |
| - <input type="submit" value="Search"> |
48 |
| - </td> |
49 |
| - </tr> |
50 |
| - </table> |
51 |
| - |
52 |
| - {% if query %} |
53 |
| - <h3>Results</h3> |
54 |
| - |
55 |
| - {% for result in page.object_list %} |
56 |
| - <p> |
57 |
| - <a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a> |
58 |
| - </p> |
59 |
| - {% empty %} |
60 |
| - <p>No results found.</p> |
61 |
| - {% endfor %} |
62 |
| - |
63 |
| - {% if page.has_previous or page.has_next %} |
64 |
| - <div> |
65 |
| - {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} |
66 |
| - | |
67 |
| - {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Next »{% if page.has_next %}</a>{% endif %} |
68 |
| - </div> |
69 |
| - {% endif %} |
70 |
| - {% else %} |
71 |
| - {# Show some example queries to run, maybe query syntax, something else? #} |
72 |
| - {% endif %} |
73 |
| - </form> |
74 |
| - {% endblock %} |
75 |
| - <div id="gc-users-directory" v-cloak> |
76 |
| - |
77 |
| - <section> |
78 |
| - <h1 class='is-title'>Hacky User Directory</h1> |
79 |
| - |
80 |
| - <hr class='is-line' /> |
81 |
| - |
82 |
| - <div class="filters" style="width : 90%; margin : 0 auto;"> |
83 |
| - <tag-filter :for="'searchbox'"></tag-filter> |
84 |
| - <tag-filter :for="'searchdatalist'"> |
85 |
| - <template slot-scope="{ data }"> |
86 |
| - [[ data._source.keywords ]] |
87 |
| - </template> |
88 |
| - </tag-filter> |
89 |
| - <tag-filter :for="'nlf'"> |
90 |
| - <template slot-scope="{ data }"> |
91 |
| - Number of Hacks Joined: [[ data._source.keywords ]] |
92 |
| - </template> |
93 |
| - </tag-filter> |
94 |
| - </div> |
95 |
| - |
96 |
| - <div class="is-columns"> |
97 |
| - <div class="is-column is-one-fifth"> |
| 33 | + <div class="content__main min-vh-100 d-md-flex flex-column"> |
| 34 | + {% include 'shared/tag_manager_2.html' %} |
| 35 | + <div class="container-fluid header dash"> |
| 36 | + {% include 'shared/top_nav.html' with class='d-md-flex' %} |
| 37 | + {% include 'home/nav.html' %} |
| 38 | + </div> |
| 39 | + {% block content %} |
| 40 | + <h2>Search</h2> |
| 41 | + |
| 42 | + <form method="get" action=""> |
| 43 | + <table> |
| 44 | + {{ form.as_table }} |
| 45 | + <tr> |
| 46 | + <td> </td> |
| 47 | + <td> |
| 48 | + <input type="submit" value="Search"> |
| 49 | + </td> |
| 50 | + </tr> |
| 51 | + </table> |
| 52 | + |
| 53 | + {% if query %} |
| 54 | + <h3>Results</h3> |
| 55 | + |
| 56 | + {% for result in page.object_list %} |
| 57 | + <p> |
| 58 | + <a href="{{ result.object.get_absolute_url }}">{{ result.object.title }}</a> |
| 59 | + </p> |
| 60 | + {% empty %} |
| 61 | + <p>No results found.</p> |
| 62 | + {% endfor %} |
| 63 | + |
| 64 | + {% if page.has_previous or page.has_next %} |
98 | 65 | <div>
|
99 |
| - <numeric-list-filter :id="'nlf'" :field="'num_hacks_joined'"> |
100 |
| - <template slot="header"> |
101 |
| - <h3 class="is-nlf-title">Number of Hacks Joined : </h3> |
102 |
| - </template> |
103 |
| - </numeric-list-filter> |
| 66 | + {% if page.has_previous %}<a href="?q={{ query }}&page={{ page.previous_page_number }}">{% endif %}« Previous{% if page.has_previous %}</a>{% endif %} |
| 67 | + | |
| 68 | + {% if page.has_next %}<a href="?q={{ query }}&page={{ page.next_page_number }}">{% endif %}Next »{% if page.has_next %}</a>{% endif %} |
104 | 69 | </div>
|
| 70 | + {% endif %} |
| 71 | + {% else %} |
| 72 | + {# Show some example queries to run, maybe query syntax, something else? #} |
| 73 | + {% endif %} |
| 74 | + </form> |
| 75 | + {% endblock %} |
| 76 | + <div id="gc-users-directory" v-cloak> |
| 77 | + |
| 78 | + <section> |
| 79 | + <h1 class='is-title'>Hacky User Directory</h1> |
| 80 | + |
| 81 | + <hr class='is-line' /> |
| 82 | + |
| 83 | + <div class="filters" style="width : 90%; margin : 0 auto;"> |
| 84 | + <tag-filter :for="'searchbox'"></tag-filter> |
| 85 | + <tag-filter :for="'searchdatalist'"> |
| 86 | + <template slot-scope="{ data }"> |
| 87 | + [[ data._source.keywords ]] |
| 88 | + </template> |
| 89 | + </tag-filter> |
| 90 | + <tag-filter :for="'nlf'"> |
| 91 | + <template slot-scope="{ data }"> |
| 92 | + Number of Hacks Joined: [[ data._source.keywords ]] |
| 93 | + </template> |
| 94 | + </tag-filter> |
105 | 95 | </div>
|
106 |
| - <div class="is-column"> |
107 |
| - <div> |
108 |
| - <searchbox :id="'searchbox'" :autofocus="true" :realtime="true" :timeout="200" :field="['keywords', 'handle', 'persona']" :placeholder="'Search by keyword'"></searchbox> |
109 |
| - <search-datalist :id="'searchdatalist'" :realtime="true" :field="'keywords'" :suggestion="['keywords']"> |
110 |
| - <template slot="items" slot-scope="{ item, value }"> |
111 |
| - [[ value ]] [[ item._source.keywords ]] |
112 |
| - </template> |
113 |
| - |
114 |
| - <template slot="nosuggestion" slot-scope="{ value }"> |
115 |
| - Sorry, "[[ value ]]" doesn't exist... :( |
116 |
| - </template> |
117 |
| - |
118 |
| - <template slot="suggestions" slot-scope="{ suggestion }"> |
119 |
| - <span v-html="suggestion.highlight.first_name ? suggestion.highlight.first_name[0] : suggestion._source.first_name"></span> |
120 |
| - <span v-html="suggestion.highlight.last_name ? suggestion.highlight.last_name[0] : suggestion._source.last_name"></span> |
121 |
| - <span v-html="suggestion.highlight.handle ? suggestion.highlight.handle[0] : suggestion._source.handle"></span> |
122 |
| - <span v-html="suggestion.highlight.persona ? suggestion.highlight.persona[0] : suggestion._source.persona"></span> |
123 |
| - </template> |
124 |
| - </search-datalist> |
125 |
| - |
126 |
| - <div style="margin: 20px auto;width: 90%"> |
127 |
| - <search-button></search-button> |
128 |
| - <reset-button :emptyHits="false"></reset-button> |
| 96 | + |
| 97 | + <div class="is-columns"> |
| 98 | + <div class="is-column is-one-fifth"> |
| 99 | + <div> |
| 100 | + <numeric-list-filter :id="'nlf'" :field="'num_hacks_joined'"> |
| 101 | + <template slot="header"> |
| 102 | + <h3 class="is-nlf-title">Number of Hacks Joined : </h3> |
| 103 | + </template> |
| 104 | + </numeric-list-filter> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + <div class="is-column"> |
| 108 | + <div> |
| 109 | + <searchbox :id="'searchbox'" :autofocus="true" :realtime="true" :timeout="200" :field="['keywords', 'handle', 'persona']" :placeholder="'Search by keyword'"></searchbox> |
| 110 | + <search-datalist :id="'searchdatalist'" :realtime="true" :field="'keywords'" :suggestion="['keywords']"> |
| 111 | + <template slot="items" slot-scope="{ item, value }"> |
| 112 | + [[ value ]] [[ item._source.keywords ]] |
| 113 | + </template> |
| 114 | + |
| 115 | + <template slot="nosuggestion" slot-scope="{ value }"> |
| 116 | + Sorry, "[[ value ]]" doesn't exist... :( |
| 117 | + </template> |
| 118 | + |
| 119 | + <template slot="suggestions" slot-scope="{ suggestion }"> |
| 120 | + <span v-html="suggestion.highlight.first_name ? suggestion.highlight.first_name[0] : suggestion._source.first_name"></span> |
| 121 | + <span v-html="suggestion.highlight.last_name ? suggestion.highlight.last_name[0] : suggestion._source.last_name"></span> |
| 122 | + <span v-html="suggestion.highlight.handle ? suggestion.highlight.handle[0] : suggestion._source.handle"></span> |
| 123 | + <span v-html="suggestion.highlight.persona ? suggestion.highlight.persona[0] : suggestion._source.persona"></span> |
| 124 | + </template> |
| 125 | + </search-datalist> |
| 126 | + |
| 127 | + <div style="margin: 20px auto;width: 90%"> |
| 128 | + <search-button></search-button> |
| 129 | + <reset-button :emptyHits="false"></reset-button> |
| 130 | + </div> |
| 131 | + <hits> |
| 132 | + <template slot="hits" slot-scope="{ hits }"> |
| 133 | + <div class="is-score is-hits"> |
| 134 | + <strong v-if="hits.score === 0">No result found</strong> |
| 135 | + <strong v-else-if="hits.score === 1">1 result found</strong> |
| 136 | + <strong v-else-if="hits.score > 1">[[ hits.score ]] results found</strong> |
| 137 | + </div> |
| 138 | + <div v-for="item in hits.items" :item="item"> |
| 139 | + <div><strong>Identity (firstname, lastname) :</strong> ([[ item._source.first_name ]] [[ item._source.last_name ]] )</div> |
| 140 | + </div> |
| 141 | + </template> |
| 142 | + </hits> |
| 143 | + |
| 144 | + <paginate :previousText="'⮜ Previous page'" :nextText="'Next page ⮞'" :size="10"></paginate> |
129 | 145 | </div>
|
130 |
| - <hits> |
131 |
| - <template slot="hits" slot-scope="{ hits }"> |
132 |
| - <div class="is-score is-hits"> |
133 |
| - <strong v-if="hits.score === 0">No result found</strong> |
134 |
| - <strong v-else-if="hits.score === 1">1 result found</strong> |
135 |
| - <strong v-else-if="hits.score > 1">[[ hits.score ]] results found</strong> |
136 |
| - </div> |
137 |
| - <div v-for="item in hits.items" :item="item"> |
138 |
| - <div><strong>Identity (firstname, lastname) :</strong> ([[ item._source.first_name ]] [[ item._source.last_name ]] )</div> |
139 |
| - </div> |
140 |
| - </template> |
141 |
| - </hits> |
142 |
| - |
143 |
| - <paginate :previousText="'⮜ Previous page'" :nextText="'Next page ⮞'" :size="10"></paginate> |
144 | 146 | </div>
|
145 | 147 | </div>
|
146 |
| - </div> |
147 |
| - </section> |
| 148 | + </section> |
| 149 | + </div> |
| 150 | + |
| 151 | + <script type="text/x-template" id="select2-template"> |
| 152 | + <select> |
| 153 | + <slot></slot> |
| 154 | + </select> |
| 155 | + </script> |
| 156 | + |
| 157 | + {% csrf_token %} |
| 158 | + {% include 'shared/analytics.html' %} |
| 159 | + {% include 'shared/footer_scripts.html' with slim=1 %} |
| 160 | + {% include 'shared/footer.html' %} |
148 | 161 | </div>
|
149 |
| - |
150 |
| - <script type="text/x-template" id="select2-template"> |
151 |
| - <select> |
152 |
| - <slot></slot> |
153 |
| - </select> |
154 |
| - </script> |
155 |
| - |
156 |
| - {% csrf_token %} |
157 |
| - {% include 'shared/analytics.html' %} |
158 |
| - {% include 'shared/footer_scripts.html' with slim=1 %} |
159 |
| - {% include 'shared/footer.html' %} |
160 | 162 | <script src="https://cdn.jsdelivr.net/npm/vue-innersearch@0.0.12/innersearch.min.js"></script>
|
161 | 163 |
|
162 | 164 |
|
|
0 commit comments