Commit a9674df10ce9e91a63183e2ce0cbf5cb3a4682a6
1 parent
fe7b8339
Exists in
master
and in
1 other branch
Extracted issue tracker fields into partial
Showing
2 changed files
with
68 additions
and
66 deletions
Show diff stats
app/views/apps/_fields.html.haml
@@ -45,70 +45,5 @@ | @@ -45,70 +45,5 @@ | ||
45 | = f.check_box :resolve_errs_on_deploy | 45 | = f.check_box :resolve_errs_on_deploy |
46 | = f.label :resolve_errs_on_deploy, 'Resolve errs on deploy' | 46 | = f.label :resolve_errs_on_deploy, 'Resolve errs on deploy' |
47 | 47 | ||
48 | -%fieldset | ||
49 | - %legend Issue tracker | ||
50 | - = f.fields_for :issue_tracker do |w| | ||
51 | - %div.issue_tracker.nested | ||
52 | - %div.choose | ||
53 | - = label_tag :type_none, :for => label_for_attr(w, 'type_issuetracker'), :class => "label_radio none" do | ||
54 | - = w.radio_button :type, "IssueTracker", 'data-section' => 'none' | ||
55 | - (None) | ||
56 | - = label_tag :type_lighthouseapp, :for => label_for_attr(w, 'type_lighthousetracker'), :class => "label_radio lighthouseapp" do | ||
57 | - = w.radio_button :type, "LighthouseTracker", 'data-section' => 'lighthouse' | ||
58 | - Lighthouse | ||
59 | - = label_tag :type_redmine, :for => label_for_attr(w, 'type_redminetracker'), :class => "label_radio redmine" do | ||
60 | - = w.radio_button :type, "RedmineTracker", 'data-section' => 'redmine' | ||
61 | - Redmine | ||
62 | - = label_tag :type_pivotal, :for => label_for_attr(w, 'type_pivotallabstracker'), :class => "label_radio pivotal" do | ||
63 | - = w.radio_button :type, "PivotalLabsTracker", 'data-section' => 'pivotal' | ||
64 | - Pivotal Tracker | ||
65 | - %br | ||
66 | - = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_fogbugztracker'), :class => "label_radio fogbugz" do | ||
67 | - = w.radio_button :type, "FogbugzTracker", 'data-section' => 'fogbugz' | ||
68 | - FogBugz | ||
69 | - = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_mingletracker'), :class => "label_radio mingle" do | ||
70 | - = w.radio_button :type, "MingleTracker", 'data-section' => 'mingle' | ||
71 | - Mingle | ||
72 | - | ||
73 | - %div.tracker_params.none{:class => (w.object && !(w.object.class < IssueTracker)) ? 'chosen' : nil} | ||
74 | - %p When no issue tracker has been configured, you will be able to leave comments on errors. | ||
75 | - %div.tracker_params.lighthouse{:class => w.object.is_a?(LighthouseTracker) ? 'chosen' : nil} | ||
76 | - = w.label :account, "Account" | ||
77 | - = w.text_field :account, :placeholder => "abc from abc.lighthouseapp.com" | ||
78 | - = w.label :api_token, "API token" | ||
79 | - = w.text_field :api_token, :placeholder => "API Token for your account" | ||
80 | - = w.label :project_id, "Project ID" | ||
81 | - = w.text_field :project_id | ||
82 | - %div.tracker_params.redmine{:class => w.object.is_a?(RedmineTracker) ? 'chosen' : nil} | ||
83 | - = w.label :account, "Redmine URL" | ||
84 | - = w.text_field :account, :placeholder => "like http://www.redmine.org/" | ||
85 | - = w.label :api_token, "API token" | ||
86 | - = w.text_field :api_token, :placeholder => "API Token for your account" | ||
87 | - = w.label :project_id, "Project ID" | ||
88 | - = w.text_field :project_id | ||
89 | - %div.tracker_params.pivotal{:class => w.object.is_a?(PivotalLabsTracker) ? 'chosen' : nil} | ||
90 | - = w.label :project_id, "Project ID" | ||
91 | - = w.text_field :project_id | ||
92 | - = w.label :api_token, "API token" | ||
93 | - = w.text_field :api_token, :placeholder => "API Token for your account" | ||
94 | - %div.tracker_params.fogbugz{:class => w.object.is_a?(FogbugzTracker) ? 'chosen' : nil} | ||
95 | - = w.label :project_id, "Area Name" | ||
96 | - = w.text_field :project_id | ||
97 | - = w.label :account, "FogBugz URL" | ||
98 | - = w.text_field :account, :placeholder => "abc from http://abc.fogbugz.com/" | ||
99 | - = w.label :username, 'Username' | ||
100 | - = w.text_field :username, :placeholder => 'Username/Email for your account' | ||
101 | - = w.label :password, 'Password' | ||
102 | - = w.password_field :password, :placeholder => 'Password for your account' | ||
103 | - %div.tracker_params.mingle{:class => w.object.is_a?(MingleTracker) ? 'chosen' : nil} | ||
104 | - = w.label :account, "Mingle URL" | ||
105 | - = w.text_field :account, :placeholder => "http://mingle.yoursite.com/" | ||
106 | - = w.label :project_id, "Project ID" | ||
107 | - = w.text_field :project_id | ||
108 | - = w.label :ticket_properties, "Card Properties (comma separated key=value pairs)" | ||
109 | - = w.text_field :ticket_properties, :placeholder => "card_type = Defect, defect_status = Open, priority = Essential" | ||
110 | - = w.label :username, 'Sign-in name' | ||
111 | - = w.text_field :username, :placeholder => 'Sign-in name for your account' | ||
112 | - = w.label :password, 'Password' | ||
113 | - = w.password_field :password, :placeholder => 'Password for your account' | 48 | += render "issue_tracker_fields", :f => f |
114 | 49 |
@@ -0,0 +1,67 @@ | @@ -0,0 +1,67 @@ | ||
1 | +%fieldset | ||
2 | + %legend Issue tracker | ||
3 | + = f.fields_for :issue_tracker do |w| | ||
4 | + %div.issue_tracker.nested | ||
5 | + %div.choose | ||
6 | + = label_tag :type_none, :for => label_for_attr(w, 'type_issuetracker'), :class => "label_radio none" do | ||
7 | + = w.radio_button :type, "IssueTracker", 'data-section' => 'none' | ||
8 | + (None) | ||
9 | + = label_tag :type_lighthouseapp, :for => label_for_attr(w, 'type_lighthousetracker'), :class => "label_radio lighthouseapp" do | ||
10 | + = w.radio_button :type, "LighthouseTracker", 'data-section' => 'lighthouse' | ||
11 | + Lighthouse | ||
12 | + = label_tag :type_redmine, :for => label_for_attr(w, 'type_redminetracker'), :class => "label_radio redmine" do | ||
13 | + = w.radio_button :type, "RedmineTracker", 'data-section' => 'redmine' | ||
14 | + Redmine | ||
15 | + = label_tag :type_pivotal, :for => label_for_attr(w, 'type_pivotallabstracker'), :class => "label_radio pivotal" do | ||
16 | + = w.radio_button :type, "PivotalLabsTracker", 'data-section' => 'pivotal' | ||
17 | + Pivotal Tracker | ||
18 | + %br | ||
19 | + = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_fogbugztracker'), :class => "label_radio fogbugz" do | ||
20 | + = w.radio_button :type, "FogbugzTracker", 'data-section' => 'fogbugz' | ||
21 | + FogBugz | ||
22 | + = label_tag :type_fogbugz, :for => label_for_attr(w, 'type_mingletracker'), :class => "label_radio mingle" do | ||
23 | + = w.radio_button :type, "MingleTracker", 'data-section' => 'mingle' | ||
24 | + Mingle | ||
25 | + | ||
26 | + %div.tracker_params.none{:class => (w.object && !(w.object.class < IssueTracker)) ? 'chosen' : nil} | ||
27 | + %p When no issue tracker has been configured, you will be able to leave comments on errors. | ||
28 | + %div.tracker_params.lighthouse{:class => w.object.is_a?(LighthouseTracker) ? 'chosen' : nil} | ||
29 | + = w.label :account, "Account" | ||
30 | + = w.text_field :account, :placeholder => "abc from abc.lighthouseapp.com" | ||
31 | + = w.label :api_token, "API token" | ||
32 | + = w.text_field :api_token, :placeholder => "API Token for your account" | ||
33 | + = w.label :project_id, "Project ID" | ||
34 | + = w.text_field :project_id | ||
35 | + %div.tracker_params.redmine{:class => w.object.is_a?(RedmineTracker) ? 'chosen' : nil} | ||
36 | + = w.label :account, "Redmine URL" | ||
37 | + = w.text_field :account, :placeholder => "like http://www.redmine.org/" | ||
38 | + = w.label :api_token, "API token" | ||
39 | + = w.text_field :api_token, :placeholder => "API Token for your account" | ||
40 | + = w.label :project_id, "Project ID" | ||
41 | + = w.text_field :project_id | ||
42 | + %div.tracker_params.pivotal{:class => w.object.is_a?(PivotalLabsTracker) ? 'chosen' : nil} | ||
43 | + = w.label :project_id, "Project ID" | ||
44 | + = w.text_field :project_id | ||
45 | + = w.label :api_token, "API token" | ||
46 | + = w.text_field :api_token, :placeholder => "API Token for your account" | ||
47 | + %div.tracker_params.fogbugz{:class => w.object.is_a?(FogbugzTracker) ? 'chosen' : nil} | ||
48 | + = w.label :project_id, "Area Name" | ||
49 | + = w.text_field :project_id | ||
50 | + = w.label :account, "FogBugz URL" | ||
51 | + = w.text_field :account, :placeholder => "abc from http://abc.fogbugz.com/" | ||
52 | + = w.label :username, 'Username' | ||
53 | + = w.text_field :username, :placeholder => 'Username/Email for your account' | ||
54 | + = w.label :password, 'Password' | ||
55 | + = w.password_field :password, :placeholder => 'Password for your account' | ||
56 | + %div.tracker_params.mingle{:class => w.object.is_a?(MingleTracker) ? 'chosen' : nil} | ||
57 | + = w.label :account, "Mingle URL" | ||
58 | + = w.text_field :account, :placeholder => "http://mingle.yoursite.com/" | ||
59 | + = w.label :project_id, "Project ID" | ||
60 | + = w.text_field :project_id | ||
61 | + = w.label :ticket_properties, "Card Properties (comma separated key=value pairs)" | ||
62 | + = w.text_field :ticket_properties, :placeholder => "card_type = Defect, defect_status = Open, priority = Essential" | ||
63 | + = w.label :username, 'Sign-in name' | ||
64 | + = w.text_field :username, :placeholder => 'Sign-in name for your account' | ||
65 | + = w.label :password, 'Password' | ||
66 | + = w.password_field :password, :placeholder => 'Password for your account' | ||
67 | + |