diff --git a/app/components/organization-settings-menu.js b/app/components/organization-settings-menu.js
deleted file mode 100644
index 15aff244c..000000000
--- a/app/components/organization-settings-menu.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import Ember from 'ember';
-
-const {
- Component,
- inject: { service }
-} = Ember;
-
-export default Component.extend({
- classNames: ['organization-settings-menu', 'settings-menu'],
-
- credentials: service(),
- session: service()
-});
diff --git a/app/components/project-settings-menu.js b/app/components/project-settings-menu.js
deleted file mode 100644
index 6e5e0ae8f..000000000
--- a/app/components/project-settings-menu.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import Ember from 'ember';
-
-const {
- Component,
- inject: { service }
-} = Ember;
-
-export default Component.extend({
- classNames: ['project-settings-menu', 'settings-menu'],
-
- credentials: service(),
- session: service()
-});
diff --git a/app/styles/_settings.scss b/app/styles/_settings.scss
index 8a8eb1e13..ad1072cc4 100644
--- a/app/styles/_settings.scss
+++ b/app/styles/_settings.scss
@@ -1,9 +1,5 @@
-.settings-menu {
- @include span-columns(2.5);
-}
-
.settings {
- @include span-columns(9.5);
+ @include span-columns(12);
}
.settings-main {
diff --git a/app/templates/components/organization-settings-menu.hbs b/app/templates/components/organization-settings-menu.hbs
deleted file mode 100644
index a8d0241c9..000000000
--- a/app/templates/components/organization-settings-menu.hbs
+++ /dev/null
@@ -1,11 +0,0 @@
-
- {{#if session.isAuthenticated}}
- {{#if (can 'manage organization' organization)}}
- -
- {{#link-to 'organizations.slugged-route.settings.profile' organization.slug}}
- Organization Profile
- {{/link-to}}
-
- {{/if}}
- {{/if}}
-
diff --git a/app/templates/components/organization-settings.hbs b/app/templates/components/organization-settings.hbs
index bd0bbba3c..b1463f986 100644
--- a/app/templates/components/organization-settings.hbs
+++ b/app/templates/components/organization-settings.hbs
@@ -1,3 +1,2 @@
{{organization-header organization=organization}}
{{organization-menu organization=organization membership=membership}}
-{{organization-settings-menu organization=organization}}
diff --git a/app/templates/components/project-menu.hbs b/app/templates/components/project-menu.hbs
index a6b14c80e..0411eac5d 100644
--- a/app/templates/components/project-menu.hbs
+++ b/app/templates/components/project-menu.hbs
@@ -6,7 +6,10 @@
{{#link-to 'project.settings.contributors' project}}Contributors {{#if project.hasPendingMembers}}{{project.pendingMembersCount}} pending{{/if}}{{/link-to}}
- {{link-to 'Donations' 'project.settings.donations' project}}
+ {{link-to 'Donations' 'project.settings.donations.goals' project}}
+
+
+ {{link-to 'Payments' 'project.settings.donations.payments' project}}
{{link-to 'Settings' 'project.settings.profile' project}}
diff --git a/app/templates/components/project-settings-menu.hbs b/app/templates/components/project-settings-menu.hbs
deleted file mode 100644
index d7e2ec01d..000000000
--- a/app/templates/components/project-settings-menu.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-
- {{#if session.isAuthenticated}}
- {{#if (can "manage organization" project.organization) }}
- -
- {{link-to "Contributors" "project.settings.contributors" project.slug}}
-
- -
- {{link-to "Donation goals" "project.settings.donations.goals" project.slug}}
-
- -
- {{link-to "Payment settings" "project.settings.donations.payments" project.slug}}
-
- -
- {{link-to "Basic settings" "project.settings.profile" project.slug}}
-
- {{/if}}
- {{/if}}
-
diff --git a/app/templates/organizations/slugged-route/settings.hbs b/app/templates/organizations/slugged-route/settings.hbs
index 1c55292df..c24cd6895 100644
--- a/app/templates/organizations/slugged-route/settings.hbs
+++ b/app/templates/organizations/slugged-route/settings.hbs
@@ -1,2 +1 @@
-{{organization-settings-menu organization=model}}
-{{outlet}}
\ No newline at end of file
+{{outlet}}
diff --git a/app/templates/project/settings.hbs b/app/templates/project/settings.hbs
index a4b40ce3e..62a1d2e42 100644
--- a/app/templates/project/settings.hbs
+++ b/app/templates/project/settings.hbs
@@ -2,7 +2,6 @@
{{project-details project=model}}
{{project-menu project=model}}
-{{project-settings-menu project=model}}
{{outlet}}
diff --git a/tests/integration/components/organization-settings-menu-test.js b/tests/integration/components/organization-settings-menu-test.js
deleted file mode 100644
index 393609dce..000000000
--- a/tests/integration/components/organization-settings-menu-test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-import Ember from 'ember';
-import stubService from 'code-corps-ember/tests/helpers/stub-service';
-
-const { Object } = Ember;
-
-moduleForComponent('organization-settings-menu', 'Integration | Component | organization settings menu', {
- integration: true
-});
-
-test('when authenticated and can manage organization, it renders properly', function(assert) {
- assert.expect(2);
-
- let organization = Object.create({ id: 1 });
- let membership = Object.create({
- isAdmin: true,
- organization
- });
-
- stubService(this, 'session', { isAuthenticated: true });
- stubService(this, 'credentials', { membership });
-
- this.set('organization', organization);
-
- this.render(hbs`{{organization-settings-menu organization=organization}}`);
-
- assert.equal(this.$('.organization-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('li a:contains("Organization Profile")').length, 1, 'The organization profile link renders');
-});
-
-test('when authenticated and cannot manage organization, it renders properly', function(assert) {
- assert.expect(2);
-
- let organization = Object.create({ id: 1 });
- let membership = Object.create({ isAdmin: false, organization });
-
- stubService(this, 'session', { isAuthenticated: true });
- stubService(this, 'credentials', { membership });
-
- this.set('organization', organization);
-
- this.render(hbs`{{organization-settings-menu organization=organization}}`);
-
- assert.equal(this.$('.organization-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('li a:contains("Organization Profile")').length, 0, 'The organization profile link does not render');
-});
-
-test('when not authenticated, it renders properly', function(assert) {
- assert.expect(2);
-
- let organization = Object.create({ id: 1 });
-
- stubService(this, 'session', { isAuthenticated: false });
-
- this.set('organization', organization);
-
- this.render(hbs`{{organization-settings-menu organization=organization}}`);
-
- assert.equal(this.$('.organization-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('li a:contains("Organization Profile")').length, 0, 'The organization profile link does not render');
-});
diff --git a/tests/integration/components/organization-settings-test.js b/tests/integration/components/organization-settings-test.js
index 8bb067b1d..f183237d9 100644
--- a/tests/integration/components/organization-settings-test.js
+++ b/tests/integration/components/organization-settings-test.js
@@ -7,7 +7,7 @@ moduleForComponent('organization-settings', 'Integration | Component | organizat
});
test('it renders properly', function(assert) {
- assert.expect(3);
+ assert.expect(2);
stubService(this, 'store');
stubService(this, 'session');
@@ -17,5 +17,4 @@ test('it renders properly', function(assert) {
assert.equal(this.$('.organization-header').length, 1, 'The header renders');
assert.equal(this.$('.organization-menu').length, 1, 'The menu renders');
- assert.equal(this.$('.organization-settings-menu').length, 1, 'The settings menu renders');
});
diff --git a/tests/integration/components/project-menu-test.js b/tests/integration/components/project-menu-test.js
index 3738209c4..a0e24a1a1 100644
--- a/tests/integration/components/project-menu-test.js
+++ b/tests/integration/components/project-menu-test.js
@@ -69,19 +69,20 @@ test('when authenticated, and user cannot manage organization, it renders proper
});
test('when authenticated, and user can manage organization, it renders properly', function(assert) {
- assert.expect(6);
+ assert.expect(7);
stubService(this, 'session', { isAuthenticated: true });
this.register('ability:organization', Ability.extend({ canManage: true }));
this.render(hbs`{{project-menu}}`);
- assert.equal(this.$('.project-menu li a').length, 5, 'The correct number of links render');
+ assert.equal(this.$('.project-menu li a').length, 6, 'The correct number of links render');
assert.equal(this.$('.project-menu li a:contains("About")').length, 1, 'The about link is rendered');
assert.equal(this.$('.project-menu li a:contains("Tasks")').length, 1, 'The tasks link is rendered');
assert.equal(this.$('.project-menu li a:contains("Contributors")').length, 1, 'The contributors link is rendered');
assert.equal(this.$('.project-menu li a:contains("Settings")').length, 1, 'The settings link is rendered');
assert.equal(this.$('.project-menu li a:contains("Donations")').length, 1, 'The donations link is rendered');
+ assert.equal(this.$('.project-menu li a:contains("Payments")').length, 1, 'The payments link is rendered');
});
test('when authenticated, and user can manage organization, and project has pending members', function(assert) {
diff --git a/tests/integration/components/project-settings-menu-test.js b/tests/integration/components/project-settings-menu-test.js
deleted file mode 100644
index eae38bb9f..000000000
--- a/tests/integration/components/project-settings-menu-test.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { moduleForComponent, test } from 'ember-qunit';
-import hbs from 'htmlbars-inline-precompile';
-import Ember from 'ember';
-import stubService from 'code-corps-ember/tests/helpers/stub-service';
-
-const { Object } = Ember;
-
-moduleForComponent('project-settings-menu', 'Integration | Component | project settings menu', {
- integration: true
-});
-
-let organization = Object.create({ id: 1 });
-let project = Object.create({ organization });
-
-test('when authenticated and can manage organization, it renders properly', function(assert) {
- assert.expect(6);
-
- let membership = Object.create({ isAdmin: true, organization });
- stubService(this, 'session', { isAuthenticated: true });
- stubService(this, 'credentials', { membership });
-
- this.set('project', project);
-
- this.render(hbs`{{project-settings-menu project=project}}`);
-
- assert.equal(this.$('.project-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('.project-settings-menu li').length, 4, 'The list items render');
- assert.equal(this.$('li a:contains("Contributors")').length, 1, 'The contributors link renders');
- assert.equal(this.$('li a:contains("Donation goals")').length, 1, 'The donation goals link renders');
- assert.equal(this.$('li a:contains("Payment settings")').length, 1, 'The payment settings link renders');
- assert.equal(this.$('li a:contains("Basic settings")').length, 1, 'The basic settings link renders');
-});
-
-test('when authenticated and cannot manage organization, it renders properly', function(assert) {
- assert.expect(2);
-
- let membership = Object.create({ isAdmin: false, organization });
- stubService(this, 'session', { isAuthenticated: true });
- stubService(this, 'credentials', { membership });
-
- this.set('project', project);
-
- this.render(hbs`{{project-settings-menu project=project}}`);
-
- assert.equal(this.$('.project-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('.project-settings-menu li').length, 0, 'The list items do not render');
-});
-
-test('when not authenticated, it renders properly', function(assert) {
- assert.expect(2);
-
- stubService(this, 'session', { isAuthenticated: false });
-
- this.set('project', project);
-
- this.render(hbs`{{project-settings-menu project=project}}`);
-
- assert.equal(this.$('.project-settings-menu').length, 1, 'The component itself renders');
- assert.equal(this.$('.project-settings-menu li').length, 0, 'The list items do not render');
-});