Module: AppsHelper

Defined in:
app/helpers/apps_helper.rb

Instance Method Summary collapse

Instance Method Details

#any_bitbucket_repos?Boolean


24
25
26
27
# File 'app/helpers/apps_helper.rb', line 24

def any_bitbucket_repos?
  detect_any_apps_with_attributes if @any_bitbucket_repos.nil?
  @any_bitbucket_repos
end

#any_deploys?Boolean


34
35
36
37
# File 'app/helpers/apps_helper.rb', line 34

def any_deploys?
  detect_any_apps_with_attributes if @any_deploys.nil?
  @any_deploys
end

#any_github_repos?Boolean


14
15
16
17
# File 'app/helpers/apps_helper.rb', line 14

def any_github_repos?
  detect_any_apps_with_attributes if @any_github_repos.nil?
  @any_github_repos
end

#any_issue_trackers?Boolean


29
30
31
32
# File 'app/helpers/apps_helper.rb', line 29

def any_issue_trackers?
  detect_any_apps_with_attributes if @any_issue_trackers.nil?
  @any_issue_trackers
end

#any_notification_services?Boolean


19
20
21
22
# File 'app/helpers/apps_helper.rb', line 19

def any_notification_services?
  detect_any_apps_with_attributes if @any_notification_services.present?
  @any_notification_services
end

2
3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/apps_helper.rb', line 2

def link_to_copy_attributes_from_other_app
  if App.count > 1
    html =  link_to('copy settings from another app', '#',
                     :class => 'button copy_config')
    html << select("duplicate", "app",
                   App.all.asc(:name).reject{|a| a == @app }.
                   collect{|p| [ p.name, p.id ] }, {:include_blank => "[choose app]"},
                   {:class => "choose_other_app", :style => "display: none;"})
    return html
  end
end