parent
cc040d9161
commit
81ec1d1b98
4 changed files with 26 additions and 112 deletions
@ -1,76 +0,0 @@ |
|||||||
<template> |
|
||||||
<div> |
|
||||||
<div class="kit__body"> |
|
||||||
<div class="lessons__list"> |
|
||||||
<div class="lessons__item" v-for="(lesson, index) in lessons"> |
|
||||||
<div class="lessons__actions lessons__actions__no-hover"> |
|
||||||
<!--<button type="button" class="lessons__action" @click="removeLesson(lesson.pk)">--> |
|
||||||
<!--<svg class="icon icon-delete">--> |
|
||||||
<!--<use xlink:href="/static/img/sprite.svg#icon-delete"></use>--> |
|
||||||
<!--</svg>--> |
|
||||||
<!--</button>--> |
|
||||||
<button type="button" class="lessons__action" @click="editLesson(lesson.pk)"> |
|
||||||
<svg class="icon icon-edit"> |
|
||||||
<use xlink:href="/static/img/sprite.svg#icon-edit"></use> |
|
||||||
</svg> |
|
||||||
</button> |
|
||||||
</div> |
|
||||||
<div class="lessons__subtitle subtitle">{{ moment(lesson.fields.date).format("dd, D MMM") }} // {{ lesson.fields.title }}</div> |
|
||||||
<div class="lessons__row"> |
|
||||||
<div class="lessons__content">{{ lesson.fields.short_description }}</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
<div class="lessons__foot"> |
|
||||||
<button type="button" class="lessons__btn btn btn_md" @click="addLesson">СОЗДАТЬ УРОК</button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
|
|
||||||
<script> |
|
||||||
// import { ROLE_ADMIN, ROLE_AUTHOR } from './consts' |
|
||||||
// import LinkInput from './inputs/LinkInput' |
|
||||||
// import DatePicker from 'vuejs-datepicker' |
|
||||||
// import BlockText from './blocks/BlockText' |
|
||||||
// import BlockImage from './blocks/BlockImage' |
|
||||||
// import BlockImages from './blocks/BlockImages' |
|
||||||
// import BlockImageText from './blocks/BlockImageText' |
|
||||||
// import BlockVideo from './blocks/BlockVideo' |
|
||||||
// import LilSelect from "./inputs/LilSelect"; |
|
||||||
// import LessonRedactor from "./LessonRedactor"; |
|
||||||
// import {api} from "../js/modules/api"; |
|
||||||
// import BlockAdd from "./blocks/BlockAdd"; |
|
||||||
// import $ from 'jquery'; |
|
||||||
// import {required, minValue, numeric, url } from 'vuelidate/lib/validators' |
|
||||||
// import slugify from 'slugify'; |
|
||||||
// import Draggable from 'vuedraggable'; |
|
||||||
import {showNotification} from "../js/modules/notification"; |
|
||||||
// import createHistory from "history/createBrowserHistory"; |
|
||||||
import moment from 'moment' |
|
||||||
// import _ from 'lodash' |
|
||||||
moment.locale('ru'); |
|
||||||
|
|
||||||
export default { |
|
||||||
name: "leessons-admin", |
|
||||||
props: ["lessons"], |
|
||||||
mounted() { |
|
||||||
}, |
|
||||||
data() { |
|
||||||
return { |
|
||||||
moment: moment |
|
||||||
} |
|
||||||
}, |
|
||||||
methods: { |
|
||||||
addLesson() { |
|
||||||
window.location = '/course/create/live'; |
|
||||||
}, |
|
||||||
editLesson(id) { |
|
||||||
window.location = '/school/lessons/'+id+'/edit'; |
|
||||||
}, |
|
||||||
removeLesson(id) { |
|
||||||
showNotification('error', '<p>Вжух и удалили!<sup style="vertical-align: super;">(на самом деле нет)</sup></p>'); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
||||||
</script> |
|
||||||
@ -1,16 +0,0 @@ |
|||||||
import Vue from 'vue' |
|
||||||
import 'babel-polyfill' |
|
||||||
import LessonsAdmin from '../components/LessonsAdmin.vue' |
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') { |
|
||||||
// Enable vue-devtools
|
|
||||||
Vue.config.devtools = true; |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
let app = new Vue({ |
|
||||||
el: '#lilcity-vue-app', |
|
||||||
components: { |
|
||||||
'lessons-admin': LessonsAdmin, |
|
||||||
} |
|
||||||
}); |
|
||||||
Loading…
Reference in new issue