-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
References: Signed-off-by: Tortue Torche <tortuetorche@users.noreply.github.com> nextcloud#121, nextcloud#136 and nextcloud#411
cc8d5ae
to
aac0c8b
Compare
:class="{ | ||
primary: isWinner, | ||
'icon-calendar': isWinner, | ||
'icon-calendar-000': !isWinner |
There was a problem hiding this comment.
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')" |
There was a problem hiding this comment.
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.
/** | ||
* @NoAdminRequired | ||
* @return bool | ||
*/ | ||
public function getAllowAddEvent(): bool { | ||
return ( | ||
$this->getAllowEdit() | ||
&& $this->poll->getType() === 'datePoll' | ||
&& $this->appManager->isEnabledForUser('calendar') | ||
); | ||
} | ||
|
There was a problem hiding this comment.
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.
@tortuetorche Are you planning to continue this? |
Hi @dartcafe Sorry, not in the next weeks... Have a good day, |
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 |
References:
#121, #136 and #411