From 7cc29d6b94443177a737f3ca44bf23b966375aac Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 13 Nov 2012 08:42:08 +0100 Subject: [PATCH] Added intro message for customer if no ticket exists. --- .../app/controllers/agent_ticket_view.js.coffee | 5 +++++ .../app/views/customer_not_ticket_exists.jst.eco | 14 ++++++++++++++ db/seeds.rb | 6 ++++++ 3 files changed, 25 insertions(+) create mode 100644 app/assets/javascripts/app/views/customer_not_ticket_exists.jst.eco diff --git a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee index 1621bffab..3f1ad4bec 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_view.js.coffee @@ -86,6 +86,11 @@ class Index extends App.Controller render: -> + # if customer and no ticket exists, show the following message only + if !@ticket_list_show[0] && @isRole('Customer') + @html App.view('customer_not_ticket_exists')() + return + @selected = @bulkGetSelected() # set page title diff --git a/app/assets/javascripts/app/views/customer_not_ticket_exists.jst.eco b/app/assets/javascripts/app/views/customer_not_ticket_exists.jst.eco new file mode 100644 index 000000000..6f62c6163 --- /dev/null +++ b/app/assets/javascripts/app/views/customer_not_ticket_exists.jst.eco @@ -0,0 +1,14 @@ +
+

<%- @T('Welcome!') %>

+
+
+
+

<%- @T('You have not created a Ticket yet.') %>

+

<%- @T('The way to communicate with us is this thing called "Ticket".') %>

+

<%- @T('Please click the button below to create your first one.') %>

+ +

<%- @T('Create your first Ticket') %>

+
+
+
+
diff --git a/db/seeds.rb b/db/seeds.rb index 6c1aedfb0..b67a87870 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1761,5 +1761,11 @@ Translation.create( :locale => 'de', :source => "Username or email address inval Translation.create( :locale => 'de', :source => "If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try resending your request.", :target => "Wir hanben die Andorderung per E-Mail an Sie versendet, bitte Überprüfen Sie Ihr Email-Postfach (auch die Junk E-Mails) ggf. starten Sie eine Andorderung erneut.", :updated_by_id => 1, :created_by_id => 1 ) Translation.create( :locale => 'de', :source => "again", :target => "erneut", :updated_by_id => 1, :created_by_id => 1 ) Translation.create( :locale => 'de', :source => "none", :target => "keine", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create( :locale => 'de', :source => "Welcome!", :target => "Willkommen!", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create( :locale => 'de', :source => "Please click the button below to create your first one.", :target => "Klicken Sie die Schaltfläche unten um das erste zu erstellen.", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create( :locale => 'de', :source => "Create your first Ticket", :target => "Erstellen Sie Ihr erstes Ticket", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create( :locale => 'de', :source => "You have not created a Ticket yet.", :target => "Sie haben noch kein Ticket erstellt.", :updated_by_id => 1, :created_by_id => 1 ) +Translation.create( :locale => 'de', :source => "The way to communicate with us is this thing called \"Ticket\".", :target => "Der Weg um mit uns zu kommunizieren ist das sogenannte \"Ticket\".", :updated_by_id => 1, :created_by_id => 1 ) + #Translation.create( :locale => 'de', :source => "", :target => "", :updated_by_id => 1, :created_by_id => 1 )