Split up admin-core into admin-core and admin-full, preparing admin-mini
[project/luci.git] / modules / admin-full / luasrc / view / admin_system / packages.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15 <%+header%>
16 <h1><%:system%></h1>
17 <h2><%:a_s_packages%></h2>
18
19 <br />
20
21 <% if install or remove or update or upgrade then %>
22 <div class="code"><strong><%:status%>:</strong><br />
23 <% if update then %>
24         <%:a_s_packages_update%>: <% if update == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=update%>)</span><% end %><br />
25 <% end %>
26 <% if upgrade then%>
27         <%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=upgrade%>)</span><% end %><br />
28 <% end %>
29 <% if install then for k,v in pairs(install) do %>
30         <%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
31 <% end end %>
32 <% if remove then for k,v in pairs(remove) do %>
33         <%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><span class="ok"><%:ok%></span><% else %><span class="error"><%:error%> (<%:code%> <%=v%>)</span><% end %><br />
34 <% end end %>
35 </div>
36 <br />
37 <% end %>
38
39 <div>
40 <a href="<%=controller%>/admin/system/packages/ipkg"><%:a_s_packages_ipkg%></a><br />
41 <a href="<%=controller%>/admin/system/packages?update=1"><%:a_s_packages_updatelist%></a><br />
42 <a href="<%=controller%>/admin/system/packages?upgrade=1"><%:a_s_packages_upgrade%></a>
43 </div>
44
45 <br />
46 <br />
47
48 <form method="post" action="<%=controller%>/admin/system/packages">
49         <div>
50                 <span class="bold"><%:a_s_packages_installurl%>:</span><br />
51                 <input type="text" name="url" size="30" value="" />
52                 <input type="submit" name="submit" value="<%:ok%>" />
53         </div>
54         
55         <br />
56         <br />
57
58         <div>
59                 <span class="bold"><%:filter%>:</span>
60                 <input type="text" name="query" size="20" value="<%=query%>" />
61                 <input type="submit" name="search" value="<%:a_s_packages_search%>" />
62                 <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
63         </div>
64         
65         <br />
66         <br />
67         
68         <div>
69         <table style="font-size: 0.8em">
70                 <tr>
71                         <th><%:a_s_packages_name%></th>
72                         <th><%:version%></th>
73                         <th><%:install%></th>
74                         <th><%:delete%></th>
75                         <th><%:descr%></th>
76                 </tr>
77                 <% for k, pkg in pairs(pkgs) do %>      
78                 <tr>
79                         <td><%=pkg.Package%></td>
80                         <td><%=pkg.Version%></td>
81                         <td><% if not pkg.Status or not pkg.Status.installed then %><input type="checkbox" name="install.<%=pkg.Package%>" value="1" /><% else %><%:installed%><% end %></td>
82                         <td><% if pkg.Status and pkg.Status.installed then %><input type="checkbox" name="remove.<%=pkg.Package%>" value="1" /><% else %><%:notinstalled%><% end %></td>
83                         <td><%=pkg.Description%></td>
84                 </tr>
85                 <% end %>
86         </table>
87         </div>
88         <br />
89         <input type="submit" name="submit" value="<%:a_s_packages_do%>" />
90 </form>
91 <%+footer%>