Commit a724c0923a51d473b351f8b08c5dc0f241d9344c
1 parent
37fe664d
Exists in
master
and in
1 other branch
Hide issue creation button when tracker is not configured.
Showing
2 changed files
with
4 additions
and
1 deletions
Show diff stats
app/models/app.rb
@@ -69,6 +69,9 @@ class App | @@ -69,6 +69,9 @@ class App | ||
69 | "#{self.github_url}/blob/master#{file}" | 69 | "#{self.github_url}/blob/master#{file}" |
70 | end | 70 | end |
71 | 71 | ||
72 | + def issue_tracker_configured? | ||
73 | + issue_tracker && !issue_tracker.project_id.blank? | ||
74 | + end | ||
72 | protected | 75 | protected |
73 | 76 | ||
74 | def generate_api_key | 77 | def generate_api_key |
app/views/errs/show.html.haml
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | %strong Last Notice: | 10 | %strong Last Notice: |
11 | = last_notice_at(@err).to_s(:micro) | 11 | = last_notice_at(@err).to_s(:micro) |
12 | - content_for :action_bar do | 12 | - content_for :action_bar do |
13 | - - if @err.app.issue_tracker | 13 | + - if @err.app.issue_tracker_configured? |
14 | - if @err.issue_link.blank? | 14 | - if @err.issue_link.blank? |
15 | %span= link_to 'create issue', create_issue_app_err_path(@app, @err), :method => :post, :class => "#{@app.issue_tracker.issue_tracker_type}_create create-issue" | 15 | %span= link_to 'create issue', create_issue_app_err_path(@app, @err), :method => :post, :class => "#{@app.issue_tracker.issue_tracker_type}_create create-issue" |
16 | - else | 16 | - else |