From f710f8f7ad7f015521a20e2665a946e5376801b4 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 5 Apr 2018 04:58:53 +0200 Subject: [PATCH] Improved code layout. --- app/views/mailer/ticket_update/cs.html.erb | 2 +- app/views/mailer/ticket_update/de.html.erb | 2 +- app/views/mailer/ticket_update/en.html.erb | 2 +- app/views/mailer/ticket_update/fr.html.erb | 2 +- app/views/mailer/ticket_update/pt-br.html.erb | 2 +- app/views/mailer/ticket_update/zh-cn.html.erb | 2 +- app/views/mailer/ticket_update/zh-tw.html.erb | 2 +- app/views/slack/ticket_update/en.md.erb | 2 +- app/views/slack/ticket_update/pt-br.md.erb | 2 +- app/views/slack/ticket_update/zh-cn.md.erb | 2 +- app/views/slack/ticket_update/zh-tw.md.erb | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/mailer/ticket_update/cs.html.erb b/app/views/mailer/ticket_update/cs.html.erb index 63c84e74c..e5e41198b 100644 --- a/app/views/mailer/ticket_update/cs.html.erb +++ b/app/views/mailer/ticket_update/cs.html.erb @@ -6,7 +6,7 @@ Aktualizován ticket (#{ticket.title}) Ticket (#{ticket.title}) byl aktualizován uživatelem "#{current_user.longname}".
-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/de.html.erb b/app/views/mailer/ticket_update/de.html.erb index bc2afff05..77d907a6f 100644 --- a/app/views/mailer/ticket_update/de.html.erb +++ b/app/views/mailer/ticket_update/de.html.erb @@ -6,7 +6,7 @@ Ticket aktualisiert (#{ticket.title}) Ticket (#{ticket.title}) wurde von "#{current_user.longname}" aktualisiert.

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/en.html.erb b/app/views/mailer/ticket_update/en.html.erb index c0dd35ec2..0800630c1 100644 --- a/app/views/mailer/ticket_update/en.html.erb +++ b/app/views/mailer/ticket_update/en.html.erb @@ -6,7 +6,7 @@ Updated Ticket (#{ticket.title}) Ticket (#{ticket.title}) has been updated by "#{current_user.longname}".

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/fr.html.erb b/app/views/mailer/ticket_update/fr.html.erb index c56b90857..ea58654fb 100644 --- a/app/views/mailer/ticket_update/fr.html.erb +++ b/app/views/mailer/ticket_update/fr.html.erb @@ -6,7 +6,7 @@ Ticket Mis à jour (#{ticket.title}) Le ticket (#{ticket.title}) a été mis à jour par "#{current_user.longname}".

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/pt-br.html.erb b/app/views/mailer/ticket_update/pt-br.html.erb index 5e17974e4..3bd7a1bd4 100644 --- a/app/views/mailer/ticket_update/pt-br.html.erb +++ b/app/views/mailer/ticket_update/pt-br.html.erb @@ -6,7 +6,7 @@ Chamado atualizado (#{ticket.title}) O chamado (#{ticket.title}) foi atualizado por "#{current_user.longname}".

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/zh-cn.html.erb b/app/views/mailer/ticket_update/zh-cn.html.erb index 9d13a7df0..38589d4c7 100644 --- a/app/views/mailer/ticket_update/zh-cn.html.erb +++ b/app/views/mailer/ticket_update/zh-cn.html.erb @@ -6,7 +6,7 @@ 工单 (#{ticket.title}) 已被 "#{current_user.longname}" 更新.

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/mailer/ticket_update/zh-tw.html.erb b/app/views/mailer/ticket_update/zh-tw.html.erb index 495b4dedd..5f0d7540c 100644 --- a/app/views/mailer/ticket_update/zh-tw.html.erb +++ b/app/views/mailer/ticket_update/zh-tw.html.erb @@ -6,7 +6,7 @@ 工單 (#{ticket.title}) 已被 "#{current_user.longname}" 更新.

-<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %>
#{t('Changes')}:
<% @objects[:changes].each do |key, value| %> diff --git a/app/views/slack/ticket_update/en.md.erb b/app/views/slack/ticket_update/en.md.erb index e8a9f86de..ad335e35d 100644 --- a/app/views/slack/ticket_update/en.md.erb +++ b/app/views/slack/ticket_update/en.md.erb @@ -1,6 +1,6 @@ # #{ticket.title} _<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: Updated by #{current_user.longname} at #{ticket.updated_at}_ -<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %> <% @objects[:changes].each do |key, value| %> * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> <% end %> diff --git a/app/views/slack/ticket_update/pt-br.md.erb b/app/views/slack/ticket_update/pt-br.md.erb index f6fb6a046..9f61c4cbb 100644 --- a/app/views/slack/ticket_update/pt-br.md.erb +++ b/app/views/slack/ticket_update/pt-br.md.erb @@ -1,6 +1,6 @@ # #{ticket.title} _<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: Atualizado por #{current_user.longname} em #{ticket.updated_at}_ -<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %> <% @objects[:changes].each do |key, value| %> * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> <% end %> diff --git a/app/views/slack/ticket_update/zh-cn.md.erb b/app/views/slack/ticket_update/zh-cn.md.erb index b4dba05e3..874d91a49 100644 --- a/app/views/slack/ticket_update/zh-cn.md.erb +++ b/app/views/slack/ticket_update/zh-cn.md.erb @@ -1,6 +1,6 @@ # #{ticket.title} _<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 更新了_ -<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %> <% @objects[:changes].each do |key, value| %> * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> <% end %> diff --git a/app/views/slack/ticket_update/zh-tw.md.erb b/app/views/slack/ticket_update/zh-tw.md.erb index b4dba05e3..874d91a49 100644 --- a/app/views/slack/ticket_update/zh-tw.md.erb +++ b/app/views/slack/ticket_update/zh-tw.md.erb @@ -1,6 +1,6 @@ # #{ticket.title} _<#{config.http_type}://#{config.fqdn}/#ticket/zoom/#{ticket.id}|Ticket##{ticket.number}>: 由 #{current_user.longname} 在 #{ticket.updated_at} 更新了_ -<% if @objects[:changes] && !@objects[:changes].empty? %> +<% if @objects[:changes].present? %> <% @objects[:changes].each do |key, value| %> * <%= t key %>: <%= h value[0] %> -> <%= h value[1] %> <% end %>