Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aNd1coder committed Jan 15, 2016
1 parent cb87712 commit e5d9e8c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ app.locals.PROJECT = {
};

app.locals.FILETYPE = {
html: 'HTML片段',
css: 'CSS链接',
js: 'JS链接'
html: 'HTML',
css: 'CSS',
js: 'JS'
};

app.locals.MODULETYPE = {
Expand Down
4 changes: 4 additions & 0 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ body {
text-align: right;
}

.table td:first-child a {
margin-left: -6px;
}

.table .btn {
margin-left: 5px;
}
Expand Down
14 changes: 6 additions & 8 deletions views/component/gridview.jade
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ table.table.table-striped.table-hover
thead
tr
th 标题
th= controllerName == 'module' ? '项目类型' : '项目'
th 文件名
th 作者
th 创建时间
th 最后更新
Expand All @@ -46,14 +46,11 @@ table.table.table-striped.table-hover
each m in model.data
tr
td
a(href="http://#{m.project == 'global' ? 'www' : m.project}.#{setting.domain + (controllerName == 'page' ? '' : '/ssi')}/#{m.path}",target="_blank")= m.title
- var url = 'http://' + (m.project == 'global' ? 'www' : m.project) + '.' + setting.domain + (controllerName == 'page' ? '' : '/ssi') + '/' + m.path;
a(href="#{url}",target="_blank")= '' + (PROJECT[m.project] || '全局') + (m.filetype ? FILETYPE[m.filetype] : '') + '' + m.title
if(controllerName == 'module')
code.btn-copy(href="javascript:;",title=m.path) 复制代码
td
if(controllerName == 'module')
a(href="/#{controllerName}/?project=#{m.project}&filetype=#{m.filetype}")= (PROJECT[m.project] || '全局') + FILETYPE[m.filetype]
else
a(href="/#{controllerName}/?project=#{m.project}")= PROJECT[m.project]
td= m.filename
td
a(href="/#{controllerName}/?author=#{m.author}")= m.author
td= moment(new Date(m.createdAt)).format('YYYY-MM-DD HH:MM:SS')
Expand All @@ -74,6 +71,7 @@ table.table.table-striped.table-hover
else
span.label.label-danger 草稿
td
a.btn.btn-default.btn-delete(href="/#{controllerName}/delete/#{m._id}") 删除
if(user && user.roles.indexOf(1) == 0 /* super administrator */)
a.btn.btn-default.btn-delete(href="/#{controllerName}/delete/#{m._id}") 删除
a.btn.btn-default(href="/#{controllerName}/edit/#{m._id}") 编辑
include ../component/pagination
11 changes: 6 additions & 5 deletions views/page/_modal.jade
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ script#tpl-page-module(type="text/html").
var background = (module[4] ? 'background-color:' + module[4] : '') + (module[5] ? 'background-image:url(' + module[5] + ')' : '');
var style = background ? ' style="' + background + '"' : '';

if(content){
if (type == 'bundle') { %>
<div id="<%= index %>" class="<%= klass %> module-theme-<%= module[3] || 1 %>" data-id="<%= content %>"<%= style %>>
<i class="loading"></i>
</div>
if(content){ %>
<a name="<%= index %>" title="<%= module[0] %>"></a>
<% if (type == 'bundle') { %>
<div id="<%= index %>" class="<%= klass %> module-theme-<%= module[3] || 1 %>" data-id="<%= content %>"<%= style %>>
<i class="loading"></i>
</div>
<% }

if (type == 'slider') { %>
Expand Down

0 comments on commit e5d9e8c

Please sign in to comment.