-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: View Action for Speaker #5390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
iamareebjamal
merged 12 commits into
fossasia:development
from
divyamtayal:view-action-4559
Oct 28, 2020
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9bc6bf2
Fixed View Action
c43953e
Fixed Speaker name
630c3b0
Adding Auth to View Page
9d483a4
Event_id from Speaker Object
26192bc
Improved Code
083a248
Improved Code-1
16a76ad
Improved Code-2
106bb7b
Event_id from Speaker Object-1
356a27c
Event_id from Speaker Object-2
c295b8d
Event_id from Speaker Object-3
f714e7e
Merge branch 'development' into view-action-4559
52188a9
Apply suggestions from code review
iamareebjamal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,4 @@ | ||
import Controller from '@ember/controller'; | ||
import { action, computed } from '@ember/object'; | ||
|
||
export default class extends Controller {} |
This file contains hidden or 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 hidden or 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 classic from 'ember-classic-decorator'; | ||
import Route from '@ember/routing/route'; | ||
|
||
@classic | ||
export default class ViewRoute extends Route { | ||
titleToken(model) { | ||
return model.title; | ||
} | ||
|
||
model(params) { | ||
return this.store.findRecord('speaker', params.speaker_id); | ||
} | ||
} |
20 changes: 8 additions & 12 deletions
20
app/templates/components/ui-table/cell/events/view/speakers/cell-buttons.hbs
This file contains hidden or 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,17 +1,13 @@ | ||
{{this.record}} | ||
<div class="hidden ui divider"></div> | ||
<br><br> | ||
divyamtayal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<div class="ui horizontal compact basic buttons"> | ||
<LinkTo @route="events.view.speakers.edit" @model={{this.extraRecords.id}}> | ||
<UiPopup @content={{t "View"}} @class="ui icon button" @click={{action this.props.actions.viewSpeaker this.extraRecords.id}} @position="left center"> | ||
<i class="unhide icon"></i> | ||
</UiPopup> | ||
</LinkTo> | ||
<LinkTo @route="events.view.speakers.edit" @model={{this.extraRecords.id}}> | ||
<UiPopup @content={{t "Edit"}} @class="ui icon button" @click={{action this.props.actions.editSpeaker this.extraRecords.id}} @position="left center"> | ||
<i class="edit icon"></i> | ||
</UiPopup> | ||
</LinkTo> | ||
<UiPopup @content={{t "View"}} @class="ui icon button" @click={{action this.props.actions.viewSpeaker this.extraRecords.id this}} @position="left center"> | ||
<i class="unhide icon"></i> | ||
</UiPopup> | ||
<UiPopup @content={{t "Edit"}} @class="ui icon button" @click={{action this.props.actions.editSpeaker this.extraRecords.id }} @position="left center"> | ||
<i class="edit icon"></i> | ||
</UiPopup> | ||
<UiPopup @content={{t "Delete"}} @click={{action (confirm (t "Are you sure you would like to delete this Speaker?") (action this.props.actions.deleteSpeaker this.extraRecords.id))}} @class="ui icon button" @position="left center"> | ||
<i class="trash icon"></i> | ||
</UiPopup> | ||
</div> | ||
</div> | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or 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,18 @@ | ||
<div class="ui container"> | ||
<div class="ui row mb-8"> | ||
<LinkTo | ||
@route="public.cfs.edit-speaker" | ||
@models={{array this.model.event.id this.model.id}}> | ||
<button | ||
class="ui blue button {{if this.device.isMobile 'fluid' 'right floated'}}">{{t 'Edit Speaker'}}</button> | ||
{{#if this.device.isMobile}} | ||
<div class="ui hidden fitted divider"></div> | ||
{{/if}} | ||
</LinkTo> | ||
</div> | ||
<div class="ui row"> | ||
<Public::SpeakerItem | ||
@speaker={{this.model}} | ||
/> | ||
</div> | ||
</div> | ||
iamareebjamal marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or 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,11 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
module('Unit | Route | public/speaker/view', function(hooks) { | ||
setupTest(hooks); | ||
|
||
test('it exists', function(assert) { | ||
const route = this.owner.lookup('route:public/speaker/view'); | ||
assert.ok(route); | ||
}); | ||
}); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.