|
11 | 11 | <form class="form-inline" method="get" action="{{ urlFor( route ) }}" role="form"> |
12 | 12 | <input type="hidden" name="p" value="0"> |
13 | 13 | <div class="form-group"> |
14 | | - <label class="sr-only" for="lastname">{{ 'form-lname'|message }}</label> |
15 | | - <input type="text" name="l" id="lastname" placeholder="{{ 'form-lname'|message }}" value="{{ l }}"> |
| 14 | + <label class="sr-only" for="t">{{ 'proposals-search-title'|message }}</label> |
| 15 | + <input type="text" id="t" name="t" class="form-control" placeholder="{{ 'proposals-search-title'|message }}" value="{{ t }}"> |
16 | 16 | </div> |
17 | 17 | <div class="form-group"> |
18 | | - <label class="sr-only" for="firstname">{{ 'form-fname'|message }}</label> |
19 | | - <input type="text" name="f" id="firstname" placeholder="{{ 'form-fname'|message }}" value="{{ f }}"> |
| 18 | + <label class="sr-only" for="th">{{ 'proposals-search-theme'|message }}</label> |
| 19 | + <select id="th" name="th" class="form-control"> |
| 20 | + <option value="">{{ 'proposals-search-theme-empty'|message }}</option> |
| 21 | + {{ forms.select( ctx, 'proposals-edit-theme', 'theme', { 'online':'online', 'offline':'offline', 'tool':'tool', 'research':'research' }, { 'required':true } ) }} |
| 22 | + {% for val in [ 'online', 'offline', 'tool', 'research' ] %} |
| 23 | + <option value="{{ val }}" {{ val == th ? 'selected="selected"' }}>{{ val }}</option> |
| 24 | + {% endfor %} |
| 25 | + </select> |
20 | 26 | </div> |
21 | 27 | <div class="form-group"> |
22 | | - <label class="sr-only" for="residence">{{ 'form-residence'|message }}</label> |
23 | | - <input type="text" name="r" id="residence" placeholder="{{ 'form-residence'|message }}" value="{{ r }}"> |
24 | | - </div> |
25 | | - <div class="form-group"> |
26 | | - <label class="sr-only" for="region">{{ 'search-region'|message }}</label> |
27 | | - <input type="text" name="rg" id="region" placeholder="{{ 'search-region'|message }}" value="{{ rg }}"> |
28 | | - </div> |
29 | | - <div class="form-group"> |
30 | | - <input type="submit" class="btn btn-sm btn-primary" value="{{ 'search'|message }}" /> |
| 28 | + <button type="submit" class="btn btn-sm btn-primary"> |
| 29 | + <i class="glyphicon glyphicon-search"></i> |
| 30 | + {{ 'proposals-search-go'|message }} |
| 31 | + </button> |
31 | 32 | </div> |
32 | 33 | </form> |
33 | 34 |
|
|
36 | 37 | {% if found is not null %} |
37 | 38 | <table class="table table-striped table-hover table-condensed table-responsive"> |
38 | 39 | <tr> |
39 | | - <th>{{ 'review-list-id'|message }}</th> |
40 | | - <th>{{ 'review-list-name'|message }}</th> |
41 | | - <th>{{ 'review-list-email'|message }}</th> |
42 | | - <th>{{ 'review-list-residence'|message }}</th> |
43 | | - <th>{{ 'review-list-gender'|message }}</th> |
44 | | - <th>{{ 'review-list-age'|message }}</th> |
45 | | - <th>{{ 'review-list-p1-score'|message }}</th> |
| 40 | + <th>{{ 'proposals-list-id'|message }}</th> |
| 41 | + <th>{{ 'proposals-list-title'|message }}</th> |
| 42 | + <th>{{ 'proposals-list-url'|message }}</th> |
| 43 | + <th>{{ 'proposals-list-theme'|message }}</th> |
| 44 | + <th>{{ 'proposals-list-amount'|message }}</th> |
| 45 | + <th>{{ 'proposals-list-reviews'|message }}</th> |
| 46 | + <th>{{ 'proposals-list-myreviews'|message }}</th> |
46 | 47 | </tr> |
47 | 48 | {% for row in records %} |
48 | 49 | <tr> |
49 | 50 | <td>{{ row.id }}</td> |
50 | | - <td><a href="{{ urlFor( 'proposals_view' ) }}?id={{ row.id }}">{{ row.title }}</a></td> |
51 | | - <td>{{ row.email }}</td> |
52 | | - <td>{{ row.country_name }}</td> |
53 | | - <td>{{ row.gender }}</td> |
54 | | - <td>{{ row.age }}</td> |
55 | | - <td>{{ row.p1count ? row.p1score : '-' }}</td> |
| 51 | + <td><a href="{{ urlFor( 'proposals_view', { 'id':row.id } ) }}">{{ row.title }}</a></td> |
| 52 | + <td><a href="{{ row.url|raw }}" target="_blank">{{ row.url }}</a></td> |
| 53 | + <td>{{ row.theme }}</td> |
| 54 | + <td class="text-right">{{ row.amount|number_format }}</td> |
| 55 | + <td class="text-right">{{ row.review_count|number_format }}</td> |
| 56 | + <td class="text-center"><i class="glyphicon glyphicon-{{ row.my_review_count ? 'ok' }}"></i></td> |
56 | 57 | </tr> |
57 | 58 | {% else %} |
58 | 59 | <tr><td colspan="8">{{ 'no-results'|message }}</td></tr> |
|
64 | 65 | <p class="text-right">{{ 'page-of-pages'|message( p + 1, pages ) }}</p> |
65 | 66 | </div> |
66 | 67 | <div class="col-md-9"> |
67 | | - <ul class="pagination"> |
68 | | - {% if p > 0 %} |
69 | | - <li><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':(p - 1) } ) }}" id="prev">«</a></li> |
70 | | - {% else %} |
71 | | - <li class="disabled"><span>«</span></li> |
72 | | - {% endif %} |
73 | | - {% if left > 0 %}<li class="disabled"><span>…</span></li>{% endif %} |
74 | | - {% for i in left .. right %} |
75 | | - <li class="{{ i == p ? 'active' }}"><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':i } ) }}" id="prev">{{ i + 1 }}</a></li> |
76 | | - {% endfor %} |
77 | | - {% if right < pages - 1 %}<li class="disabled"><span>…</span></li>{% endif %} |
78 | | - {% if p + 1 < pages %} |
79 | | - <li><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':(p + 1) } ) }}" >»</a></li> |
80 | | - {% else %} |
81 | | - <li class="disabled"><span>»</span></li> |
82 | | - {% endif %} |
83 | | - </ul> |
| 68 | + <ul class="pagination"> |
| 69 | + {% if p > 0 %} |
| 70 | + <li><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':(p - 1) } ) }}" id="prev">«</a></li> |
| 71 | + {% else %} |
| 72 | + <li class="disabled"><span>«</span></li> |
| 73 | + {% endif %} |
| 74 | + {% if left > 0 %}<li class="disabled"><span>…</span></li>{% endif %} |
| 75 | + {% for i in left .. right %} |
| 76 | + <li class="{{ i == p ? 'active' }}"><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':i } ) }}" id="prev">{{ i + 1 }}</a></li> |
| 77 | + {% endfor %} |
| 78 | + {% if right < pages - 1 %}<li class="disabled"><span>…</span></li>{% endif %} |
| 79 | + {% if p + 1 < pages %} |
| 80 | + <li><a href="{{ urlFor( route ) }}?{{ qsMerge( { 'p':(p + 1) } ) }}" >»</a></li> |
| 81 | + {% else %} |
| 82 | + <li class="disabled"><span>»</span></li> |
| 83 | + {% endif %} |
| 84 | + </ul> |
84 | 85 | </div> |
85 | 86 | </div> |
86 | 87 | {% endif %} |
|
0 commit comments