Skip to content

Commit

Permalink
Merge pull request CenterForOpenScience#680 from jamescdavis/ENG-454_…
Browse files Browse the repository at this point in the history
…meetings_cleanup

[ENG-454] meetings cleanup
  • Loading branch information
jamescdavis authored Jun 3, 2019
2 parents 2e3910e + 0fdd393 commit 1f09583
Show file tree
Hide file tree
Showing 13 changed files with 261 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import I18N from 'ember-i18n/services/i18n';
import MeetingModel from 'ember-osf-web/models/meeting';

export default class MeetingDetailHeader extends Component {
@service i18n!: I18N;

// Required param
// Required parameters
meeting!: MeetingModel;
// Private property

// Private properties
@service i18n!: I18N;
isPanelOpen = false;

@computed('meeting.{fieldNames,isAcceptingTypeOne,isAcceptingTypeTwo}')
Expand Down
45 changes: 30 additions & 15 deletions app/meetings/detail/-components/meeting-detail-header/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{{#if this.meeting.logoUrl}}
<div>
<img
<img
data-test-meeting-logo
src={{this.meeting.logoUrl}}
alt={{t 'meetings.detail.meeting-detail-header.image_alt'}}
Expand All @@ -31,8 +31,8 @@

{{#if this.meeting.infoUrl}}
<OsfLink data-test-meeting-info-url @href={{this.meeting.infoUrl}}>
{{if this.meeting.fieldNames.homepage_link_text
this.meeting.fieldNames.homepage_link_text
{{if this.meeting.fieldNames.homepage_link_text
this.meeting.fieldNames.homepage_link_text
(t 'meetings.detail.meeting-detail-header.conference_homepage')
}}
</OsfLink>
Expand All @@ -48,31 +48,46 @@
</p>
<ul data-test-meeting-email-address-line>
{{#if this.meeting.isAcceptingTypeOne}}
<li>{{t 'meetings.detail.meeting-detail-header.email_text'
typeName=this.meeting.fieldNames.submission1_plural
<li>
{{t 'meetings.detail.meeting-detail-header.email_text'
typeName=this.meeting.fieldNames.submission1_plural
emailAddress=this.meeting.typeOneSubmissionEmail
}}
</li>
{{/if}}

{{#if this.meeting.isAcceptingTypeTwo}}
<li>
{{t 'meetings.detail.meeting-detail-header.email_text'
typeName=this.meeting.fieldNames.submission2_plural
{{t 'meetings.detail.meeting-detail-header.email_text'
typeName=this.meeting.fieldNames.submission2_plural
emailAddress=this.meeting.typeTwoSubmissionEmail
}}
</li>
{{/if}}
</ul>
<p data-test-meeting-format-header>{{t 'meetings.detail.meeting-detail-header.format_header'}}</p>
<p data-test-meeting-format-header>
{{t 'meetings.detail.meeting-detail-header.format_header'}}
</p>
<div data-test-meeting-format-body>
<dl local-class='meeting-format-body'>
<dt>{{t 'meetings.detail.meeting-detail-header.subject'}}</dt>
<dd>{{this.meeting.fieldNames.mail_subject}}</dd>
<dt>{{t 'meetings.detail.meeting-detail-header.message_body'}}</dt>
<dd>{{this.meeting.fieldNames.mail_message_body}}</dd>
<dt>{{t 'meetings.detail.meeting-detail-header.attachment'}}</dt>
<dd>{{this.meeting.fieldNames.mail_attachment}}</dd>
<dt>
{{t 'meetings.detail.meeting-detail-header.subject'}}
</dt>
<dd>
{{this.meeting.fieldNames.mail_subject}}
</dd>
<dt>
{{t 'meetings.detail.meeting-detail-header.message_body'}}
</dt>
<dd>
{{this.meeting.fieldNames.mail_message_body}}
</dd>
<dt>
{{t 'meetings.detail.meeting-detail-header.attachment'}}
</dt>
<dd>
{{this.meeting.fieldNames.mail_attachment}}
</dd>
</dl>
</div>
<p data-test-meeting-panel-footer-note>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,45 @@
<list.item local-class='item' as |submission|>
{{#if submission}}
<div data-test-submissions-list-item-title>
<a href={{submission.links.html}}>{{submission.title}}</a>
<OsfLink @href={{submission.links.html}}>
{{submission.title}}
</OsfLink>
</div>
<div data-test-submissions-list-item-author>
{{submission.authorName}}
</div>
<div data-test-submissions-list-item-category>
{{submission.category}}
</div>
<div data-test-submissions-list-item-author>{{submission.authorName}}</div>
<div data-test-submissions-list-item-category>{{submission.category}}</div>
<div data-test-submissions-list-item-date>
{{moment-format submission.created 'MMM DD, YYYY'}}
{{moment-format submission.created 'YYYY-MM-DD hh:mm A'}}
</div>
<div data-test-submissions-list-item-download>
<OsfButton @type='success' class='btn-xs' @onClick={{action this.downloadFile submission}}>
<OsfButton
@type='success'
class='btn-xs'
@onClick={{action this.downloadFile submission}}
>
<FaIcon @icon='download' class='fa-inverse' />
</OsfButton>
{{submission.downloadCount}}
</div>
{{else}}
<div data-test-submissions-list-placeholder-title>{{placeholder.text lines=1}}</div>
<div data-test-submissions-list-placeholder-author>{{placeholder.text lines=1}}</div>
<div data-test-submissions-list-placeholder-category>{{placeholder.text lines=1}}</div>
<div data-test-submissions-list-placeholder-date>{{placeholder.text lines=1}}</div>
<div data-test-submissions-list-placeholder-download>{{placeholder.text lines=1}}</div>
<div data-test-submissions-list-placeholder-title>
{{placeholder.text lines=1}}
</div>
<div data-test-submissions-list-placeholder-author>
{{placeholder.text lines=1}}
</div>
<div data-test-submissions-list-placeholder-category>
{{placeholder.text lines=1}}
</div>
<div data-test-submissions-list-placeholder-date>
{{placeholder.text lines=1}}
</div>
<div data-test-submissions-list-placeholder-download>
{{placeholder.text lines=1}}
</div>
{{/if}}
</list.item>
<list.empty data-test-submissions-list-empty local-class='empty'>
Expand Down
90 changes: 68 additions & 22 deletions app/meetings/index/-components/meetings-footer/template.hbs
Original file line number Diff line number Diff line change
@@ -1,55 +1,101 @@
<div class='row icon-bar m-v-lg'>
<div class='col-md-4 col-sm-4 text-center '>
<div class='p-v-md m-t-xl m-h-md'>
<FaIcon data-test-eye-icon @icon='eye' local-class='blue-icon icon-circle' />
<h3>{{t 'meetings.index.meetings-footer.discover'}}</h3>
<FaIcon
data-test-eye-icon
@icon='eye'
local-class='blue-icon icon-circle'
/>
<h3>
{{t 'meetings.index.meetings-footer.discover'}}
</h3>
<div class='p-h-lg'>
<p>{{t 'meetings.index.meetings-footer.discover_text'}}</p>
<p>
{{t 'meetings.index.meetings-footer.discover_text'}}
</p>
</div>
</div>
</div>
<div class='col-md-4 col-sm-4 text-center'>
<div class=' p-v-md m-t-xl m-h-md'>
<FaIcon data-test-share-alt-icon @icon='share-alt' local-class='blue-icon icon-circle' />
<h3>{{t 'meetings.index.meetings-footer.share'}}</h3>
<FaIcon
data-test-share-alt-icon
@icon='share-alt'
local-class='blue-icon icon-circle'
/>
<h3>
{{t 'meetings.index.meetings-footer.share'}}
</h3>
<div class='p-h-lg'>
<p>{{t 'meetings.index.meetings-footer.share_text'}}</p>
<p>
{{t 'meetings.index.meetings-footer.share_text'}}
</p>
</div>
</div>
</div>
<div class='col-md-4 col-sm-4 text-center'>
<div class='p-v-md m-t-xl m-h-md'>
<FaIcon data-test-magic-icon @icon='magic' local-class='blue-icon icon-circle' />
<h3>{{t 'meetings.index.meetings-footer.enhance'}}</h3>
<FaIcon
data-test-magic-icon
@icon='magic'
local-class='blue-icon icon-circle'
/>
<h3>
{{t 'meetings.index.meetings-footer.enhance'}}
</h3>
<div class='p-h-lg'>
<p>{{t 'meetings.index.meetings-footer.enhance_text'}}</p>
<p>
{{t 'meetings.index.meetings-footer.enhance_text'}}
</p>
</div>
</div>
</div>
</div>

<div class='row text-center m-b-md'>
<h2>{{t 'meetings.index.meetings-footer.who_use_text'}}</h2>
<h2>
{{t 'meetings.index.meetings-footer.who_use_text'}}
</h2>
</div>
<div class='row m-b-lg' local-class='org-logo'>
<div class='col-sm-3 col-xs-6 text-center'>
<a href='http://www.psychologicalscience.org/' target='_blank' rel='noopener'>
<img data-test-aps-img src='/assets/images/meetings/APS.jpg' alt={{t 'meetings.index.meetings-footer.aps_img_alt'}} class='img-responsive'>
</a>
<OsfLink @href='http://www.psychologicalscience.org/' @target='_blank'>
<img
data-test-aps-img
src='/assets/images/meetings/APS.jpg'
alt={{t 'meetings.index.meetings-footer.aps_img_alt'}}
class='img-responsive'
>
</OsfLink>
</div>
<div class='col-sm-3 col-xs-6 text-center'>
<a href='http://www.bitss.org/' target='_blank' rel='noopener'>
<img data-test-bitss-img src='/assets/images/meetings/BITSS.png'alt={{t 'meetings.index.meetings-footer.bitss_img_alt'}} class='img-responsive'>
</a>
<OsfLink @href='http://www.bitss.org/' @target='_blank'>
<img
data-test-bitss-img
src='/assets/images/meetings/BITSS.png'
alt={{t 'meetings.index.meetings-footer.bitss_img_alt'}}
class='img-responsive'
>
</OsfLink>
</div>
<div class='col-sm-3 col-xs-6 text-center'>
<a href='http://www.nrao.edu/' target='_blank' rel='noopener'>
<img data-test-nrao-img src='/assets/images/meetings/NRAO.jpg' alt={{t 'meetings.index.meetings-footer.nrao_img_alt'}} class='img-responsive'>
</a>
<OsfLink @href='http://www.nrao.edu/' @target='_blank'>
<img
data-test-nrao-img
src='/assets/images/meetings/NRAO.jpg'
alt={{t 'meetings.index.meetings-footer.nrao_img_alt'}}
class='img-responsive'
>
</OsfLink>
</div>
<div class='col-sm-3 col-xs-6 text-center'>
<a href='http://www.spsp.org/' target='_blank' rel='noopener'>
<img data-test-spsp-img src='/assets/images/meetings/SPSP.jpg' alt={{t 'meetings.index.meetings-footer.spsp_img_alt'}} class='img-responsive'>
</a>
<OsfLink @href='http://www.spsp.org/' @target='_blank'>
<img
data-test-spsp-img
src='/assets/images/meetings/SPSP.jpg'
alt={{t 'meetings.index.meetings-footer.spsp_img_alt'}}
class='img-responsive'
>
</OsfLink>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { action } from '@ember-decorators/object';
import Component from '@ember/component';

export default class MeetingsHeroBanner extends Component {
// Private properties
registerPanelOpen = false;
uploadPanelOpen = false;

Expand Down
47 changes: 39 additions & 8 deletions app/meetings/index/-components/meetings-hero-banner/template.hbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<div local-class='osf-meeting-header-img'>
<div local-class='osf-meeting-header'>
<div data-test-hero-banner-container class='container '>
<div data-test-hero-banner-container class='container'>
<div class='text-center m-b-lg'>
<h1>
<img data-test-osf-meeting-img src='/assets/images/meetings/osf_meetings_white.png' alt={{t 'meetings.index.meetings-hero-banner.image_alt'}} style='width: 80%'>
<img
data-test-osf-meeting-img
src='/assets/images/meetings/osf_meetings_white.png'
alt={{t 'meetings.index.meetings-hero-banner.image_alt'}}
style='width: 80%'
>
</h1>
<h2>
{{t 'meetings.index.meetings-hero-banner.h3'}}
Expand All @@ -12,15 +17,28 @@
<div local-class='network-img'> </div>
<div class='row'>
<div class='col-md-6 col-lg-5 col-xl-4 text-center m-b-lg'>
<FaIcon data-test-fa-icon-users @icon='users' class='m-v-sm' local-class='user-icon icon-circle' />
<h3 class='f-w-xl'> {{t 'meetings.index.meetings-hero-banner.conference_organizers_h3'}} </h3>
<FaIcon
data-test-fa-icon-users
@icon='users'
class='m-v-sm'
local-class='user-icon icon-circle'
/>
<h3 class='f-w-xl'>
{{t 'meetings.index.meetings-hero-banner.conference_organizers_h3'}}
</h3>
<div class='text-left'>
<p>
{{t 'meetings.index.meetings-hero-banner.conference_organizers_help_text'}}
</p>
</div>
<div class='p-v-md'>
<OsfButton data-test-register-button @type='success' @onClick={{action this.toggleRegisterPanel}}>{{t 'meetings.index.meetings-hero-banner.conference_organizers_register_button'}}</OsfButton>
<OsfButton
data-test-register-button
@type='success'
@onClick={{action this.toggleRegisterPanel}}
>
{{t 'meetings.index.meetings-hero-banner.conference_organizers_register_button'}}
</OsfButton>
</div>
<CpPanel @open={{this.registerPanelOpen}} as |panel| >
<panel.body>
Expand All @@ -31,15 +49,28 @@
</CpPanel>
</div>
<div class='col-md-6 col-lg-5 col-lg-offset-2 col-xl-4 col-xl-offset-4 text-center m-b-lg'>
<FaIcon data-test-fa-icon-cloud-upload @icon='cloud-upload' class='m-v-sm' local-class='user-icon icon-circle' />
<h3 class='f-w-xl'> {{t 'meetings.index.meetings-hero-banner.conference_participants_h3'}} </h3>
<FaIcon
data-test-fa-icon-cloud-upload
@icon='cloud-upload'
class='m-v-sm'
local-class='user-icon icon-circle'
/>
<h3 class='f-w-xl'>
{{t 'meetings.index.meetings-hero-banner.conference_participants_h3'}}
</h3>
<div class='text-left'>
<p>
{{t 'meetings.index.meetings-hero-banner.conference_participants_help_text'}}
</p>
</div>
<div class='p-v-md'>
<OsfButton data-test-upload-button @type='success' @onClick={{action this.toggleUploadPanel}}>{{t 'meetings.index.meetings-hero-banner.conference_participants_upload_button'}}</OsfButton>
<OsfButton
data-test-upload-button
@type='success'
@onClick={{action this.toggleUploadPanel}}
>
{{t 'meetings.index.meetings-hero-banner.conference_participants_upload_button'}}
</OsfButton>
</div>
<CpPanel @open={{this.uploadPanelOpen}} as |panel| >
<panel.body>
Expand Down
1 change: 1 addition & 0 deletions app/meetings/index/-components/meetings-list/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default class MeetingsList extends Component.extend({
this.set('search', search);
}).restartable(),
}) {
// Private properties
search?: string;
sort?: string;

Expand Down
Loading

0 comments on commit 1f09583

Please sign in to comment.