mirror of https://github.com/Rekoe/rk_svnadmin
parent
a48459a10f
commit
968c4ab2d8
|
@ -0,0 +1,37 @@
|
|||
package com.rekoe.service;
|
||||
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import com.rekoe.domain.ProjectConfig;
|
||||
|
||||
/**
|
||||
* @author 科技㊣²º¹³<br/>
|
||||
* 2016年3月24日 下午4:48:45<br/>
|
||||
* http://www.rekoe.com<br/>
|
||||
* QQ:5382211
|
||||
*/
|
||||
@IocBean(args = { "refer:dao" }, create = "init")
|
||||
public class ProjectConfigService extends BaseService<ProjectConfig> {
|
||||
|
||||
public ProjectConfigService(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
public ProjectConfig get() {
|
||||
ProjectConfig conf = dao().fetch(getEntityClass());
|
||||
return conf;
|
||||
}
|
||||
|
||||
public boolean update(String repoPath, String domainPath) {
|
||||
ProjectConfig conf = get();
|
||||
conf.setDomainPath(domainPath);
|
||||
conf.setRepositoryPath(repoPath);
|
||||
dao().update(conf);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void init() {
|
||||
get();
|
||||
}
|
||||
}
|
|
@ -30,9 +30,9 @@ function getTableForm() {
|
|||
<@p.column title="描述" align="center">${user.des}</@p.column><#t/>
|
||||
<@p.column title="设置用户组" align="center">设置用户组</@p.column><#t/>
|
||||
<@p.column title="设置权限" align="center">设置权限</@p.column><#t/>
|
||||
<@shiro.hasPermission name="svn.user:edit">
|
||||
<@shiro.hasPermission name="svn.project:auth.manager">
|
||||
<@p.column title="编辑" align="center">
|
||||
<a href="delete.rk?id=${user.pj}" class="pn-opt">删除</a><#rt/>
|
||||
<a href="javascript:void(0);" onclick="Cms.deleted('${user.pj}')" class="pn-opt">删除</a><#rt/>
|
||||
</@p.column><#t/>
|
||||
</@shiro.hasPermission>
|
||||
</@p.table>
|
||||
|
|
|
@ -165,4 +165,29 @@ Cms.updateAll = function(url,back){
|
|||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
Cms.deleted = function(id){
|
||||
$.dialog({
|
||||
type: "warn",
|
||||
content: '确定要删除此记录?',
|
||||
ok: 'Ok',
|
||||
cancel: 'Cancel',
|
||||
onOk: function() {
|
||||
$.ajax({
|
||||
url: "delete.rk",
|
||||
type: "POST",
|
||||
data: {"id":id},
|
||||
dataType: "json",
|
||||
cache: false,
|
||||
success: function(message) {
|
||||
$.message(message);
|
||||
if (message.type == "success")
|
||||
{
|
||||
window.location.href = back;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
Loading…
Reference in New Issue