Added shorter/ical routes and made them defaults.

This commit is contained in:
Thorsten Eckel 2015-06-29 10:59:25 +02:00
parent 88b7e877e6
commit b7c3403e0e
2 changed files with 8 additions and 2 deletions

View file

@ -8,7 +8,7 @@
<p><%= @T('See your tickets from within your favorite calendar by adding the following url to your calendar app.') %></p>
<h3><%= @T('URL') %></h3>
<input class="form-control js-select" readonly value="<%= @baseurl %>/calendar_subscriptions/tickets">
<input class="form-control js-select" readonly value="<%= @baseurl %>/ical/tickets">
<h3><%= @T('Subscription Settings') %></h3>
<table class="settings-list">
@ -25,7 +25,7 @@
<td style="text-transform: capitalize"><%= @translationTable[stateType] %>
<td><label class="inline-label"><input type="checkbox" name="<%= stateType %>/own"<%= if options.own then ' checked' %>> <%= @T('own tickets') %></label>
<td><label class="inline-label"><input type="checkbox" name="<%= stateType %>/not_assigned"<%= if options.not_assigned then ' checked' %>> <%= @T('not assigned tickets') %></label>
<td><div class="btn btn--table btn--text js-showLink"><%= @T('Show') %></div><input class="form-control form-control--borderless js-select is-hidden" readonly value="<%= @baseurl %>/calendar_subscriptions/tickets/<%= stateType %>">
<td><div class="btn btn--table btn--text js-showLink"><%= @T('Show') %></div><input class="form-control form-control--borderless js-select is-hidden" readonly value="<%= @baseurl %>/ical/tickets/<%= stateType %>">
</tr>
<% end %>
</tbody>

View file

@ -1,5 +1,11 @@
Zammad::Application.routes.draw do
# shorter version
match '/ical', to: 'calendar_subscriptions#all', via: :get
match '/ical/:object', to: 'calendar_subscriptions#object', via: :get
match '/ical/:object/:method', to: 'calendar_subscriptions#object', via: :get
# wording version
match '/calendar_subscriptions', to: 'calendar_subscriptions#all', via: :get
match '/calendar_subscriptions/:object', to: 'calendar_subscriptions#object', via: :get
match '/calendar_subscriptions/:object/:method', to: 'calendar_subscriptions#object', via: :get