From 9602597e1c620c48816834a41206f8a94a759e8b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 23 Apr 2016 11:20:40 +0200 Subject: [PATCH] Fixed migration for initial setup. --- app/assets/javascripts/app/views/cti/index.jst.eco | 4 ++-- db/migrate/20160422000003_create_cti_log.rb | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/views/cti/index.jst.eco b/app/assets/javascripts/app/views/cti/index.jst.eco index d1f660668..7aba99b57 100644 --- a/app/assets/javascripts/app/views/cti/index.jst.eco +++ b/app/assets/javascripts/app/views/cti/index.jst.eco @@ -15,8 +15,8 @@ <% for item in @list: %> - <%= item.from %> - <%= item.to %> + <%= item.from %><% if item.from_comment: %> (<%= item.from_comment %>)<% end %> + <%= item.to %><% if item.to_comment: %> (<%= item.to_comment %>)<% end %> <%= item.state %> <%= item.comment %> <%- @humanTime(item.created_at) %> diff --git a/db/migrate/20160422000003_create_cti_log.rb b/db/migrate/20160422000003_create_cti_log.rb index 3bbfb0b61..4f145cd32 100644 --- a/db/migrate/20160422000003_create_cti_log.rb +++ b/db/migrate/20160422000003_create_cti_log.rb @@ -15,6 +15,9 @@ class CreateCtiLog < ActiveRecord::Migration add_index :cti_logs, [:direction] add_index :cti_logs, [:from] + # return if it's a new setup + return if !Setting.find_by(name: 'system_init_done') + Role.create_if_not_exists( name: 'CTI', note: 'Access to CTI feature.',