Skip to content
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

Simple calendar integration #860

Closed
wants to merge 2 commits into from

Conversation

tortuetorche
Copy link
Contributor

@tortuetorche tortuetorche commented Mar 5, 2020

polls_calendar_new_event
References:
#121, #136 and #411

References:
Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com>
nextcloud#121, nextcloud#136 and nextcloud#411
:class="{
primary: isWinner,
'icon-calendar': isWinner,
'icon-calendar-000': !isWinner
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could put this into the component as template, add some props and make it reusable.

@@ -31,6 +31,12 @@
<PollItemText v-if="poll.type === 'textPoll'" :option="option" />
<PollItemDate v-if="poll.type === 'datePoll'" :option="option" />

<div v-if="acl.allowEdit && poll.type === 'datePoll'" class="new-event">
<a class="button icon-calendar-000"
:title="t('polls', 'Add a calendar event')"
Copy link
Collaborator

Choose a reason for hiding this comment

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

... and replace this with the component too.

Comment on lines +326 to +337
/**
* @NoAdminRequired
* @return bool
*/
public function getAllowAddEvent(): bool {
return (
$this->getAllowEdit()
&& $this->poll->getType() === 'datePoll'
&& $this->appManager->isEnabledForUser('calendar')
);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tortuetorche I added a new check to the acl: getAllowAddEvent().
It checks the access to the calendar app and integrates your condition.

@dartcafe
Copy link
Collaborator

@tortuetorche Are you planning to continue this?

@tortuetorche
Copy link
Contributor Author

Hi @dartcafe

Sorry, not in the next weeks...
If anybody want to continue or borrow this pull request, I'll be very grateful!

Have a good day,
Tortue Torche

@dartcafe
Copy link
Collaborator

dartcafe commented Sep 3, 2020

I think, too much has changed in the core of polls. At least, with nextcloud/server#20154 a new approach makes sense, since we can do this in the backend.

I would consider closing this and wait for nextcloud/server#20154

@github-actions github-actions bot added the stale label Apr 22, 2023
@github-actions github-actions bot closed this Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants