diff options
author | dartcafe <github@dartcafe.de> | 2018-07-21 18:19:53 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2018-07-21 18:19:53 +0300 |
commit | 2c3cd96d23e2c62a2a51ed340786188e02d8b4ab (patch) | |
tree | 948de90d46f820da5b0ab029671e858ce2f824b8 /templates/create.tmpl.php | |
parent | 891b494f8a4797c7738ce149e8f64109b46a66a2 (diff) |
updated vue app
Diffstat (limited to 'templates/create.tmpl.php')
-rw-r--r-- | templates/create.tmpl.php | 141 |
1 files changed, 2 insertions, 139 deletions
diff --git a/templates/create.tmpl.php b/templates/create.tmpl.php index 1420cb73..68c87915 100644 --- a/templates/create.tmpl.php +++ b/templates/create.tmpl.php @@ -32,145 +32,8 @@ \OCP\Util::addStyle('polls', 'vendor/jquery.ui.timepicker'); \OCP\Util::addscript('polls', 'vendor/jquery.ui.timepicker'); - \OCP\Util::addScript('polls', 'app-create'); ?> -<div id="app" class="flex-column"> - - <div class="controls"> - <breadcrump :index-page="indexPage" :intitle="title"></breadcrump> - <button v-if="poll.mode === 'edit'" @click="writePoll(poll.mode)" class="button btn primary"><span>{{ t('polls', 'Update poll') }}</span></button> - <button v-if="poll.mode === 'create'" @click="writePoll(poll.mode)" class="button btn primary"><span>{{ t('polls', 'Create new poll') }}</span></button> - <a :href="indexPage" class="button">{{ t('polls', 'Cancel') }}</a> - - <button @click="switchSidebar" class="button"> - <span class="symbol icon-settings"></span> - </button> - </div> - - <div class="polls-content flex-row"> - <div class="workbench"> - <div class="flex-column"> - <h2>{{ t('polls', 'Poll description') }}</h2> - <div class="flex-column"> - <label>{{ t('polls', 'Title') }}</label> - <input type="text" id="pollTitle" :class="{ error: titleEmpty }" v-model="poll.event.title"> - </div> - <div class="flex-column"> - <label>{{ t('polls', 'Description') }}</label> - <textarea id="pollDesc" v-model="poll.event.description"></textarea> - </div> - </div> - <div class="flex-column"> - <h2>{{ t('polls', 'Vote options') }}</h2> - <div v-if="poll.mode == 'create'"> - <input id="datePoll" v-model="poll.event.type" value="datePoll" type="radio" class="radio" :disabled="protect"/> - <label for="datePoll">{{ t('polls', 'Event schedule') }}</label> - <input id="textPoll" v-model="poll.event.type" value="textPoll" type="radio" class="radio" :disabled="protect"/> - <label for="textPoll">{{ t('polls', 'Text based') }}</label> - </div> - - <div class="flex-row flex-wrap" v-show="poll.event.type === 'datePoll'"> - <div id="poll-item-selector-date"> - <div class="time-seletcion flex-row"> - <label for="poll-time-picker">{{ t('polls', 'Select time for the date:') }}</label> - <time-picker id="poll-time-picker" :placeholder=" t('polls', 'Add time') " v-model="newPollTime" /> - </div> - <date-picker-inline @selected="addNewPollDate" :locale-data="localeData" :time="newPollTime" v-show="poll.event.type === 'datePoll'" /> - </div> - <transition-group id="date-poll-list" name="list" tag="ul" class="flex-column poll-table"> - <li - is="date-poll-item" - v-for="(pollDate, index) in poll.options.pollDates" - :option="pollDate" - :key="pollDate.id" - @remove="poll.options.pollDates.splice(index, 1)"> - </li> - </transition-group> - </div> - <div class="flex-column flex-wrap" v-show="poll.event.type === 'textPoll'"> - <transition-group id="text-poll-list" name="list" tag="ul" class="poll-table"> - <li - is="text-poll-item" - v-for="(pollText, index) in poll.options.pollTexts" - :option="pollText" - :key="pollText.id" - @remove="poll.options.pollTexts.splice(index, 1)"> - </li> - </transition-group> - - <div id="poll-item-selector-text" > - <input v-model="newPollText" @keyup.enter="addNewPollText()" :placeholder=" t('polls', 'Add option') "> - </div> - </div> - </div> - </div> - - <div id="polls-sidebar" v-if="sidebar" class="flex-column detailsView scroll-container"> - <div class="header flex-row"> - <div class="pollInformation flex-column"> - <user-div description="Owner" :user-id="poll.event.owner"></user-div> - </div> - </div> - - <ul class="tabHeaders"> - <li class="tabHeader selected" data-tabid="configurationsTabView" data-tabindex="0"> - <a href="#">{{ t('polls', 'Configuration') }}</a> - </li> - </ul> - - <div class="tabsContainer"> - <div class="tab configurationsTabView flex-row flex-wrap align-centered space-between" @click="protect=false" v-if="protect"> - <span>{{ t('polls', 'Configuration is locked. Changing options may result in unwanted behaviour,but you can unlock it anyway.') }}</span> - <button> {{ t('polls', 'Unlock configuration ') }} </button> - </div> - <div id="configurationsTabView" class="tab configurationsTabView flex-row flex-wrap"> - - <div class="configBox flex-column" v-if="poll.mode =='edit'"> - <label class="title">{{ t('polls', 'Poll type') }}</label> - <input id="datePoll" v-model="poll.event.type" value="datePoll" type="radio" class="radio" :disabled="protect"/> - <label for="datePoll">{{ t('polls', 'Event schedule') }}</label> - <input id="textPoll" v-model="poll.event.type" value="textPoll" type="radio" class="radio" :disabled="protect"/> - <label for="textPoll">{{ t('polls', 'Text based') }}</label> - </div> - - <div class="configBox flex-column"> - <label class="title">{{ t('polls', 'Poll configurations') }}</label> - <input :disabled="protect" id="disallowMaybe" v-model="poll.event.disallowMaybe"type="checkbox" class="checkbox" /> - <label for="disallowMaybe">{{ t('polls', 'Disallow maybe vote') }}</label> - - <input :disabled="protect" id="anonymous" v-model="poll.event.isAnonymous"type="checkbox" class="checkbox" /> - <label for="anonymous">{{ t('polls', 'Anonymous poll') }}</label> - - <input :disabled="protect" id="trueAnonymous" v-model="poll.event.fullAnonymous" v-show="poll.event.isAnonymous" type="checkbox" class="checkbox"/> - <label for="trueAnonymous" v-show="poll.event.isAnonymous">{{ t('polls', 'Hide user names for admin') }} </label> - - <input :disabled="protect" id="expiration" v-model="poll.event.expiration" type="checkbox" class="checkbox" /> - <label for="expiration">{{ t('polls', 'Expires') }}</label> - <date-picker-input :disabled="protect" :placeholder="t('polls', 'Expiration date')" v-model="poll.event.expire" v-show="poll.event.expiration"></date-picker-input> - </div> - - <div class="configBox flex-column"> - <label class="title">{{ t('polls', 'Access') }}</label> - <input :disabled="protect" type="radio" v-model="poll.event.access" value="registered" id="private" class="radio"/> - <label for="private">{{ t('polls', 'Registered users only') }}</label> - <input :disabled="protect" type="radio" v-model="poll.event.access" value="hidden" id="hidden" class="radio"/> - <label for="hidden">{{ t('polls', 'hidden') }}</label> - <input :disabled="protect" type="radio" v-model="poll.event.access" value="public" id="public" class="radio"/> - <label for="public">{{ t('polls', 'Public access') }}</label> - <input :disabled="protect" type="radio" v-model="poll.event.access" value="select" id="select" class="radio"/> - <label for="select">{{ t('polls', 'Only shared') }}</label> - - </div> - <share-div id="share-list" class="configBox flex-column oneline" - :placeholder="t('polls', 'Name of user or group')" - :active-shares="poll.shares" - v-show="poll.event.access === 'select'" - @add-share="addShare" - @remove-share="removeShare"/> - </div> - </div> - </div> - -</div> +<div id="create-poll"></div> +<?php \OCP\Util::addScript('polls', 'create-poll'); ?> |