houston-core 0.8.4 → 0.9.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +72 -78
- data/app/assets/javascripts/houston/app/models/role.coffee +4 -0
- data/app/assets/javascripts/houston/app/views/nested_resources.coffee +44 -0
- data/app/assets/javascripts/houston/app/views/team_roles_view.coffee +10 -0
- data/app/assets/javascripts/houston/application.js +3 -1
- data/app/assets/javascripts/houston/core/ajax_helpers.coffee +26 -0
- data/app/assets/javascripts/houston/core/app.coffee +0 -45
- data/app/assets/javascripts/houston/core/errors.coffee +1 -12
- data/app/assets/javascripts/houston/core/handlebars_helpers.coffee +8 -70
- data/app/assets/javascripts/houston/core/jquery_extensions.coffee +0 -138
- data/app/assets/javascripts/houston/core/timeline_helpers.coffee +44 -0
- data/app/assets/javascripts/houston/core/uploader_helpers.coffee +99 -0
- data/app/assets/javascripts/houston/vendor.js +26 -9
- data/app/assets/stylesheets/houston/application/actions.scss +22 -0
- data/app/assets/stylesheets/houston/application/navigation.scss +2 -2
- data/app/assets/stylesheets/houston/application/{freight_train.css.scss → nested_resources.scss} +1 -0
- data/app/assets/stylesheets/houston/core/alerts.scss +0 -4
- data/app/assets/stylesheets/houston/core/timeline.scss +204 -0
- data/app/assets/templates/houston/teams/roles/index.hbs +1 -0
- data/app/assets/templates/houston/teams/roles/show.hbs +19 -0
- data/app/channels/events_channel.rb +1 -1
- data/app/concerns/houston/props.rb +3 -2
- data/app/controllers/actions_controller.rb +8 -3
- data/app/controllers/application_controller.rb +9 -12
- data/app/controllers/authorizations_controller.rb +41 -14
- data/app/controllers/errors_controller.rb +3 -3
- data/app/controllers/project_follows_controller.rb +23 -0
- data/app/controllers/project_options_controller.rb +1 -1
- data/app/controllers/user_options_controller.rb +1 -1
- data/app/helpers/actions_helper.rb +12 -0
- data/app/helpers/application_helper.rb +0 -10
- data/app/helpers/layout_helper.rb +20 -0
- data/app/helpers/markdown_helper.rb +2 -10
- data/app/helpers/navigation_helper.rb +5 -5
- data/app/helpers/project_helper.rb +6 -0
- data/app/helpers/url_helper.rb +4 -4
- data/app/helpers/view_extensions_helper.rb +20 -0
- data/app/models/action.rb +61 -44
- data/app/models/authorization.rb +55 -10
- data/app/models/follow.rb +6 -0
- data/app/models/persistent_trigger.rb +11 -1
- data/app/models/project.rb +5 -27
- data/app/models/user.rb +15 -59
- data/app/presenters/project_presenter.rb +2 -2
- data/app/views/actions/_actions.html.erb +8 -5
- data/app/views/actions/index.html.erb +1 -1
- data/app/views/actions/running.html.erb +9 -15
- data/app/views/actions/show.html.erb +6 -3
- data/app/views/actions/unqueued.html.erb +41 -0
- data/app/views/authorizations/_form.html.erb +28 -16
- data/app/views/authorizations/index.html.erb +9 -4
- data/app/views/{oauth/providers/edit.html.erb → authorizations/oauth2_callback.html.erb} +3 -2
- data/app/views/devise/sessions/new.html.erb +0 -8
- data/app/views/errors/index.html.erb +9 -5
- data/app/views/layouts/_navigation.html.erb +9 -0
- data/app/views/layouts/application.html.erb +11 -6
- data/app/views/layouts/dashboard.html.erb +9 -0
- data/app/views/projects/_form.html.erb +7 -18
- data/app/views/projects/_header.html.erb +2 -6
- data/app/views/projects/index.html.erb +4 -4
- data/app/views/teams/_form.html.erb +7 -17
- data/app/views/teams/index.html.erb +1 -1
- data/app/views/users/_form.html.erb +1 -38
- data/config/application.rb +8 -5
- data/config/initializers/devise.rb +0 -14
- data/config/initializers/secret_token.rb +8 -13
- data/config/routes.rb +12 -28
- data/db/migrate/20130706141443_drop_deprecated_project_roles.rb +5 -1
- data/db/migrate/20170118005958_remove_antecedents_from_versions_of_tickets.rb +1 -1
- data/db/migrate/20170130011016_drop_users_environments_subscribed_to.rb +9 -0
- data/db/migrate/20170205004452_drop_settings.rb +12 -0
- data/db/migrate/20170206002030_drop_extension_hstore.rb +9 -0
- data/db/migrate/20170206002732_drop_legacy_columns_from_users.rb +10 -0
- data/db/migrate/20170209022159_rename_projects_color_to_color_name.rb +5 -0
- data/db/migrate/20170213001453_change_providers_from_models_to_extensions.rb +27 -0
- data/db/migrate/20170215012012_add_props_to_authorizations.rb +5 -0
- data/db/migrate/20170216041034_add_user_to_persistent_triggers.rb +5 -0
- data/db/migrate/20170226201504_create_follows.rb +20 -0
- data/db/migrate/20170301014051_drop_name_from_authorizations.rb +9 -0
- data/db/migrate/20170307032041_add_created_at_to_actions.rb +11 -0
- data/db/migrate/20170307035755_allow_actions_started_at_to_be_null.rb +5 -0
- data/db/migrate/20170310024505_replace_authorizations_provider_name_with_type.rb +12 -0
- data/db/migrate/20170329030329_drop_consumer_tokens.rb +9 -0
- data/db/structure.sql +187 -212
- data/houston-core.gemspec +10 -13
- data/lib/houston/boot.rb +1 -4
- data/lib/houston/boot/actions.rb +24 -21
- data/lib/houston/boot/configuration.rb +46 -113
- data/lib/houston/boot/extensions.rb +54 -341
- data/lib/houston/boot/extensions/deprecated.rb +194 -0
- data/lib/houston/boot/extensions/dsl.rb +99 -0
- data/lib/houston/boot/extensions/events.rb +81 -0
- data/lib/houston/boot/extensions/features.rb +42 -0
- data/lib/houston/boot/extensions/layout.rb +70 -0
- data/lib/houston/boot/extensions/navigation.rb +42 -0
- data/lib/houston/boot/extensions/oauth.rb +62 -0
- data/lib/houston/boot/extensions/serializers.rb +29 -0
- data/lib/houston/boot/extensions/view.rb +34 -0
- data/lib/houston/boot/observer.rb +10 -5
- data/{app/models/oauth → lib/houston/boot}/provider.rb +7 -5
- data/lib/houston/boot/running_as.rb +0 -5
- data/lib/houston/boot/serializer.rb +12 -6
- data/lib/houston/boot/{active_record_serializer.rb → serializers/active_record_serializer.rb} +0 -2
- data/lib/houston/boot/{readonly_hash_serializer.rb → serializers/readonly_hash_serializer.rb} +0 -2
- data/lib/houston/boot/timer.rb +10 -0
- data/lib/houston/boot/triggers.rb +27 -8
- data/lib/houston/version.rb +1 -1
- data/templates/new-instance/.gitignore +0 -4
- data/templates/new-instance/config/main.rb +8 -10
- data/templates/new-module/test/dummy/houston.rb +1 -0
- data/test/acceptance/layout_test.rb +58 -0
- data/test/acceptance/updating_props_test.rb +72 -0
- data/test/support/config.rb +1 -0
- data/test/unit/extensions/events_extension_test.rb +33 -0
- data/test/unit/extensions/layout_extension_test.rb +74 -0
- data/test/unit/extensions/navigation_extension_test.rb +62 -0
- data/test/unit/extensions/oauth_extension_test.rb +91 -0
- data/test/unit/extensions/project_features_extension_test.rb +79 -0
- data/test/unit/extensions/serializers_extension_test.rb +47 -0
- data/test/unit/extensions/view_extension_test.rb +98 -0
- data/test/unit/models/actions_test.rb +11 -5
- data/test/unit/models/configuration_test.rb +0 -8
- data/test/unit/models/observer_test.rb +16 -0
- data/test/unit/models/persistent_trigger_test.rb +29 -2
- data/test/unit/models/serializer_test.rb +6 -0
- data/test/unit/models/timer_test.rb +88 -0
- metadata +87 -168
- data/app/assets/font/octicons.eot +0 -0
- data/app/assets/font/octicons.svg +0 -198
- data/app/assets/font/octicons.ttf +0 -0
- data/app/assets/font/octicons.woff +0 -0
- data/app/assets/font/roboto-black-webfont.eot +0 -0
- data/app/assets/font/roboto-black-webfont.svg +0 -675
- data/app/assets/font/roboto-black-webfont.ttf +0 -0
- data/app/assets/font/roboto-black-webfont.woff +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.svg +0 -677
- data/app/assets/font/roboto-blackitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-blackitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-bold-webfont.eot +0 -0
- data/app/assets/font/roboto-bold-webfont.svg +0 -675
- data/app/assets/font/roboto-bold-webfont.ttf +0 -0
- data/app/assets/font/roboto-bold-webfont.woff +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.eot +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.svg +0 -677
- data/app/assets/font/roboto-bolditalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-bolditalic-webfont.woff +0 -0
- data/app/assets/font/roboto-italic-webfont.eot +0 -0
- data/app/assets/font/roboto-italic-webfont.svg +0 -668
- data/app/assets/font/roboto-italic-webfont.ttf +0 -0
- data/app/assets/font/roboto-italic-webfont.woff +0 -0
- data/app/assets/font/roboto-light-webfont.eot +0 -0
- data/app/assets/font/roboto-light-webfont.svg +0 -666
- data/app/assets/font/roboto-light-webfont.ttf +0 -0
- data/app/assets/font/roboto-light-webfont.woff +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.svg +0 -668
- data/app/assets/font/roboto-lightitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-lightitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-medium-webfont.eot +0 -0
- data/app/assets/font/roboto-medium-webfont.svg +0 -675
- data/app/assets/font/roboto-medium-webfont.ttf +0 -0
- data/app/assets/font/roboto-medium-webfont.woff +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.svg +0 -677
- data/app/assets/font/roboto-mediumitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-mediumitalic-webfont.woff +0 -0
- data/app/assets/font/roboto-regular-webfont.eot +0 -0
- data/app/assets/font/roboto-regular-webfont.svg +0 -666
- data/app/assets/font/roboto-regular-webfont.ttf +0 -0
- data/app/assets/font/roboto-regular-webfont.woff +0 -0
- data/app/assets/font/roboto-thin-webfont.eot +0 -0
- data/app/assets/font/roboto-thin-webfont.svg +0 -666
- data/app/assets/font/roboto-thin-webfont.ttf +0 -0
- data/app/assets/font/roboto-thin-webfont.woff +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.eot +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.svg +0 -668
- data/app/assets/font/roboto-thinitalic-webfont.ttf +0 -0
- data/app/assets/font/roboto-thinitalic-webfont.woff +0 -0
- data/app/assets/images/bug-fixed-128.png +0 -0
- data/app/assets/images/bug-fixed-32.png +0 -0
- data/app/assets/images/bug-fixed-48.png +0 -0
- data/app/assets/images/bug-new-128.png +0 -0
- data/app/assets/images/bug-new-32.png +0 -0
- data/app/assets/images/bug-new-48.png +0 -0
- data/app/assets/images/bug-open-32.png +0 -0
- data/app/assets/images/bug-zero-128.png +0 -0
- data/app/assets/images/bug-zero-48.png +0 -0
- data/app/assets/images/drag-grip.png +0 -0
- data/app/assets/javascripts/houston/core/burndown_chart.coffee +0 -111
- data/app/assets/javascripts/houston/core/stacked_area_graph.coffee +0 -113
- data/app/assets/javascripts/houston/core/stacked_bar_graph.coffee +0 -108
- data/app/assets/stylesheets/houston/application/project_tiles.scss +0 -26
- data/app/assets/stylesheets/houston/application/tips.scss +0 -5
- data/app/assets/stylesheets/houston/core/octicons-icons.scss +0 -221
- data/app/assets/stylesheets/houston/core/octicons.scss.erb +0 -9
- data/app/assets/stylesheets/houston/core/roboto.scss.erb +0 -131
- data/app/concerns/historical_weekly_stats.rb +0 -15
- data/app/concerns/nosync.rb +0 -21
- data/app/controllers/oauth/providers_controller.rb +0 -45
- data/app/controllers/project_roles_controller.rb +0 -22
- data/app/controllers/settings_controller.rb +0 -14
- data/app/controllers/tester_bar_controller.rb +0 -12
- data/app/controllers/user_credentials_controller.rb +0 -24
- data/app/models/role.rb +0 -33
- data/app/models/setting.rb +0 -10
- data/app/models/settings.rb +0 -38
- data/app/models/slackdown.rb +0 -23
- data/app/models/user_credentials.rb +0 -27
- data/app/views/errors/_actions.html.erb +0 -17
- data/app/views/layouts/_tester_bar.html.erb +0 -6
- data/app/views/layouts/minimal.html.erb +0 -50
- data/app/views/layouts/naked.html.erb +0 -47
- data/app/views/layouts/naked_dashboard.html.erb +0 -50
- data/app/views/oauth/providers/_form.html.erb +0 -54
- data/app/views/oauth/providers/index.html.erb +0 -41
- data/app/views/oauth/providers/new.html.erb +0 -7
- data/config/initializers/add_navigation_renderers.rb +0 -5
- data/config/initializers/vestal_versions.rb +0 -9
- data/db/migrate/20130519163615_create_user_credentials.rb +0 -18
- data/lib/houston/boot/events.rb +0 -10
- data/lib/tasks/keypair.rake +0 -17
- data/vendor/assets/javascripts/jquery.pjax.js +0 -817
@@ -7,14 +7,6 @@
|
|
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
|
-
<% 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>
|
15
|
-
</div>
|
16
|
-
<% end %>
|
17
|
-
|
18
10
|
<div class="control-group">
|
19
11
|
<%= f.label :email, "Username or Email", :class => 'control-label' %>
|
20
12
|
<div class="controls">
|
@@ -4,22 +4,26 @@
|
|
4
4
|
</h1>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<div class="nomargin">
|
7
|
+
<div class="nomargin action-errors">
|
8
8
|
<table id="errors" class="table table-sortable table-striped">
|
9
9
|
<thead>
|
10
10
|
<tr>
|
11
11
|
<td class="table-margin"></td>
|
12
|
-
<th class="action-
|
12
|
+
<th class="action-created">Queued</th>
|
13
13
|
<th class="action-name">Action</th>
|
14
|
+
<th class="action-started">Started</th>
|
15
|
+
<th class="action-finished">Finished</th>
|
16
|
+
<th class="action-duration">Duration</th>
|
14
17
|
<th class="action-trigger">Trigger</th>
|
15
18
|
<th class="action-params">Params</th>
|
16
|
-
<
|
19
|
+
<td class="action-succeeded"></td>
|
20
|
+
<th class="action-exception">Exception</th>
|
17
21
|
<th class="action-retry">Retry</th>
|
18
22
|
<td class="table-margin"></td>
|
19
23
|
</tr>
|
20
24
|
</thead>
|
21
25
|
<tbody class="infinite-scroll">
|
22
|
-
<%= render "
|
26
|
+
<%= render "actions/actions" %>
|
23
27
|
</tbody>
|
24
28
|
</table>
|
25
29
|
</div>
|
@@ -36,7 +40,7 @@
|
|
36
40
|
});
|
37
41
|
new InfiniteScroll({
|
38
42
|
load: function($tbody) {
|
39
|
-
var timestamp = $tbody.find('.action
|
43
|
+
var timestamp = $tbody.find('.action:last').attr('data-timestamp');
|
40
44
|
return $.get(window.location.pathname, {before: timestamp});
|
41
45
|
}
|
42
46
|
});
|
@@ -26,6 +26,10 @@
|
|
26
26
|
<li><%= link_to "Running Actions", main_app.running_actions_path %></li>
|
27
27
|
<li><%= link_to "Triggers", main_app.triggers_path %></li>
|
28
28
|
<li><%= link_to "Errors", main_app.errors_path %></li>
|
29
|
+
<% if can?(:read, :all_authorizations) %>
|
30
|
+
<li class="divider"></li>
|
31
|
+
<li><%= link_to "Authorizations", main_app.authorizations_path %></li>
|
32
|
+
<% end %>
|
29
33
|
<% end %>
|
30
34
|
</ul>
|
31
35
|
</li>
|
@@ -36,6 +40,11 @@
|
|
36
40
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= avatar_for(current_user, size: 30) %> <b class="caret"></b></a>
|
37
41
|
<ul class="dropdown-menu">
|
38
42
|
<li><%= link_to "Settings", main_app.edit_user_path(current_user) %></li>
|
43
|
+
<% if can?(:create, Authorization) %>
|
44
|
+
<li class="divider"></li>
|
45
|
+
<li><%= link_to "My Authorizations", main_app.my_authorizations_path %></li>
|
46
|
+
<% end %>
|
47
|
+
<li class="divider"></li>
|
39
48
|
<li><%= link_to "Sign out", main_app.destroy_user_session_path %></li>
|
40
49
|
</ul>
|
41
50
|
</li>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en" class="
|
3
|
-
<%= "tester-bar" if Rails.env.development? %>
|
4
3
|
<%= "mobile" if mobile? %>">
|
5
4
|
<head>
|
6
5
|
<meta charset="utf-8">
|
@@ -12,6 +11,7 @@
|
|
12
11
|
<meta name="revision" content="<%= revision %>" />
|
13
12
|
<meta name="env" content="<%= Rails.env %>" />
|
14
13
|
<meta name="s3-bucket" content="<%= Houston.config.s3[:bucket] %>" />
|
14
|
+
<%= render_layout_extensions("application", :meta) %>
|
15
15
|
<%= yield :meta %>
|
16
16
|
|
17
17
|
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
@@ -25,6 +25,7 @@
|
|
25
25
|
<%= stylesheet_link_tag "houston/print", media: "print" %>
|
26
26
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
|
27
27
|
|
28
|
+
<%= render_layout_extensions("application", :stylesheets) %>
|
28
29
|
<%= yield :stylesheets %><%# so that Engines can hook in and add styles %>
|
29
30
|
|
30
31
|
<!-- Le fav and touch icons -->
|
@@ -35,23 +36,24 @@
|
|
35
36
|
<body>
|
36
37
|
|
37
38
|
<% if mobile? %>
|
38
|
-
<%= render "layouts/mobile_navigation" %>
|
39
|
+
<%= render "layouts/mobile_navigation" if layout_show_navigation? %>
|
39
40
|
|
40
|
-
<div class="container-fluid" id="body">
|
41
|
+
<div class="<%= layout_container_fluid? ? "container-fluid" : "container" %>" id="body">
|
41
42
|
<%= yield :title %>
|
42
43
|
<% else %>
|
43
|
-
<%= render "layouts/navigation" %>
|
44
|
+
<%= render "layouts/navigation" if layout_show_navigation? %>
|
44
45
|
|
45
46
|
<%= yield :title %>
|
46
47
|
|
47
|
-
<div class="container-fluid" id="body">
|
48
|
+
<div class="<%= layout_container_fluid? ? "container-fluid" : "container" %>" id="body">
|
48
49
|
<% end %>
|
49
50
|
|
50
51
|
<%= yield -%>
|
51
52
|
|
52
|
-
<%= render partial: "layouts/tester_bar" if Rails.env.development? -%>
|
53
53
|
</div> <!-- /container -->
|
54
54
|
|
55
|
+
<%= render_layout_extensions("application", :footers) %>
|
56
|
+
|
55
57
|
<!-- Le javascript
|
56
58
|
================================================== -->
|
57
59
|
<!-- Placed at the end of the document so the pages load faster -->
|
@@ -81,7 +83,10 @@
|
|
81
83
|
<% end %>
|
82
84
|
});
|
83
85
|
</script>
|
86
|
+
|
87
|
+
<%= render_layout_extensions("application", :scripts) %>
|
84
88
|
<%= yield :javascripts %><%# so that Engines can hook in and add scripts %>
|
89
|
+
|
85
90
|
<%= google_analytics_script_tag %>
|
86
91
|
</body>
|
87
92
|
</html>
|
@@ -9,6 +9,8 @@
|
|
9
9
|
<meta name="relative_url_root" content="<%= main_app.root_url %>" />
|
10
10
|
<meta name="revision" content="<%= revision %>" />
|
11
11
|
<meta name="env" content="<%= Rails.env %>" />
|
12
|
+
<%= render_layout_extensions("dashboard", :meta) %>
|
13
|
+
<%= yield :meta %>
|
12
14
|
|
13
15
|
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
14
16
|
<!--[if lt IE 9]>
|
@@ -19,6 +21,8 @@
|
|
19
21
|
<%= stylesheet_link_tag "houston/vendor", media: "all" %>
|
20
22
|
<%= stylesheet_link_tag "houston/dashboard", media: "all" %>
|
21
23
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
|
24
|
+
|
25
|
+
<%= render_layout_extensions("dashboard", :stylesheets) %>
|
22
26
|
<%= yield :stylesheets %><%# so that Engines can hook in and add styles %>
|
23
27
|
|
24
28
|
<!-- Le fav and touch icons -->
|
@@ -31,13 +35,18 @@
|
|
31
35
|
<%= yield -%>
|
32
36
|
</div>
|
33
37
|
|
38
|
+
<%= render_layout_extensions("dashboard", :footers) %>
|
39
|
+
|
34
40
|
<!-- Le javascript
|
35
41
|
================================================== -->
|
36
42
|
<!-- Placed at the end of the document so the pages load faster -->
|
37
43
|
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" %>
|
38
44
|
<%= javascript_include_tag "houston/vendor" %>
|
39
45
|
<%= javascript_include_tag "houston/dashboard" %>
|
46
|
+
|
47
|
+
<%= render_layout_extensions("dashboard", :scripts) %>
|
40
48
|
<%= yield :javascripts %><%# so that Engines can hook in and add scripts %>
|
49
|
+
|
41
50
|
<%= google_analytics_script_tag %>
|
42
51
|
|
43
52
|
<!--
|
@@ -22,11 +22,11 @@
|
|
22
22
|
</div>
|
23
23
|
|
24
24
|
<div class="control-group">
|
25
|
-
<%= f.label :
|
25
|
+
<%= f.label :color_name, :class => "control-label" %>
|
26
26
|
<div class="controls">
|
27
|
-
<%= f.select :
|
27
|
+
<%= f.select :color_name, [["None", "default"]] + Houston.config.project_colors.keys.map { |name| [name.titleize, name] }, :class => "select_field" %>
|
28
28
|
<% if Project.count > 0 %>
|
29
|
-
(Unused colors: <%= (Houston.config.project_colors.keys - Project.pluck(:
|
29
|
+
(Unused colors: <%= (Houston.config.project_colors.keys - Project.pluck(:color_name).uniq).map(&:titleize).join(", ") %>)
|
30
30
|
<% end %>
|
31
31
|
</div>
|
32
32
|
</div>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
<label class="control-label">Features</label>
|
71
71
|
<div class="controls" style="padding-top: 5px; padding-bottom: 5px;">
|
72
72
|
<% features.each do |feature_slug| %>
|
73
|
-
<% feature = Houston.
|
73
|
+
<% feature = Houston.project_features[feature_slug] %>
|
74
74
|
<label for="selected_features_<%= feature_slug %>">
|
75
75
|
<%= check_box_tag "project[selected_features][]", feature_slug, @project.feature?(feature_slug), id: "selected_features_#{feature_slug}", class: "project-feature" %>
|
76
76
|
<%= feature.name %>
|
@@ -78,7 +78,7 @@
|
|
78
78
|
|
79
79
|
<% if feature.fields.any? %>
|
80
80
|
<div class="project-feature-fields" data-feature="<%= feature_slug %>">
|
81
|
-
<%= f.fields_for :props do |f| %>
|
81
|
+
<%= f.fields_for :props, @project.props do |f| %>
|
82
82
|
<% feature.fields.each do |form| %>
|
83
83
|
<div class="project-feature-field">
|
84
84
|
<%= form.render(self, f) %>
|
@@ -92,18 +92,9 @@
|
|
92
92
|
</div>
|
93
93
|
<% end %>
|
94
94
|
|
95
|
-
<%= f.fields_for :props do |f| %>
|
96
|
-
<% Houston.project_options.each do |form| %>
|
97
|
-
<hr />
|
98
95
|
|
99
|
-
|
100
|
-
|
101
|
-
<div class="controls">
|
102
|
-
<%= form.render(self, f) %>
|
103
|
-
</div>
|
104
|
-
</div>
|
105
|
-
<% end %>
|
106
|
-
<% end %>
|
96
|
+
<%= render_props_fields(f, "edit_project") %>
|
97
|
+
|
107
98
|
|
108
99
|
<div class="form-actions">
|
109
100
|
<%= f.submit nil, :class => "btn btn-primary" %>
|
@@ -119,8 +110,6 @@
|
|
119
110
|
<% content_for :javascripts do %>
|
120
111
|
<script type="text/javascript">
|
121
112
|
$(function() {
|
122
|
-
NestedEditorFor.init();
|
123
|
-
|
124
113
|
function dasherize(word) {
|
125
114
|
return word.replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
|
126
115
|
.replace(/([a-z\d])([A-Z])/g, '$1-$2')
|
@@ -1,14 +1,10 @@
|
|
1
|
-
<%
|
2
|
-
<% without = (defined?(without) && without) || [] %>
|
3
|
-
<h1 class="project-banner <%= project.color %> space-below" data-project-slug="<%= project.slug %>" data-project-color="<%= project.color %>">
|
1
|
+
<% project_banner(project) do %>
|
4
2
|
<% if defined?(subtitle) %><small><%= subtitle %></small><% end %>
|
5
3
|
<%= project.name %><% if defined?(postfix) %><small class="colon">:</small> <small class="postfix"><%= postfix %></small><% end %>
|
6
4
|
|
7
5
|
<% Houston.project_header_commands.each do |command| %>
|
8
|
-
<% next if without.include?(command.slug.to_s) %>
|
9
6
|
<% next unless command.permitted?(current_ability, project) %>
|
10
7
|
<%= render partial: command.partial, locals: { project: project } %>
|
11
8
|
<% end %>
|
12
|
-
<%= render partial: "projects/keyboard_shortcuts"
|
13
|
-
</h1>
|
9
|
+
<%= render partial: "projects/keyboard_shortcuts" %>
|
14
10
|
<% end %>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<td class="table-margin"></td>
|
15
15
|
<th class="project-title sort-desc">Title</th>
|
16
16
|
<th class="project-team">Team</th>
|
17
|
-
<% Houston.
|
17
|
+
<% Houston.view["projects"].columns.each do |column| %>
|
18
18
|
<% next unless column.permitted?(current_ability) %>
|
19
19
|
<th><%= column.name %></th>
|
20
20
|
<% end %>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<td class="project-title">
|
32
32
|
<% if project.color %>
|
33
|
-
<b class="bubble <%= project.color %>" rel="tooltip" title="<%= project.color.titleize %>" data-tooltip-placement="right"></b>
|
33
|
+
<b class="bubble <%= project.color %>" rel="tooltip" title="<%= project.color.name.titleize %>" data-tooltip-placement="right"></b>
|
34
34
|
<% else %>
|
35
35
|
<b class="bubble"></b>
|
36
36
|
<% end %>
|
@@ -41,9 +41,9 @@
|
|
41
41
|
<%= project.team && project.team.name %>
|
42
42
|
</td>
|
43
43
|
|
44
|
-
<% Houston.
|
44
|
+
<% Houston.view["projects"].columns.each do |column| %>
|
45
45
|
<% next unless column.permitted?(current_ability) %>
|
46
|
-
<td><%= column.render(project) %></td>
|
46
|
+
<td><%= column.render(self, project) %></td>
|
47
47
|
<% end %>
|
48
48
|
|
49
49
|
<td class="project-features">
|
@@ -11,18 +11,7 @@
|
|
11
11
|
|
12
12
|
<div class="control-group">
|
13
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>
|
14
|
+
<div id="team_roles" class="controls changes-nested-editor nested editor"></div>
|
26
15
|
</div>
|
27
16
|
|
28
17
|
<div class="form-actions">
|
@@ -39,11 +28,12 @@
|
|
39
28
|
<% content_for :javascripts do %>
|
40
29
|
<script type="text/javascript">
|
41
30
|
$(function() {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
31
|
+
new Houston.TeamRolesView({
|
32
|
+
el: $('#team_roles')[0],
|
33
|
+
roles: <%=raw Houston.config.roles.to_json %>,
|
34
|
+
users: <%=raw User.unretired.pluck("CONCAT(first_name, ' ', last_name)", :id).map { |name, id| { name: name, id: id } }.to_json %>,
|
35
|
+
values: <%=raw @team.roles.map { |role| { id: role.id, userId: role.user_id, roles: role.roles } }.to_json %>
|
36
|
+
}).render();
|
47
37
|
|
48
38
|
<% if @team.persisted? && can?(:destroy, @team) %>
|
49
39
|
$('#delete_team_button').click(function(e) {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<% team.projects.each do |project| %>
|
39
39
|
<li class="team-project">
|
40
40
|
<% if project.color %>
|
41
|
-
<b class="bubble <%= project.color %>" rel="tooltip" title="<%= project.color.titleize %>" data-tooltip-placement="right"></b>
|
41
|
+
<b class="bubble <%= project.color %>" rel="tooltip" title="<%= project.color.name.titleize %>" data-tooltip-placement="right"></b>
|
42
42
|
<% else %>
|
43
43
|
<b class="bubble"></b>
|
44
44
|
<% end %>
|
@@ -46,44 +46,7 @@
|
|
46
46
|
<% end %>
|
47
47
|
|
48
48
|
|
49
|
-
|
50
|
-
<%= f.fields_for :props do |f| %>
|
51
|
-
<% Houston.user_options.each do |form| %>
|
52
|
-
<hr />
|
53
|
-
|
54
|
-
<div class="control-group">
|
55
|
-
<label class="control-label"><%= form.name %></label>
|
56
|
-
<div class="controls">
|
57
|
-
<%= form.render(self, f) %>
|
58
|
-
</div>
|
59
|
-
</div>
|
60
|
-
<% end %>
|
61
|
-
<% end %>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<% if @user.credentials.any? %>
|
66
|
-
<hr />
|
67
|
-
|
68
|
-
<div class="control-group">
|
69
|
-
<label class="control-label">Credentials</label>
|
70
|
-
<div class="controls">
|
71
|
-
|
72
|
-
<p>Houston has remembered your credentials for:</p>
|
73
|
-
|
74
|
-
<ul class="user-credentials">
|
75
|
-
<% @user.credentials.each do |credentials| %>
|
76
|
-
<%= content_tag :li, id: "user_credentials_#{credentials.id}" do %>
|
77
|
-
<span class="user-credentials-service"><%= credentials.service %></span>
|
78
|
-
<span class="user-credentials-delete">
|
79
|
-
<a class="btn btn-mini btn-danger delete-user-credentials" href="/credentials/<%= credentials.id %>" data-method="delete" data-confirm="Should Houston forget your credentials for <%= credentials.service %>?">Delete</a>
|
80
|
-
</span>
|
81
|
-
<% end %>
|
82
|
-
<% end %>
|
83
|
-
</ul>
|
84
|
-
</div>
|
85
|
-
</div>
|
86
|
-
<% end %>
|
49
|
+
<%= render_props_fields(f, "edit_user") %>
|
87
50
|
|
88
51
|
|
89
52
|
<% if @user.new_record? %>
|
data/config/application.rb
CHANGED
@@ -12,13 +12,11 @@ require "cancan"
|
|
12
12
|
require "concurrent"
|
13
13
|
require "devise"
|
14
14
|
require "devise_invitable"
|
15
|
-
require "devise_ldap_authenticatable"
|
16
15
|
require "faraday"
|
17
16
|
require "faraday-http-cache"
|
18
17
|
require "faraday-raise-errors"
|
19
18
|
require "gemoji"
|
20
19
|
require "handlebars_assets"
|
21
|
-
require "nested_editor_for"
|
22
20
|
require "neat-rails"
|
23
21
|
require "nokogiri"
|
24
22
|
require "oauth2"
|
@@ -27,9 +25,8 @@ require "openxml/xlsx"
|
|
27
25
|
require "premailer"
|
28
26
|
require "progressbar"
|
29
27
|
require "rack/utf8_sanitizer"
|
30
|
-
require "
|
31
|
-
require "
|
32
|
-
require "vestal_versions"
|
28
|
+
require "kramdown"
|
29
|
+
require "slackdown"
|
33
30
|
|
34
31
|
# Require the gems listed in Gemfile, including any gems
|
35
32
|
# you've limited to :test, :development, or :production.
|
@@ -50,6 +47,12 @@ module Houston
|
|
50
47
|
Houston.config.host
|
51
48
|
end
|
52
49
|
|
50
|
+
def self.root_url
|
51
|
+
protocol = "http"
|
52
|
+
protocol = "https" if Houston.config.use_ssl?
|
53
|
+
"#{protocol}://#{host}"
|
54
|
+
end
|
55
|
+
|
53
56
|
class Application < Rails::Application
|
54
57
|
# This Rails application gets initialized different ways: many times it is
|
55
58
|
# intialized from within a Houston instance project. This line ensures that
|
@@ -257,20 +257,6 @@ Devise.setup do |config|
|
|
257
257
|
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
258
258
|
# end
|
259
259
|
|
260
|
-
# ==> LDAP Configuration
|
261
|
-
if Houston.config.authentication_strategy == :ldap
|
262
|
-
config.ldap_logger = true
|
263
|
-
config.ldap_create_user = true
|
264
|
-
config.ldap_update_password = false
|
265
|
-
config.ldap_configuration = Houston.config.authentication_strategy_configuration.stringify_keys
|
266
|
-
config.ldap_check_group_membership = false
|
267
|
-
# config.ldap_check_attributes = false
|
268
|
-
config.ldap_use_admin_to_bind = false
|
269
|
-
config.ldap_ad_group_check = false
|
270
|
-
config.ldap_auth_username_builder = Houston.config.authentication_strategy_configuration[:username_builder]
|
271
|
-
end
|
272
|
-
|
273
|
-
|
274
260
|
# ==> Mountable engine configurations
|
275
261
|
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
276
262
|
# is mountable, there are some extra configurations to be taken into account.
|