Merge pull request #2193 from rosysong/freespace
[oweals/luci.git] / applications / luci-app-openvpn / luasrc / view / openvpn / pageswitch.htm
1 <%#
2  Copyright 2008 Steven Barth <steven@midlink.org>
3  Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
4  Licensed to the public under the Apache License 2.0.
5 -%>
6
7 <%+openvpn/ovpn_css%>
8
9 <div class="cbi-section">
10         <h3>
11                 <a href="<%=url('admin/services/openvpn')%>"><%:Overview%></a> &#187;
12                 <%=luci.i18n.translatef("Instance \"%s\"", self.instance)%>
13         </h3>
14         <% if self.mode == "file" then %>
15                 <a href="<%=url('admin/services/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> &#187;</a><p/>
16                 <a href="<%=url('admin/services/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> &#187;</a>
17                 <hr />
18         <% elseif self.mode == "basic" then %>
19                 <a href="<%=url('admin/services/openvpn/advanced', self.instance, "Service")%>"><%:Switch to advanced configuration%> &#187;</a><p/>
20                 <a href="<%=url('admin/services/openvpn/file', self.instance)%>"><%:Switch to file based configuration%> &#187;</a>
21                 <hr />
22         <% elseif self.mode == "advanced" then %>
23                 <a href="<%=url('admin/services/openvpn/basic', self.instance)%>"><%:Switch to basic configuration%> &#187;</a><p/>
24                 <a href="<%=url('admin/services/openvpn/file', self.instance)%>"><%:Switch to file based configuration%> &#187;</a>
25                 <hr />
26                 <%:Configuration category%>:
27                 <% for i, c in ipairs(self.categories) do %>
28                         <% if c == self.category then %>
29                                 <strong><%=translate(c)%></strong>
30                         <% else %>
31                                 <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", "advanced", self.instance, c)%>"><%=translate(c)%></a>
32                         <% end %>
33                         <% if next(self.categories, i) then %>|<% end %>
34                 <% end %>
35         <% end %>
36 </div>