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
|
<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="card mb-4">
<div class="card-header">
<h4 class="mb-0">
<span class="fa fa-fw fa-history"></span>
<%= link_to t(:added_packages), added_packages_path, class: "text-dark" %>
</h4>
</div>
<div class="table-responsive">
<table class="table table-striped mb-0">
<%= render partial: 'package', collection: @new_packages, as: 'change' %>
</table>
</div>
</div>
<% end %>
<% cache("updated-#{@version_bumps.hash}") do %>
<div class="card mb-4">
<div class="card-header">
<h4 class="mb-0">
<span class="fa fa-fw fa-asterisk"></span>
<%= link_to t(:updated_packages), updated_packages_path, class: "text-dark" %>
</h4>
</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" 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">
<h3 class="modal-title" id="searchHelpTitle"><span class="fa fa-info" style="font-size: 15px;"></span> Advanced Search Queries</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</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">
<select class="custom-select pgo-query-field" id="inputGroupSelect02">
<optgroup label = "Package">
<option selected>name</option>
<option value="category">category</option>
<option value="atom">atom</option>
<option value="description">description</option>
<option value="longdescription">longdescription</option>
<option value="license">license</option>
</optgroup>
<optgroup label = "Maintainer">
<option value="maintainers.name">maintainers.name</option>
<option value="maintainers.description">maintainers.description</option>
<option value="maintainers.type">maintainers.type</option>
<option value="maintainers.restrict">maintainers.restrict</option>
<option value="maintainers.email">maintainers.email</option>
</optgroup>
<optgroup label = "Useflags">
<option value="useflags.global.name">useflags.global.name</option>
<option value="useflags.global.description">useflags.global.description</option>
<option value="useflags.local.name">useflags.local.name</option>
<option value="useflags.local.description">useflags.local.description</option>
<option value="useflags.use_expand.name">useflags.use_expand.name</option>
<option value="useflags.use_expand.description">useflags.use_expand.description</option>
<option value="useflags.use_expand.use_expand_prefix<">useflags.use_expand.use_expand_prefix</option>
</optgroup>
<optgroup label = "Metadata">
<option value="metadata_hash">metadata_hash</option>
</optgroup>
</select>
<select class="custom-select pgo-query-operator" id="inputGroupSelect02">
<option selected value="should match">should match</option>
<option value="must match">must match</option>
<option value="must not match">must not match</option>
</select>
<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_pack_tag 'index' %>
|