-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
608 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
lib/collections/addon/components/collection-search-result/node/template.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
.sortByOptionList { | ||
background-color: #efefef; | ||
left: auto; | ||
|
||
li:hover { | ||
background-color: #d9d9d9; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
import { action } from '@ember/object'; | ||
import Route from '@ember/routing/route'; | ||
import { inject as service } from '@ember/service'; | ||
import DS from 'ember-data'; | ||
|
||
import Analytics from 'ember-osf-web/services/analytics'; | ||
|
||
export default class Discover extends Route { | ||
@service store!: DS.Store; | ||
@service analytics!: Analytics; | ||
|
||
queryParams = { | ||
queryString: { | ||
replace: true, | ||
}, | ||
}; | ||
|
||
/** | ||
* Stub | ||
*/ | ||
model() { | ||
return this.store.findAll('collection-provider', { reload: true }); | ||
} | ||
|
||
@action | ||
didTransition() { | ||
this.analytics.trackPage(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
lib/osf-components/addon/components/contributors/card/editable/component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { tagName } from '@ember-decorators/component'; | ||
import Component from '@ember/component'; | ||
|
||
import { layout } from 'ember-osf-web/decorators/component'; | ||
import { Permission } from 'ember-osf-web/models/osf-model'; | ||
import styles from './styles'; | ||
import template from './template'; | ||
|
||
@layout(template, styles) | ||
@tagName('') | ||
export default class ContributorsCardEditable extends Component { | ||
permissionOptions = [...Object.values(Permission)]; | ||
} |
15 changes: 15 additions & 0 deletions
15
lib/osf-components/addon/components/contributors/card/editable/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.CardContainer { | ||
composes: CardContainer from '../styles.scss'; | ||
} | ||
|
||
.MainSection { | ||
composes: MainSection from '../styles.scss'; | ||
} | ||
|
||
.CardSection { | ||
composes: CardSection from '../styles.scss'; | ||
|
||
:global(.ember-power-select-trigger) { | ||
max-width: 150px; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
lib/osf-components/addon/components/contributors/card/editable/template.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div data-test-contributor-card local-class='CardContainer'> | ||
<div data-test-contributor-card-main local-class='MainSection'> | ||
<span local-class='CardSection'> | ||
<img | ||
data-test-contributor-gravatar | ||
class='m-r-xs' | ||
src={{@contributor.users.links.profile_image}} | ||
alt={{@contributor.users.fullName}} | ||
height='30' | ||
width='30' | ||
> | ||
<OsfLink | ||
data-test-contributor-link={{@contributor.id}} | ||
data-analytics-name='View user' | ||
@route='guid-user' | ||
@models={{array @contributor.users.id}} | ||
> | ||
{{@contributor.users.fullName}} | ||
</OsfLink> | ||
</span> | ||
<span | ||
data-test-contributor-permission={{@contributor.id}} | ||
local-class='CardSection' | ||
> | ||
<PowerSelect | ||
@selected={{@contributor.permission}} | ||
@options={{this.permissionOptions}} | ||
@onchange={{fn @manager.updateContributorPermission @contributor}} | ||
as |option| | ||
> | ||
<span data-test-contributor-permission-choice={{option}}> | ||
{{t (concat 'osf-components.contributors.permissions.' option)}} | ||
</span> | ||
</PowerSelect> | ||
</span> | ||
<span data-test-contributor-citation={{@contributor.id}} local-class='CardSection'> | ||
<Input | ||
@type='checkbox' | ||
@checked={{readonly @contributor.bibliographic}} | ||
data-test-contributor-citation-checkbox | ||
data-analytics-name='Toogle isBibliographic' | ||
{{on 'click' (fn @manager.toggleContributorIsBibliographic @contributor)}} | ||
/> | ||
</span> | ||
</div> | ||
</div> |
25 changes: 3 additions & 22 deletions
25
lib/osf-components/addon/components/contributors/card/readonly/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,11 @@ | ||
.CardContainer { | ||
margin: 0; | ||
height: 60px; | ||
|
||
&:not(:first-of-type) { | ||
margin-top: 10px; | ||
} | ||
|
||
&:not(:last-of-type) { | ||
border-bottom: 1px solid $color-border-gray; | ||
margin-bottom: 10px; | ||
} | ||
composes: CardContainer from '../styles.scss'; | ||
} | ||
|
||
.MainSection { | ||
display: flex; | ||
height: inherit; | ||
align-items: center; | ||
padding-left: 20px; | ||
composes: MainSection from '../styles.scss'; | ||
} | ||
|
||
.CardSection { | ||
flex: 1 0 auto; | ||
max-width: 30%; | ||
|
||
&:first-of-type { | ||
flex: 2 0 auto; | ||
max-width: 40%; | ||
} | ||
composes: CardSection from '../styles.scss'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
lib/osf-components/addon/components/contributors/card/styles.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.CardContainer { | ||
margin: 0; | ||
height: 60px; | ||
border-bottom: 1px solid $color-border-gray; | ||
} | ||
|
||
.MainSection { | ||
display: flex; | ||
height: inherit; | ||
align-items: center; | ||
padding-left: 20px; | ||
} | ||
|
||
.CardSection { | ||
flex: 1 0 auto; | ||
max-width: 30%; | ||
|
||
&:first-of-type { | ||
flex: 2 0 auto; | ||
max-width: 40%; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
.InfinityLoader { | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.