|
97 | 97 |
|
98 | 98 | <div class="btns">
|
99 | 99 | <a :href="'{{urlfor "DocumentController.Index" ":key" ""}}' + item.identify" title="查看文档" class="btn btn-default btn-sm" data-toggle="tooltip" target="_blank"><i class="fa fa-eye"></i> 查看<span class="hidden-xs">文档</span></a>
|
| 100 | + <a v-if="item.role_id < 2" :href="'/book/' + item.identify + '/setting'" title="项目设置" class="btn btn-default btn-sm" data-toggle="tooltip" target="_blank"><i class="fa fa-cogs"></i> <span class="hidden-xs">项目</span>设置</a> |
| 101 | + <a v-if="item.role_id < 2" :href="'/book/'+ item.identify +'/generate'" class="btn btn-default btn-sm ajax-get confirm" :data-identify="item.identify"> |
| 102 | + <i class="fa fa-book"></i> 生成下载文档 |
| 103 | + </a> |
| 104 | + |
100 | 105 | <template v-if="item.role_id != 3">
|
101 | 106 | <a :href="'/api/' + item.identify + '/edit'" title="编辑文档" data-toggle="tooltip" class="btn btn-default btn-sm"><i class="fa fa-edit" aria-hidden="true"></i> 编辑<span class="hidden-xs">文档</span></a>
|
| 107 | + |
| 108 | + |
| 109 | + <!-- Split button --> |
| 110 | + <div class="btn-group"> |
| 111 | + <button type="button" class="btn btn-default"><i class="fa fa-cloud-upload"></i> 导入项目</button> |
| 112 | + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 113 | + <span class="caret"></span> |
| 114 | + <span class="sr-only">Toggle Dropdown</span> |
| 115 | + </button> |
| 116 | + <ul class="dropdown-menu"> |
| 117 | + <li> |
| 118 | + <a href="javascript:void(0);" class="btn-upload-epub" data-toggle="tooltip" :data-identify="item.identify" title="支持epub格式电子书导入。"> |
| 119 | + <i class="fa fa-cloud-upload"></i> EPUB 上传导入 |
| 120 | + </a> |
| 121 | + </li> |
| 122 | + <li> |
| 123 | + <a href="javascript:void(0);" class="btn-upload-zip" data-toggle="tooltip" :data-identify="item.identify" title="支持任意zip压缩的markdown项目导入。"> |
| 124 | + <i class="fa fa-cloud-upload"></i> ZIP 上传导入 |
| 125 | + </a> |
| 126 | + </li> |
| 127 | + <li> |
| 128 | + <a href="javascript:void(0);" class="btn-pull-by-zip" data-toggle="tooltip" :data-identify="item.identify" title="从任意源拉取zip压缩的markdown项目"> |
| 129 | + <i class="fa fa-link"></i> ZIP 拉取导入 |
| 130 | + </a> |
| 131 | + </li> |
| 132 | + <li> |
| 133 | + <a href="javascript:void(0);" class="btn-pull-by-git" data-toggle="tooltip" :data-identify="item.identify" title="从Git仓库导入markdown项目"> |
| 134 | + <i class="fa fa-git"></i> Git Clone 导入 |
| 135 | + </a> |
| 136 | + </li> |
| 137 | + </ul> |
| 138 | + </div> |
102 | 139 | </template>
|
103 |
| - <a :href="'/book/' + item.identify + '/setting'" title="项目设置" class="btn btn-default btn-sm" data-toggle="tooltip" target="_blank"><i class="fa fa-cogs"></i> <span class="hidden-xs">项目</span>设置</a> |
104 |
| - {{if lt $.Member.Role 2}} |
105 |
| - {{/*<a href="javascript:void(0);" class="btn btn-default btn-upload-zip btn-sm" data-toggle="tooltip" :data-identify="item.identify" title="支持任意zip压缩的markdown项目导入。">*/}} |
106 |
| - {{/*<i class="fa fa-cloud-upload"></i> 导入<span class="hidden-xs">项目</span>*/}} |
107 |
| - {{/*</a>*/}} |
108 |
| - {{/*<a href="javascript:void(0);" class="btn btn-default btn-pull-project-by-zip btn-sm" data-toggle="tooltip" :data-identify="item.identify" title="从任意源拉取zip压缩的markdown项目">*/}} |
109 |
| - {{/*<i class="fa fa-link"></i> 拉取<span class="hidden-xs">项目</span>*/}} |
110 |
| - {{/*</a>*/}} |
111 |
| - |
112 |
| - {{end}} |
113 |
| - <a :href="'/book/'+ item.identify +'/generate'" class="btn btn-default btn-sm ajax-get confirm" :data-identify="item.identify"> |
114 |
| - <i class="fa fa-book"></i> 生成下载文档 |
115 |
| - </a> |
116 |
| - <!-- Split button --> |
117 |
| - <div class="btn-group"> |
118 |
| - <button type="button" class="btn btn-default"><i class="fa fa-cloud-upload"></i> 导入项目</button> |
119 |
| - <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
120 |
| - <span class="caret"></span> |
121 |
| - <span class="sr-only">Toggle Dropdown</span> |
122 |
| - </button> |
123 |
| - <ul class="dropdown-menu"> |
124 |
| - <li> |
125 |
| - <a href="javascript:void(0);" class="btn-upload-epub" data-toggle="tooltip" :data-identify="item.identify" title="支持epub格式电子书导入。"> |
126 |
| - <i class="fa fa-cloud-upload"></i> EPUB 上传导入 |
127 |
| - </a> |
128 |
| - </li> |
129 |
| - <li> |
130 |
| - <a href="javascript:void(0);" class="btn-upload-zip" data-toggle="tooltip" :data-identify="item.identify" title="支持任意zip压缩的markdown项目导入。"> |
131 |
| - <i class="fa fa-cloud-upload"></i> ZIP 上传导入 |
132 |
| - </a> |
133 |
| - </li> |
134 |
| - <li> |
135 |
| - <a href="javascript:void(0);" class="btn-pull-by-zip" data-toggle="tooltip" :data-identify="item.identify" title="从任意源拉取zip压缩的markdown项目"> |
136 |
| - <i class="fa fa-link"></i> ZIP 拉取导入 |
137 |
| - </a> |
138 |
| - </li> |
139 |
| - <li> |
140 |
| - <a href="javascript:void(0);" class="btn-pull-by-git" data-toggle="tooltip" :data-identify="item.identify" title="从Git仓库导入markdown项目"> |
141 |
| - <i class="fa fa-git"></i> Git Clone 导入 |
142 |
| - </a> |
143 |
| - </li> |
144 |
| - </ul> |
145 |
| - </div> |
146 |
| - <!-- Split button --> |
147 |
| - <div class="btn-group btn-group-download"> |
148 |
| - <button type="button" class="btn btn-default"><i class="fa fa-cloud-download"></i> 导出项目</button> |
149 |
| - <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
150 |
| - <span class="caret"></span> |
151 |
| - <span class="sr-only">Toggle Dropdown</span> |
152 |
| - </button> |
153 |
| - <ul class="dropdown-menu"> |
154 |
| - <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=pdf'">导出 PDF</a></li> |
155 |
| - <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=mobi'">导出 MOBI</a></li> |
156 |
| - <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=epub'">导出 EPUB</a></li> |
157 |
| - </ul> |
158 |
| - </div> |
| 140 | + <template v-if="item.role_id == 0"> |
| 141 | + <!-- Split button --> |
| 142 | + <div class="btn-group btn-group-download"> |
| 143 | + <button type="button" class="btn btn-default"><i class="fa fa-cloud-download"></i> 导出项目</button> |
| 144 | + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
| 145 | + <span class="caret"></span> |
| 146 | + <span class="sr-only">Toggle Dropdown</span> |
| 147 | + </button> |
| 148 | + <ul class="dropdown-menu"> |
| 149 | + <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=pdf'">导出 PDF</a></li> |
| 150 | + <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=mobi'">导出 MOBI</a></li> |
| 151 | + <li><a :href="'{{urlfor "DocumentController.Export" ":key" ""}}' + item.identify+'?output=epub'">导出 EPUB</a></li> |
| 152 | + </ul> |
| 153 | + </div> |
| 154 | + </template> |
| 155 | + |
159 | 156 | </div>
|
160 | 157 | </div>
|
161 | 158 |
|
|
0 commit comments