forked from phith0n/Minos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.htm
62 lines (57 loc) · 3.05 KB
/
edit.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends "base.htm" %}
{% block header_title %}文章编辑{% end %}
{% block body %}
{% include "header.htm" %}
<div class="am-container">
<div class="am-g">
<form class="am-form" id="minos-pulish" method="post">
<div class="am-input-group am-margin-bottom" id="title-form">
<span class="am-input-group-label">文章标题</span>
<input type="text" name="title" class="am-form-field" value="{{ post['title'] }}">
</div>
<div class="am-form-group am-margin-bottom minos-width-6">
<div class="am-fl am-input-group-label">板块</div>
<div class="am-fl minos-dropdown">
<select name="sort" data-am-selected>
{% for row in sort %}
<option value="{{ row['_id'] }}" {% if row['name'] == post.get('sort').get('name') %}selected{% end %}>{{ row['name'] }}</option>
{% end %}
</select>
</div>
<span class="am-form-caret am-cf"></span>
</div>
{% set text = flash['article'] %}
<textarea id="editor" name="ckeditor">{{ post['content'] if not text else text }}</textarea>
<div class="am-padding-top"></div>
<div class="am-g">
<div class="am-input-group am-u-sm-4 am-u-lg-4">
<span class="am-input-group-label">收费</span>
<input type="text" class="am-form-field" name="charge" value="{{ post['charge'] }}">
<span class="am-input-group-label">金币</span>
</div>
<div class="am-input-group am-u-sm-8 am-u-lg-8">
<span class="am-input-group-label">免费时段</span>
<input type="number" class="am-form-field" name="freebegin" value="{% if post.get('freeend') > post.get('freebegin') %}{{ post.get('freebegin') }}{% end %}" placeholder="0">
<span class="am-input-group-label">到</span>
<input type="number" class="am-form-field" name="freeend" placeholder="2" value="{% if post.get('freeend') %}{{ post.get('freeend') }}{% end %}">
</div>
</div>
<div class="am-padding-top"></div>
<button class="am-btn am-btn-success" type="submit">修改文章</button>
<input type="hidden" name="id" value="{{ post['_id'] }}" />
{% raw xsrf_form_html() %}
</form>
</div>
</div>
{% end %}
{% block header_static %}
<link rel="stylesheet" href="{{ static_url('assets/simditor/styles/simditor.css') }}">
{% end %}
{% block footer_static %}
<script src="{{ static_url('assets/simditor/scripts/module.js') }}"></script>
<script src="{{ static_url('assets/simditor/scripts/hotkeys.js') }}"></script>
<script src="{{ static_url('assets/simditor/scripts/uploader.js') }}"></script>
<script src="{{ static_url('assets/simditor/scripts/simditor.js') }}"></script>
<script src="{{ static_url('assets/js/edit.js') }}"></script>
<script src="{{ static_url('assets/js/app.js') }}"></script>
{% end %}