diff --git a/app/models/notification_service.rb b/app/models/notification_service.rb index c5513cf..551dcff 100644 --- a/app/models/notification_service.rb +++ b/app/models/notification_service.rb @@ -20,6 +20,8 @@ class NotificationService def type; self._type; end def type=(t); self._type=t; end + def url; nil; end + # Retrieve tracker label from either class or instance. Label = '' def self.label; self::Label; end diff --git a/app/models/notification_services/campfire_service.rb b/app/models/notification_services/campfire_service.rb index b6e1604..2d21e08 100644 --- a/app/models/notification_services/campfire_service.rb +++ b/app/models/notification_services/campfire_service.rb @@ -19,6 +19,10 @@ class NotificationServices::CampfireService < NotificationService end end + def url + "http://campfirenow.com/" + end + def create_notification(problem) # build the campfire client campy = Campy::Room.new(:account => subdomain, :token => api_token, :room_id => room_id) diff --git a/app/models/notification_services/gtalk_service.rb b/app/models/notification_services/gtalk_service.rb index 4940ddb..e61f8e5 100644 --- a/app/models/notification_services/gtalk_service.rb +++ b/app/models/notification_services/gtalk_service.rb @@ -21,6 +21,10 @@ class NotificationServices::GtalkService < NotificationService end end + def url + "http://www.google.com/talk/" + end + def create_notification(problem) # build the xmpp client client = Jabber::Client.new(Jabber::JID.new(subdomain)) diff --git a/app/views/apps/index.html.haml b/app/views/apps/index.html.haml index da0d9d5..c99692f 100644 --- a/app/views/apps/index.html.haml +++ b/app/views/apps/index.html.haml @@ -28,7 +28,11 @@ - if any_notification_services? %td.notification_service - if app.notification_service_configured? - = image_tag("#{app.notification_service.label}_goto.png") + - notification_service_img = image_tag("#{app.notification_service.label}_goto.png") + - if app.notification_service.url + = link_to( notification_service_img, app.notification_service.url, :target => "_blank" ) + - else + = notification_service_img - if any_issue_trackers? %td.issue_tracker - if app.issue_tracker_configured? -- libgit2 0.21.2