houston-core 0.7.0 → 0.8.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +45 -45
  3. data/app/assets/javascripts/houston/app/models/ticket.coffee +7 -5
  4. data/app/assets/javascripts/houston/app/views/new_ticket_view.coffee +1 -21
  5. data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +0 -6
  6. data/app/assets/stylesheets/houston/application/commit.scss +16 -0
  7. data/app/assets/stylesheets/houston/application/navigation.scss +1 -0
  8. data/app/assets/stylesheets/houston/application/new_ticket_view.scss +0 -4
  9. data/app/assets/stylesheets/houston/application/projects.css.scss +0 -14
  10. data/app/assets/stylesheets/houston/application/release_form.scss +1 -1
  11. data/app/assets/stylesheets/houston/application/teams.scss +68 -0
  12. data/app/assets/templates/tickets/index.hbs +0 -1
  13. data/app/controllers/github/pulls_controller.rb +1 -0
  14. data/app/controllers/project_tickets_controller.rb +1 -5
  15. data/app/controllers/projects_controller.rb +10 -12
  16. data/app/controllers/teams_controller.rb +60 -0
  17. data/app/controllers/users_controller.rb +12 -12
  18. data/app/helpers/commit_helper.rb +3 -5
  19. data/app/helpers/exposure_helper.rb +1 -1
  20. data/app/helpers/ticket_helper.rb +0 -13
  21. data/app/interactors/ticket_report.rb +0 -7
  22. data/app/mailers/project_notification.rb +2 -23
  23. data/app/mailers/view_mailer.rb +0 -1
  24. data/app/models/ability.rb +28 -19
  25. data/app/models/commit.rb +0 -4
  26. data/app/models/project.rb +14 -29
  27. data/app/models/release.rb +0 -18
  28. data/app/models/role.rb +0 -22
  29. data/app/models/team.rb +43 -0
  30. data/app/models/team_user.rb +68 -0
  31. data/app/models/ticket.rb +2 -22
  32. data/app/models/user.rb +21 -30
  33. data/app/views/devise/sessions/new.html.erb +9 -7
  34. data/app/views/layouts/_mobile_navigation.html.erb +5 -3
  35. data/app/views/layouts/_navigation.html.erb +11 -10
  36. data/app/views/layouts/_tester_bar.html.erb +1 -1
  37. data/app/views/layouts/application.html.erb +1 -2
  38. data/app/views/project_tickets/_tickets.html.erb +0 -1
  39. data/app/views/project_tickets/index.xls.erb +0 -35
  40. data/app/views/project_tickets/new.html.erb +1 -2
  41. data/app/views/projects/_form.html.erb +7 -12
  42. data/app/views/projects/index.html.erb +10 -17
  43. data/app/views/releases/_changelog.html.erb +11 -14
  44. data/app/views/teams/_form.html.erb +45 -0
  45. data/app/views/teams/edit.html.erb +8 -0
  46. data/app/views/teams/index.html.erb +62 -0
  47. data/app/views/teams/new.html.erb +7 -0
  48. data/app/views/users/_form.html.erb +2 -11
  49. data/app/views/users/index.html.erb +8 -20
  50. data/app/views/users/new.html.erb +1 -1
  51. data/config/initializers/inflections.rb +7 -6
  52. data/config/routes.rb +19 -17
  53. data/db/migrate/20160812233255_repurpose_users_role.rb +16 -0
  54. data/db/migrate/20160813001242_create_teams.rb +42 -0
  55. data/db/structure.sql +110 -116
  56. data/lib/houston/boot.rb +0 -1
  57. data/lib/houston/boot/configuration.rb +26 -11
  58. data/lib/houston/boot/events.rb +0 -4
  59. data/lib/houston/version.rb +1 -1
  60. data/templates/new-instance/config/abilities.rb +68 -51
  61. data/templates/new-instance/config/conversations/mentions/unfurl_tasks.rb +1 -1
  62. data/templates/new-instance/config/events/deploy/notify_deployer_when_finished.rb +24 -16
  63. data/templates/new-instance/config/events/tests/email_when_completed.rb +11 -0
  64. data/templates/new-instance/config/integrations/ldap.rb +4 -0
  65. data/templates/new-instance/config/main.rb +10 -17
  66. data/templates/new-module/test/fixtures/users.yml +1 -2
  67. data/test/acceptance/creating_a_release_test.rb +1 -1
  68. data/test/factories/project_factory.rb +1 -0
  69. data/test/factories/user_factory.rb +3 -1
  70. data/test/fixtures/teams.yml +2 -0
  71. data/test/fixtures/teams_users.yml +5 -0
  72. data/test/fixtures/users.yml +1 -2
  73. data/test/integration/ci_integration_test.rb +2 -2
  74. data/test/support/config.rb +3 -5
  75. data/test/unit/controllers/deploys_controller_test.rb +11 -5
  76. data/test/unit/controllers/users_controller_test.rb +46 -0
  77. data/test/unit/models/release_test.rb +0 -9
  78. data/test/unit/models/serializer_test.rb +0 -8
  79. data/test/unit/models/ticket_test.rb +0 -32
  80. metadata +21 -24
  81. data/app/assets/javascripts/houston/app/table_row_expander.coffee +0 -52
  82. data/app/assets/javascripts/houston/app/views/problems_view.coffee +0 -114
  83. data/app/assets/stylesheets/houston/application/follow_up.scss +0 -44
  84. data/app/controllers/project_exceptions_controller.rb +0 -36
  85. data/app/controllers/project_pretickets_controller.rb +0 -27
  86. data/app/mailers/deploy_notification.rb +0 -33
  87. data/app/models/antecedent.rb +0 -15
  88. data/app/models/ticket_antecedent.rb +0 -39
  89. data/app/models/value_statement.rb +0 -9
  90. data/app/presenters/problem_presenter.rb +0 -49
  91. data/app/presenters/tester_presenter.rb +0 -15
  92. data/app/views/project_notification/follow_up.html.erb +0 -26
  93. data/app/views/project_pretickets/show.html.erb +0 -49
  94. data/app/views/releases/_antecedents.html.erb +0 -12
  95. data/config/initializers/hard_coded_knowledge.rb +0 -141
  96. data/db/migrate/20130427223925_create_project_quotas.rb +0 -14
  97. data/db/migrate/20140506035755_create_value_statements.rb +0 -9
  98. data/lib/houston/boot/ticket_antecedent_serializer.rb +0 -21
  99. data/test/unit/models/ticket_antecedents_test.rb +0 -38
@@ -7,26 +7,28 @@
7
7
 
8
8
  <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => "form-horizontal"}) do |f| %>
9
9
  <fieldset>
10
- <div class="control-group">
11
- <div class="controls">
12
- <em><%= Houston::TMI::INSTRUCTIONS_FOR_LOGIN %></em>
10
+ <% if Houston.config.authentication_strategy_configuration[:instructions] %>
11
+ <div class="control-group">
12
+ <div class="controls">
13
+ <em><%= Houston.config.authentication_strategy_configuration[:instructions] %></em>
14
+ </div>
13
15
  </div>
14
- </div>
15
-
16
+ <% end %>
17
+
16
18
  <div class="control-group">
17
19
  <%= f.label :email, "Username or Email", :class => 'control-label' %>
18
20
  <div class="controls">
19
21
  <%= f.text_field :email, :class => 'text_field' %>
20
22
  </div>
21
23
  </div>
22
-
24
+
23
25
  <div class="control-group">
24
26
  <%= f.label :password, :class => 'control-label' %>
25
27
  <div class="controls">
26
28
  <%= f.password_field :password, :class => 'text_field' %>
27
29
  </div>
28
30
  </div>
29
-
31
+
30
32
  <% if devise_mapping.rememberable? -%>
31
33
  <div class="control-group">
32
34
  <div class="controls remember-me">
@@ -25,9 +25,11 @@
25
25
 
26
26
  <li class="divider-horizontal"></li>
27
27
 
28
- <% if can?(:read, Project) -%>
29
- <%= render_nav_link "Projects", main_app.projects_path, icon: "fa-database" %>
30
- <% end -%>
28
+ <% if can?(:manage, Team) %>
29
+ <li><%= link_to "Teams", main_app.teams_path %></li>
30
+ <% end %>
31
+
32
+ <li class="divider-horizontal"></li>
31
33
 
32
34
  </ul>
33
35
  </div>
@@ -5,14 +5,23 @@
5
5
  <ul class="nav pull-right">
6
6
  <% if current_user -%>
7
7
 
8
- <% if can?(:manage, User) || can?(:read, Action) %>
8
+ <% if can?(:read, User) || can?(:read, Team) || can?(:read, Project) || can?(:read, Action) %>
9
9
  <li class="dropdown">
10
10
  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> <b class="caret"></b></a>
11
11
  <ul class="dropdown-menu">
12
- <% if can?(:manage, User) %>
12
+ <% if can?(:read, Team) %>
13
+ <li><%= link_to "Teams", main_app.teams_path %></li>
14
+ <% end %>
15
+ <% if can?(:read, Project) %>
16
+ <li><%= link_to "Projects", main_app.projects_path %></li>
17
+ <% end %>
18
+ <% if can?(:read, User) %>
13
19
  <li><%= link_to "Users", main_app.users_path %></li>
14
20
  <% end %>
15
21
  <% if can?(:read, Action) %>
22
+ <% if can?(:read, User) || can?(:read, Team) || can?(:read, Project) %>
23
+ <li class="divider"></li>
24
+ <% end %>
16
25
  <li><%= link_to "Actions", main_app.actions_path %></li>
17
26
  <li><%= link_to "Running Actions", main_app.running_actions_path %></li>
18
27
  <li><%= link_to "Triggers", main_app.triggers_path %></li>
@@ -35,15 +44,7 @@
35
44
  <% end -%>
36
45
  </ul>
37
46
  <ul class="nav">
38
-
39
47
  <% Houston.config.navigation.each do |navigation| %><%= render_navigation navigation %><% end %>
40
-
41
- <li class="divider-vertical"></li>
42
-
43
- <% if can?(:read, Project) -%>
44
- <%= render_nav_link "Projects", main_app.projects_path, icon: "fa-archive" %>
45
- <% end -%>
46
-
47
48
  </ul>
48
49
  </div>
49
50
  </div>
@@ -1,6 +1,6 @@
1
1
  <div style="position: fixed; left: 0; right: 0; bottom: 0; height: 42px; line-height: 36px; background: black; padding-left: 4px; z-index: 100;">
2
2
  <form action="/tester_bar/login_as">
3
- <%= select_tag "email", options_for_select(User.unretired.map { |u| ["#{u.name} (#{u.role}#{", Admin" if u.administrator?})", u.email] }, current_user.try(:email)), :style => "margin-bottom: 0" %>
3
+ <%= select_tag "email", options_for_select(User.unretired.map { |u| [u.role == "Member" ? u.name : "#{u.name} (#{u.role})", u.email] }, current_user.try(:email)), :style => "margin-bottom: 0" %>
4
4
  <button class="btn btn-primary" type="submit" title="Log in as any user">Login</button>
5
5
  </form>
6
6
  </div>
@@ -81,8 +81,7 @@
81
81
  id: current_user.id,
82
82
  email: current_user.email,
83
83
  name: current_user.name,
84
- role: current_user.role,
85
- admin: current_user.administrator?
84
+ role: current_user.role
86
85
  }.to_json) %>);
87
86
  <% end %>
88
87
  });
@@ -10,7 +10,6 @@
10
10
  <td class="ticket-reporter"></td>
11
11
  <th class="ticket-summary" data-attribute="summary">Summary</th>
12
12
  <th class="ticket-milestone" data-attribute="milestone">Milestone</th>
13
- <th class="ticket-antecedents" data-attribute="antecedents">Antecedents</th>
14
13
  <th class="ticket-opened date sort-asc" data-attribute="openedAt">Opened</th>
15
14
  <th class="ticket-closed date" data-attribute="closedAt">Closed</th>
16
15
  <td class="table-margin"></td>
@@ -85,39 +85,4 @@
85
85
  <ProtectScenarios>False</ProtectScenarios>
86
86
  </WorksheetOptions>
87
87
  </Worksheet>
88
- <Worksheet ss:Name="Antecedents">
89
- <Table ss:ExpandedColumnCount="3" ss:ExpandedRowCount="<%= 1 + @tickets.sum { |ticket| ticket.antecedents.length } %>" x:FullColumns="1"
90
- x:FullRows="1" ss:DefaultColumnWidth="65" ss:DefaultRowHeight="15">
91
- <Column ss:AutoFitWidth="0" ss:Width="100"/>
92
- <Column ss:AutoFitWidth="0" ss:Width="75"/>
93
- <Column ss:AutoFitWidth="0" ss:Width="75"/>
94
- <Row ss:StyleID="s65">
95
- <Cell><Data ss:Type="String">Ticket Number</Data></Cell>
96
- <Cell><Data ss:Type="String">ID</Data></Cell>
97
- <Cell><Data ss:Type="String">Kind</Data></Cell>
98
- </Row>
99
- <% @tickets.each do |ticket| %>
100
- <% ticket.antecedents.each do |antecedent| %>
101
- <Row>
102
- <Cell><Data ss:Type="Number"><%= ticket.number %></Data></Cell>
103
- <Cell><Data ss:Type="String"><%= antecedent.id %></Data></Cell>
104
- <Cell><Data ss:Type="String"><%= antecedent.kind %></Data></Cell>
105
- </Row>
106
- <% end %>
107
- <% end %>
108
- </Table>
109
- <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
110
- <PageLayoutZoom>0</PageLayoutZoom>
111
- <Selected/>
112
- <Panes>
113
- <Pane>
114
- <Number>3</Number>
115
- <ActiveRow>1</ActiveRow>
116
- <ActiveCol>2</ActiveCol>
117
- </Pane>
118
- </Panes>
119
- <ProtectObjects>False</ProtectObjects>
120
- <ProtectScenarios>False</ProtectScenarios>
121
- </WorksheetOptions>
122
- </Worksheet>
123
88
  </Workbook>
@@ -10,8 +10,7 @@
10
10
  project: {
11
11
  slug: <%= raw @project.slug.to_json %>,
12
12
  ticketTrackerName: <%= raw @project.ticket_tracker_name.to_json %><%# so that we can log in %>
13
- },
14
- labels: <%= raw @labels.to_json %>
13
+ }
15
14
  }).render();
16
15
  });
17
16
  </script>
@@ -14,6 +14,13 @@
14
14
  </div>
15
15
  </div>
16
16
 
17
+ <div class="control-group">
18
+ <%= f.label :team_id, :class => "control-label" %>
19
+ <div class="controls">
20
+ <%= f.select :team_id, [["", nil]] + Team.all.pluck(:name, :id), :class => "select_field" %>
21
+ </div>
22
+ </div>
23
+
17
24
  <div class="control-group">
18
25
  <%= f.label :color, :class => "control-label" %>
19
26
  <div class="controls">
@@ -104,18 +111,6 @@
104
111
  <% end %>
105
112
  <% end %>
106
113
 
107
- <hr />
108
-
109
- <div class="control-group">
110
- <%= f.label :roles, "Teammates", :class => "control-label" %>
111
- <div class="controls changes-nested-editor">
112
- <%= f.nested_editor_for :roles do |f| -%>
113
- <%= f.select :user_id, [nil] + User.all.map { |user| [user.name, user.id] } %>
114
- <%= f.select :name, [nil] + Houston.config.project_roles %>
115
- <% end -%>
116
- </div>
117
- </div>
118
-
119
114
  <div class="form-actions">
120
115
  <%= f.submit nil, :class => "btn btn-primary" %>
121
116
  <%= link_to "Cancel", projects_path, :class => "btn" %>
@@ -1,8 +1,6 @@
1
1
  <% content_for :title do %>
2
2
  <h1 class="project-banner space-below">
3
3
  Projects
4
- <%= link_to "New Project", new_project_path, :class => "btn btn-primary" if can?(:create, Project) %>
5
- <%= link_to "Add Projects from GitHub", add_github_projects_path, :class => "btn btn-primary" if can?(:create, Project) %>
6
4
 
7
5
  <%= render partial: "projects/keyboard_shortcuts" %>
8
6
  </h1>
@@ -16,8 +14,7 @@
16
14
  <td class="table-margin"></td>
17
15
  <td class="project-feature-error"></td>
18
16
  <th class="project-title sort-desc">Title</th>
19
- <th class="project-maintainers">Maintainers</th>
20
- <th class="project-owners">Owners</th>
17
+ <th class="project-team">Team</th>
21
18
  <% if current_user.developer? %>
22
19
  <th class="project-last-commit">Last Commit</th>
23
20
  <% KeyDependency.all.each do |dependency| %>
@@ -54,15 +51,10 @@
54
51
  <%= link_to_if can?(:update, project), project.name, edit_project_path(project) %>
55
52
  </td>
56
53
 
57
- <td class="project-maintainers project-participants">
58
- <% project.maintainers.each do |maintainer| %><%= link_to avatar_for(maintainer), user_path(maintainer), :class => "project-maintainer project-participant", :rel => "tooltip", :title => maintainer.name, "data-placement" => "right" %><span class="hidden-text"><%= maintainer.first_name %></span><!-- so sort works --><% end %>
54
+ <td class="project-team">
55
+ <%= project.team && project.team.name %>
59
56
  </td>
60
57
 
61
- <td class="project-owners project-participants">
62
- <% project.owners.each do |owner| %><%= link_to avatar_for(owner), user_path(owner), :class => "project-owner project-participant", :rel => "tooltip", :title => owner.name, "data-placement" => "right" %><span class="hidden-text"><%= owner.first_name %></span><!-- so sort works --><% end %>
63
- </td>
64
-
65
-
66
58
 
67
59
  <% if current_user.developer? %>
68
60
 
@@ -127,13 +119,14 @@
127
119
 
128
120
  <td class="project-following">
129
121
  <% if current_user %>
130
- <% roles_for_project = current_user.roles.find_all { |role| role.project_id == project.id }.map(&:name) %>
131
- <% if roles_for_project.none? %>
132
- <%= button_to "Follow", project_follow_path(project), method: :post, class: "btn btn-primary" %>
133
- <% elsif roles_for_project == %w{Follower} %>
134
- <%= button_to "Unfollow", project_unfollow_path(project), method: :delete, class: "btn" %>
122
+ <% if current_user.follows?(project) %>
123
+ <%= button_to project_unfollow_path(project), method: :delete, class: "btn-link" do %>
124
+ <i class="fa fa-star"/></i>
125
+ <% end %>
135
126
  <% else %>
136
- <%= roles_for_project.to_sentence %>
127
+ <%= button_to project_follow_path(project), method: :post, class: "btn-link" do %>
128
+ <i class="fa fa-star-o"/></i>
129
+ <% end %>
137
130
  <% end %>
138
131
  <% end %>
139
132
  </td>
@@ -1,5 +1,5 @@
1
1
  <div id="<%= @release.project.slug %>_changelog" class="-houston-changelog">
2
-
2
+
3
3
  <div class="-houston-changelog-day">
4
4
  <h4>
5
5
  <% if (defined?(draft) && draft) %>
@@ -11,38 +11,35 @@
11
11
  <%= link_to "Edit", edit_release_path(@release) if can?(:update, @release) and !(defined?(draft) && draft) %>
12
12
  </h4>
13
13
  </div>
14
-
14
+
15
15
  <%= div_for @release do %>
16
-
16
+
17
17
  <% unless @release.message.blank? %>
18
18
  <div class="release-message">
19
19
  <%= mdown(@release.message) %>
20
20
  </div>
21
21
  <% end %>
22
-
22
+
23
23
  <% if @release.release_changes.any? %>
24
24
  <div class="release-changes">
25
25
  <% ordered_by_tag(@release.release_changes).each do |change| %>
26
- <% if can?(:read, change) %>
27
- <div class="change">
28
- <%= format_change_tag change.tag %>
29
- <div class="change-summary"><%= format_change(change) %></div>
30
- </div>
31
- <% end %>
26
+ <div class="change">
27
+ <%= format_change_tag change.tag %>
28
+ <div class="change-summary"><%= format_change(change) %></div>
29
+ </div>
32
30
  <% end %>
33
31
  </div>
34
32
  <% else %>
35
33
  <div class="release-no-changes">No changes</div>
36
34
  <% end %>
37
-
35
+
38
36
  <% unless (defined?(draft) && draft) %>
39
37
  <div class="release-detail">
40
38
  <%= render partial: "releases/tickets", locals: {tickets: @release.tickets} if can?(:read, Ticket) %>
41
- <%= render partial: "releases/antecedents", locals: {antecedents: @release.antecedents} if can?(:read, Ticket) %>
42
39
  <%= render partial: "releases/commits", locals: {commits: @release.commits} if can?(:read, Commit) && !for_email? %>
43
40
  </div>
44
41
  <% end %>
45
-
42
+
46
43
  <% end %>
47
-
44
+
48
45
  </div>
@@ -0,0 +1,45 @@
1
+ <%= form_for @team, :html => { :class => "form-horizontal" } do |f| %>
2
+ <fieldset>
3
+ <div class="control-group">
4
+ <%= f.label :name, :class => "control-label" %>
5
+ <div class="controls">
6
+ <%= f.text_field :name, :class => "text_field" %>
7
+ </div>
8
+ </div>
9
+
10
+ <hr />
11
+
12
+ <div class="control-group">
13
+ <%= f.label :roles, "Teammates", :class => "control-label" %>
14
+ <div class="controls changes-nested-editor">
15
+ <%= f.nested_editor_for :roles do |f| -%>
16
+ <%= f.select :user_id, [nil] + User.unretired.pluck("CONCAT(first_name, ' ', last_name)", :id) %>
17
+ <% Houston.config.roles.each do |role| %>
18
+ <% role_slug = role.downcase.gsub(" ", "_").pluralize %>
19
+ <label style="display: inline-block">
20
+ <input type="checkbox" name="team[roles_attributes][0][roles][]" value="<%= role %>" <%= "checked" if f.object.roles.member?(role) %> />
21
+ <%= role %>
22
+ </label>
23
+ <% end %>
24
+ <% end -%>
25
+ </div>
26
+ </div>
27
+
28
+ <div class="form-actions">
29
+ <%= f.submit nil, :class => "btn btn-primary" %>
30
+ <%= link_to "Cancel", teams_path, :class => "btn" %>
31
+ </div>
32
+ </fieldset>
33
+ <% end %>
34
+
35
+ <% content_for :javascripts do %>
36
+ <script type="text/javascript">
37
+ $(function() {
38
+ NestedEditorFor.init();
39
+
40
+ $(document.body).on('nested-editor.reset', function(e) {
41
+ $(e.target).find(':checkbox').prop('checked', false);
42
+ });
43
+ });
44
+ </script>
45
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% content_for :title do %>
2
+ <h1 class="project-banner space-below">
3
+ <small>Edit</small>
4
+ <%= @team.name %>
5
+ </h1>
6
+ <% end %>
7
+
8
+ <%= render partial: "form" %>
@@ -0,0 +1,62 @@
1
+ <% content_for :title do %>
2
+ <h1 class="project-banner space-below">
3
+ Teams
4
+ <%= link_to "New Team", new_team_path, :class => "btn btn-primary" if can?(:create, Team) %>
5
+
6
+ <%= render partial: "projects/keyboard_shortcuts" %>
7
+ </h1>
8
+ <% end %>
9
+
10
+ <div class="teams">
11
+ <% @teams.each do |team| %>
12
+ <div class="team-wrapper">
13
+ <div class="team">
14
+ <h3 class="team-name">
15
+ <%= link_to_if can?(:update, team), team.name, edit_team_path(team) %>
16
+ </h3>
17
+ <h6>Teammates</h6>
18
+ <ol class="team-members">
19
+ <% team.roles.sort_by { |role| Houston.config.roles.find_index { |r| role.roles.member?(r) } || 999 }.each do |role| %>
20
+ <li class="team-member">
21
+ <span class="user-avatar"><%= avatar_for(role.user, size: 32) %></span>
22
+ <span class="user-name">
23
+ <%= link_to user_path(role.user) do %>
24
+ <span class="first-name"><%= role.user.first_name %></span>
25
+ <span class="last-name"><%= role.user.last_name[0] %></span>
26
+ <% end %>
27
+ </span>
28
+ <span class="user-roles">
29
+ <%= role.roles.any? ? role.roles.join(", ") : "" %>
30
+ </span>
31
+ </li>
32
+ <% end %>
33
+ </ol>
34
+ <h6>Projects</h6>
35
+
36
+ <% if team.projects.any? %>
37
+ <ol class="team-projects">
38
+ <% team.projects.each do |project| %>
39
+ <li class="team-project">
40
+ <% if project.color %>
41
+ <b class="bubble <%= project.color %>" rel="tooltip" title="<%= project.color.titleize %>" data-tooltip-placement="right"></b>
42
+ <% else %>
43
+ <b class="bubble"></b>
44
+ <% end %>
45
+ <%= link_to project.name, teams_path(project: project.slug) %>
46
+ </li>
47
+ <% end %>
48
+ </ol>
49
+ <% else %>
50
+ <div class="team-projects-empty">No projects</div>
51
+ <% end %>
52
+
53
+ <% if can?(:create, team.projects.build) %>
54
+ <div class="team-projects-add">
55
+ <%= link_to "New Project", new_project_path(team), :class => "btn btn-mini btn-default" %>
56
+ <%= link_to "Add Projects from GitHub", add_github_projects_path(team), :class => "btn btn-mini btn-default" %>
57
+ </div>
58
+ <% end %>
59
+ </div>
60
+ </div>
61
+ <% end %>
62
+ </div>
@@ -0,0 +1,7 @@
1
+ <% content_for :title do %>
2
+ <h1 class="project-banner space-below">
3
+ New Team
4
+ </h1>
5
+ <% end %>
6
+
7
+ <%= render partial: "form" %>