layout_ref: fix calendar subscriptions preview text

This commit is contained in:
Felix Niklas 2015-06-29 13:23:41 +02:00
parent 12307e0015
commit 3965f9ea61
2 changed files with 21 additions and 14 deletions

View file

@ -1472,23 +1472,27 @@ class calendarSubscriptionsRef extends App.ControllerContent
own = data.filter((entry) -> entry.name.indexOf('own') >= 0)
not_assigned = data.filter((entry) -> entry.name.indexOf('not_assigned') >= 0)
if own.length > 0
if own.length is optionCount
modules.push "all my"
modules.push "all my tickets"
else
modules.push.apply modules, own.map (entry) ->
[option, value] = entry.name.split('/')
return "#{ translationTable[value] } #{ translationTable[option] }"
modules[modules.length-1] += " tickets"
if not_assigned.length > 0
if not_assigned.length is optionCount
modules.push "all not assigned"
modules.push "all not assigned tickets"
else
modules.push.apply modules, not_assigned.map (entry) ->
[option, value] = entry.name.split('/')
return "#{ translationTable[value] } #{ translationTable[option] }"
modules[modules.length-1] += " tickets"
@output
.attr 'disabled', false
.text "Subscription to #{ @joinItems modules } tickets:"
.text "Subscription to #{ @joinItems modules }:"
joinItems: (items) ->
switch items.length

View file

@ -8,7 +8,10 @@
<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">
<div class="output-input">
<output class="js-output"></output>
<input class="form-control js-select" readonly value="<%= @baseurl %>/calendar_subscriptions/tickets">
</div>
<h3><%= @T('Subscription Settings') %></h3>
<table class="settings-list">