Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fb5cdda
[Feature] Update for reviews (#2)
aaxelb Aug 14, 2017
c237ed7
[Feature] Include reviewable when creating review logs (#3)
aaxelb Aug 18, 2017
429ce0e
Add dateLastTransitioned to preprint model (#5)
aaxelb Aug 25, 2017
55e69ab
[Fix] Only fetch the logged in user once
chrisseto Sep 6, 2017
d433892
Allow reviews settings to be nullable
chrisseto Sep 7, 2017
0cc20ec
Fix infinite authentication
chrisseto Sep 7, 2017
b844a34
Add support for using query parameters in findRecord
chrisseto Sep 11, 2017
a7f14a0
[Fix] Use `getRecords()` instead of `.record` (#8)
laurenbarker Sep 11, 2017
607311e
Tweaks and updates for reviews
chrisseto Sep 12, 2017
e416b28
Fix typo
chrisseto Sep 12, 2017
9cc89c5
[Feature][MOD-73] Rename log to action (minimal branch) (#2)
aaxelb Sep 14, 2017
838ad02
[MOD-72][Feature] Add "My Reviews" for users with view_submissions pe…
chrisseto Sep 12, 2017
024aa2b
Add actions property to user model
aaxelb Sep 15, 2017
e032fa4
Add `user` property to current-user instead
aaxelb Sep 18, 2017
6ad3b89
Add DOI alias properties to preprint model
aaxelb Sep 19, 2017
25e5913
Fix permissions check in navbar (#6)
laurenbarker Sep 25, 2017
c660ea5
Only serialize actually dirty relationships
aaxelb Sep 27, 2017
447e5e4
Wait for currentUser.user to resolve (#8)
laurenbarker Oct 2, 2017
81a9ffa
[Feature][MOD-111] Add preprint" button direct to the current provide…
sheriefvt Oct 5, 2017
f1ebddf
Use forked/fixed ember-data-has-many-query
aaxelb Oct 5, 2017
15ebd80
[Improvement] Upgrade deps and clean up code
chrisseto Sep 5, 2017
56680df
Wait for currentUser.user to resolve (#9)
laurenbarker Oct 2, 2017
5eccd08
Update ember-data-has-many-query dependency
aaxelb Oct 5, 2017
6a1a03a
Merge branch 'feature/reviews-minimal' into feature/reviews
aaxelb Oct 5, 2017
6f49fc9
Revert to non-forked ember-data-has-many-query
aaxelb Oct 6, 2017
7fc25bd
Merge branch 'feature/reviews-minimal' into feature/reviews
aaxelb Oct 6, 2017
4964ade
Merge branch 'develop' into feature/reviews-minimal
aaxelb Oct 12, 2017
0d64fad
Merge branch 'feature/reviews-minimal' into feature/reviews
aaxelb Oct 12, 2017
671c2b9
Merge branch 'develop' into feature/reviews-minimal
aaxelb Oct 17, 2017
e7e565b
Update CHANGELOG
aaxelb Oct 17, 2017
21d464a
Merge branch 'feature/reviews-minimal' into feature/reviews
aaxelb Oct 17, 2017
204c1ac
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Nov 28, 2017
78e32c4
Update index.js
sheriefvt Nov 28, 2017
1068a8a
update ember-cli-build.js
sheriefvt Nov 28, 2017
a32dbde
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Nov 30, 2017
299a494
Update dependencies
sheriefvt Dec 8, 2017
bfa2220
Update ember-cli-build
sheriefvt Dec 8, 2017
72c9d25
update searchable count
sheriefvt Dec 8, 2017
6c1fed9
Add preprint-word util
sheriefvt Dec 8, 2017
702b928
Update tests / settings
sheriefvt Dec 8, 2017
ed439da
Refactor file-manager tests
sheriefvt Dec 8, 2017
f38159b
update wording
sheriefvt Dec 8, 2017
8a1606c
* Update changelog
sheriefvt Dec 12, 2017
e924ac9
Update preprint-word util
sheriefvt Dec 13, 2017
df6eef2
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Jan 9, 2018
b029ec7
Update translations
sheriefvt Jan 19, 2018
115d651
Replace preprint word util with service
sheriefvt Jan 19, 2018
36db7d6
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Jan 23, 2018
9ca5648
fix failing tests
sheriefvt Jan 23, 2018
f3d9428
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Jan 23, 2018
d251d6e
Reverse changes not related to this PR
sheriefvt Jan 29, 2018
076e586
update code changes
sheriefvt Jan 30, 2018
34b95d6
Add test for waterbutler request
sheriefvt Jan 31, 2018
1ed5072
remove jshintrc
sheriefvt Jan 31, 2018
864f091
Merge branch 'develop' of https://github.com/CenterForOpenScience/emb…
sheriefvt Jan 31, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- file-browser-item now supports icons for different file extensions
- dropzone-widget now has custom dropzone class that extends dropzone functionality to conditionally disallow folders and multiple files from being dropped
- 'Search' button in navbar to link to search page
- Moved ember-metrics and ember-toastr to dependencies
- Upgraded ember-toastr to 1.7.0
- Consolidate logic for serializing dirty relationships into `osf-serializer`
- Override `relationshipTypes` in a serializer to include `fieldName: 'apiType'` pairs of all relationships which may be included when saving updates
- Moved ember-metrics and ember-toastr to dependencies
- Upgraded ember-toastr to 1.7.0

### Removed
- toastr from bower dependencies
Expand Down
16 changes: 0 additions & 16 deletions addon/components/file-widget/style.css

This file was deleted.

17 changes: 17 additions & 0 deletions addon/components/file-widget/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.eosf-file-widget-box {
border: 2px solid dark-grey;
border-radius: 5px;
background-color: #EEE;
padding: 20px;

.dropzone-box {
margin: 5px;
}

.login-button, .select-project-button {
width: 100%;
height: 150px;
margin: 5px;
text-align: center;
}
}
54 changes: 31 additions & 23 deletions addon/components/new-navbar-auth-dropdown/template.hbs
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
{{# if session.isAuthenticated }}
{{! TODO: Replace display name functionality if possible- for now truncate via CSS at end of label }}
<a class="btn-link" data-toggle="dropdown" role="button" aria-expanded="false" aria-label={{t 'eosf.authDropdown.toggleAuthDropdown'}} onclick={{action closeOtherNavigation}}>
<span class="osf-gravatar">
<img src="{{gravatarUrl}}" alt="User gravatar">
</span> {{get-display-name user.fullName}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu auth-dropdown" role="menu">
{{#if headline}}
<li style="margin-left:10%;">{{headline}}</li>
{{/if}}
<li>
<a href="{{serviceLinks.profile}}" onclick={{action 'click' 'link' 'Navbar - MyProfile'}}><i class="fa fa-user fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.myProfile'}}</a>
</li>
<li>
<a href="{{serviceLinks.osfSupport}}" onclick={{action 'click' 'link' 'Navbar - Support'}}><i class="fa fa-life-ring fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.osfSupport'}}</a>
</li>
{{#bs-dropdown as |dd|}}
{{#dd.toggle tagName="button" classNames="nav-user-dropdown btn-link"}}
<span class="osf-gravatar">
<img src="{{gravatarUrl}}" alt="User gravatar">
</span> {{get-display-name user.fullName}}
<span class="caret"></span>
{{/dd.toggle}}

<li>
<a href="{{serviceLinks.settings}}" onclick={{action 'click' 'link' 'Navbar - Settings'}}><i class="fa fa-cog fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.settings'}}</a>
</li>
<li>
<a class="logoutLink" {{action 'logout'}} onclick={{action 'click' 'link' 'Navbar - Logout'}} role="button"><i class="fa fa-sign-out fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.logOut'}}</a>
</li>
</ul>
{{#dd.menu align="right" as |menu|}}
{{#if headline}}
{{#menu.item style="margin-left:10%;"}}
{{headline}}
{{/menu.item}}
{{/if}}

{{#menu.item}}
<a href="{{serviceLinks.profile}}" onclick={{action 'click' 'link' 'Navbar - MyProfile'}}><i class="fa fa-user fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.myProfile'}}</a>
{{/menu.item}}

{{#menu.item}}
<a href="{{serviceLinks.osfSupport}}" onclick={{action 'click' 'link' 'Navbar - Support'}}><i class="fa fa-life-ring fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.osfSupport'}}</a>
{{/menu.item}}

{{#menu.item}}
<a href="{{serviceLinks.settings}}" onclick={{action 'click' 'link' 'Navbar - Settings'}}><i class="fa fa-cog fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.settings'}}</a>
{{/menu.item}}

{{#menu.item}}
<a class="logoutLink" {{action 'logout'}} onclick={{action 'click' 'link' 'Navbar - Logout'}} role="button"><i class="fa fa-sign-out fa-lg p-r-xs"></i> {{t 'eosf.authDropdown.logOut'}}</a>
{{/menu.item}}
{{/dd.menu}}
{{/bs-dropdown}}
{{else if allowLogin}}
{{#if institution}}
{{! TODO: How does the page know whether this is an institution view? Implement in the future }}
Expand Down
8 changes: 8 additions & 0 deletions addon/components/new-osf-navbar/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import 'bootstrap/variables';


@media (min-width: $screen-md-min) {
.navbar-right-md {
float: right;
}
}
22 changes: 9 additions & 13 deletions addon/components/search-dropdown/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

{{!Search help modal - appears after clicking question mark on green search dropdown}}
<div id="ember-bootstrap-modal-container">
{{#bs-modal open=isOpen body=false header=false footer=false}}
{{#bs-modal-header}}
{{#bs-modal open=isOpen as |modal|}}
{{#modal.header}}
<h3 class="modal-title">{{t 'eosf.searchHelpModal.searchHelp'}}</h3>
{{/bs-modal-header}}
{{#bs-modal-body}}
{{/modal.header}}
{{#modal.body}}
<h4> {{t 'eosf.searchHelpModal.queries'}} </h4>
<p>
{{t 'eosf.searchHelpModal.searchUsesThe'}} <a href="http://extensions.xwiki.org/xwiki/bin/view/Extension/Search+Application+Query+Syntax">Lucene {{t 'eosf.searchHelpModal.searchSyntax'}}</a>.
Expand All @@ -36,13 +36,9 @@
<li><a href="{{host}}search/?q=brian+AND+title%3Amany">brian AND title:many</a></li>
<li><a href="{{host}}search/?q=tags%3A%28psychology%29">tags:(psychology)</a></li>
</ul>
{{/bs-modal-body}}

{{#bs-modal-footer}}
<div align="right">
<button {{action 'close'}} class="btn btn-default"> {{t 'eosf.searchHelpModal.close'}} </button>
</div>
{{/bs-modal-footer}}
{{/modal.body}}
{{#modal.footer}}
{{#bs-button onClick=(action modal.close)}}{{t 'eosf.searchHelpModal.close'}}{{/bs-button}}
{{/modal.footer}}
{{/bs-modal}}

</div>
</div>
3 changes: 0 additions & 3 deletions addon/components/search-help-modal/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ export default Ember.Component.extend({
this.set('currentPath', `${window.location.origin}${window.location.pathname}`);
},
actions: {
close() {
this.set('isOpen', false);
},
toggleHelpModal() {
this.toggleProperty('isOpen');
},
Expand Down
22 changes: 10 additions & 12 deletions addon/components/search-help-modal/template.hbs
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{{!Lucene search help modal}}
<div id="ember-bootstrap-modal-container">
{{#bs-modal open=isOpen body=false header=false footer=false}}
{{#bs-modal-header}}
{{#bs-modal open=isOpen as |modal|}}
{{#modal.header}}
<h3 class="modal-title">{{t 'eosf.components.searchHelpModal.searchHelp'}}</h3>
{{/bs-modal-header}}
{{#bs-modal-body}}
{{/modal.header}}
{{#modal.body}}
<h4> {{t 'eosf.components.searchHelpModal.queries'}} </h4>
<p>
{{t 'eosf.components.searchHelpModal.searchUsesThe'}} <a href="http://extensions.xwiki.org/xwiki/bin/view/Extension/Search+Application+Query+Syntax">Lucene {{t 'eosf.components.searchHelpModal.searchSyntax'}}</a>.
{{t 'eosf.components.searchHelpModal.helpDescription'}}
</p>
<ul>
<ul class="ex-list">
<li><a href={{concat currentPath '?q=repro*'}}>repro*</a></li>
<li><a href={{concat currentPath '?q=brian+AND+title%3Amany'}}>brian AND title:many</a></li>
<li><a href={{concat currentPath '?q=tags%3A%28psychology%29'}}>tags:(psychology)</a></li>
</ul>
{{/bs-modal-body}}
{{#bs-modal-footer}}
<div align="right">
<button {{action 'close'}} class="btn btn-default"> {{t 'eosf.components.searchHelpModal.close'}} </button>
</div>
{{/bs-modal-footer}}
{{/modal.body}}
{{#modal.footer}}
{{#bs-button onClick=(action modal.close)}}{{t 'eosf.components.searchHelpModal.close'}}{{/bs-button}}
{{/modal.footer}}
{{/bs-modal}}
</div>
</div>
File renamed without changes.
1 change: 1 addition & 0 deletions addon/helpers/build-secondary-nav-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default Ember.Helper.extend({ // Helper defined using a class, so can in
href: 'https://cos.io/donate',
type: 'donateToCOS'
},

],
PREPRINTS: [
{
Expand Down
51 changes: 0 additions & 51 deletions addon/instance-initializers/ember-osf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,10 @@
Automatically expose translations for addon in a way that can be merged in with app
https://github.com/jamesarosen/ember-i18n/issues/255
*/
import Ember from 'ember';
import en from 'ember-osf/locales/en/translations';
import tHelper from 'ember-i18n/helper';

export function initialize(appInstance) {
tHelper.reopen({
theme: Ember.inject.service(),
compute(_, data) {
// If data is defined, clone it because it is not extensible.
data = data ? Object.assign({}, data) : {};
let translations = this.get('i18n._locale.translations');
let preprintWord = this.get('theme.provider.preprintWord');
let getTerms = () => ({
preprint: translations[`preprintWords.${preprintWord || 'preprint'}.preprint`],
preprints: translations[`preprintWords.${preprintWord || 'preprint'}.preprints`],
Preprint: translations[`preprintWords.${preprintWord || 'preprint'}.Preprint`],
Preprints: translations[`preprintWords.${preprintWord || 'preprint'}.Preprints`]
});
if (!preprintWord && this.get('theme.provider')) {
this.get('theme.provider').then(provider => {
preprintWord = provider.get('preprintWord') || 'preprint';
data.preprintWords = getTerms();
this.recompute();
});
return null;
}
data.preprintWords = getTerms();
return this._super(_, data, true);
}
});
const i18n = appInstance.lookup('service:i18n');
i18n.reopen({
theme: Ember.inject.service(),
store: Ember.inject.service(),
t(_, data, skip) {
data = data || {};
if (typeof data.preprintWords !== 'undefined' || skip) {
return this._super(_, data);
}
let translations = this.get('_locale.translations');
let providerId = this.get('theme.id');
let provider = this.get('store').peekRecord('preprint-provider', providerId);
let preprintWord = 'default';
if (provider) {
preprintWord = provider.get('preprintWord');
}
data.preprintWords = {
preprint: translations[`preprintWords.${preprintWord}.preprint`],
preprints: translations[`preprintWords.${preprintWord}.preprints`],
Preprint: translations[`preprintWords.${preprintWord}.Preprint`],
Preprints: translations[`preprintWords.${preprintWord}.Preprints`]
};
return this._super(_, data);
}
});
i18n.addTranslations('en', en);
}

Expand Down
46 changes: 20 additions & 26 deletions addon/locales/en/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,31 @@ export default {
// },
//
// "key.with.interpolation": "Text with {{anInterpolation}}"
preprintWords: {
preprint: {
preprint: 'preprint',
preprints: 'preprints',
Preprint: 'Preprint',
Preprints: 'Preprints'
documentType: {
default: {
plural: 'documents',
pluralCapitalized: 'Documents',
singular: 'document',
singularCapitalized: 'Document',
},
paper: {
preprint: 'paper',
preprints: 'papers',
Preprint: 'Paper',
Preprints: 'Papers'
plural: 'papers',
pluralCapitalized: 'Papers',
singular: 'paper',
singularCapitalized: 'Paper',
},
thesis: {
preprint: 'thesis',
preprints: 'theses',
Preprint: 'Thesis',
Preprints: 'Theses'
preprint: {
plural: 'preprints',
pluralCapitalized: 'Preprints',
singular: 'preprint',
singularCapitalized: 'Preprint',
},
none: {
preprint: '',
preprints: '',
Preprint: '',
Preprints: ''
thesis: {
plural: 'theses',
pluralCapitalized: 'Theses',
singular: 'thesis',
singularCapitalized: 'Thesis',
},
default: {
preprint: 'document',
preprints: 'documents',
Preprint: 'Document',
Preprints: 'Documents'
}
},
eosf: {
signup: {
Expand Down
40 changes: 40 additions & 0 deletions addon/services/preprint-word.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import Ember from 'ember';

export default Ember.Service.extend({
i18n: Ember.inject.service(),
getPreprintWord() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This service doesn't do/provide anything that i18n doesn't already. What's the point of it?

const i18n = this.get('i18n');
return {
default: {
plural: i18n.t('documentType.default.plural'),
pluralCapitalized: i18n.t('documentType.default.pluralCapitalized'),
singular: i18n.t('documentType.default.singular'),
singularCapitalized: i18n.t('documentType.default.singularCapitalized'),
},
paper: {
plural: i18n.t('documentType.paper.plural'),
pluralCapitalized: i18n.t('documentType.paper.pluralCapitalized'),
singular: i18n.t('documentType.paper.singular'),
singularCapitalized: i18n.t('documentType.paper.singularCapitalized'),
},
preprint: {
plural: i18n.t('documentType.preprint.plural'),
pluralCapitalized: i18n.t('documentType.preprint.pluralCapitalized'),
singular: i18n.t('documentType.preprint.singular'),
singularCapitalized: i18n.t('documentType.preprint.singularCapitalized'),
},
none: {
plural: '',
pluralCapitalized: '',
singular: '',
singularCapitalized: '',
},
thesis: {
plural: i18n.t('documentType.thesis.plural'),
pluralCapitalized: i18n.t('documentType.thesis.pluralCapitalized'),
singular: i18n.t('documentType.thesis.singular'),
singularCapitalized: i18n.t('documentType.thesis.singularCapitalized'),
},
}
}
});
Loading