blob: ee2bd7f6a657d16e9620fd9f64649b575574ae0b (
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<div class="jumbotron">
<h2 class="site-welcome stick-top">Welcome to the Home of <span class="text-primary"><%= number_with_delimiter PackageRepository.count %></span> Gentoo Packages</h2>
<form action="<%= search_packages_path %>" method="get">
<div class="typeahead-container">
<div class="typeahead-field">
<span class="typeahead-query">
<input id="q" name="q" type="search" autocomplete="off" placeholder="<%= t :find_packages %>" aria-label="<%= t :find_packages %>" autofocus>
</span>
<span class="typeahead-button">
<button type="button" onclick="$('#searchHelp').modal('show')" title="Help" aria-label="<%= "Help" %>">
<span class="fa fa-question" style="font-size: 15px;"></span><span class="sr-only"><%= "Help" %></span>
</button>
</span>
<span class="typeahead-button">
<button type="submit" title="<%= t :find %>" aria-label="<%= t :find %>">
<span class="typeahead-search-icon"></span><span class="sr-only"><%= t :find %></span>
</button>
</span>
</div>
</div>
</form>
</div>
<% cache("added-#{@new_packages.hash}") do %>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="fa fa-fw fa-history"></span>
<%= link_to t(:added_packages), added_packages_path %>
</h3>
</div>
<div class="table-responsive">
<table class="table table-striped">
<%= render partial: 'package', collection: @new_packages, as: 'change' %>
</table>
</div>
</div>
<% end %>
<% cache("updated-#{@version_bumps.hash}") do %>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="fa fa-fw fa-asterisk"></span>
<%= link_to t(:updated_packages), updated_packages_path %>
</h3>
</div>
<ul class="list-group">
<% @version_bumps.each do |change|
_package = PackageRepository.find_by(:atom, cp_to_atom(change.category, change.package)) %>
<%= render partial: 'packages/changed_package', object: change, as: 'change', locals: { package: _package, version: _package.version(change.version) } %>
<% end %>
</ul>
</div>
<% end %>
<div class="modal fade" id="searchHelp" tabindex="-1" role="dialog" aria-labelledby="searchHelpTitle">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h3 class="modal-title" id="searchHelpTitle"><span class="fa fa-info" style="font-size: 15px;"></span> Advanced Search Queries</h3>
</div>
<div class="modal-body">
Using the following forms you can compose advanced search queries instead of writing them manually.
<div id="search-container" style="margin-bottom:25px;">
<div class="row" style="margin-top:25px;">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<div class="input-group">
<div class="input-group-btn">
<div class="btn-group">
<button type="button" class="pgo-query-field btn btn-default dropdown-toggle" data-toggle="dropdown"><span>name</span>
<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a onclick="updateDropdown(this);">name</a></li>
<li><a onclick="updateDropdown(this);">category</a></li>
<li><a onclick="updateDropdown(this);">atom</a></li>
<li><a onclick="updateDropdown(this);">description</a></li>
<li><a onclick="updateDropdown(this);">longdescription</a></li>
<li><a onclick="updateDropdown(this);">license</a></li>
<li class="divider"></li>
<li><a onclick="updateDropdown(this);">maintainers.name</a></li>
<li><a onclick="updateDropdown(this);">maintainers.description</a></li>
<li><a onclick="updateDropdown(this);">maintainers.type</a></li>
<li><a onclick="updateDropdown(this);">maintainers.restrict</a></li>
<li><a onclick="updateDropdown(this);">maintainers.email</a></li>
<li class="divider"></li>
<li><a onclick="updateDropdown(this);">useflags.global.name</a></li>
<li><a onclick="updateDropdown(this);">useflags.global.description</a></li>
<li><a onclick="updateDropdown(this);">useflags.local.name</a></li>
<li><a onclick="updateDropdown(this);">useflags.local.description</a></li>
<li><a onclick="updateDropdown(this);">useflags.use_expand.name</a></li>
<li><a onclick="updateDropdown(this);">useflags.use_expand.description</a></li>
<li><a onclick="updateDropdown(this);">useflags.use_expand.use_expand_prefix</a></li>
<li class="divider"></li>
<li><a onclick="updateDropdown(this);">metadata_hash</a></li>
</ul>
</div>
<div class="btn-group">
<button type="button" class="pgo-query-operator btn btn-default dropdown-toggle" data-toggle="dropdown"><span>should match</span>
<span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<li><a onclick="updateDropdown(this);">should match</a></li>
<li><a onclick="updateDropdown(this);">must match</a></li>
<li><a onclick="updateDropdown(this);">must not match</a></li>
</ul>
</div>
</div><!-- /btn-group -->
<input type="text" class="form-control" placeholder="e.g. gentoo-sources">
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div class="col-lg-2">
<span class="pgo-query-delete-btn fa fa-trash pull-right" style="font-size: 20px;margin-top:5px;" onclick="deleteInput(this);"></span>
<span class="pgo-query-add-btn fa fa-plus pull-right" style="font-size: 20px;margin-top:5px;" onclick="addInput();"></span>
</div>
</div><!-- /.row -->
</div>
Please refer to <a href="/about/queries">this page</a> for further information on advanced search queries and examples.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" onclick="buildAdvancedQuery();" data-dismiss="modal">Apply</button>
</div>
</div>
</div>
</div>
<%= javascript_include_tag 'index/query_generator.js' %>
<%= javascript_include_tag 'index/typeahead.js' %>
|