* Finish task#43841,43842,43843
This commit is contained in:
@@ -292,6 +292,87 @@ class gitlab extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function projectbrowse($gitlabID)
|
||||
{
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->gitlabProjectList = $this->gitlab->apiGetProjects($gitlabID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creat a gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createProject($gitlabID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createProject($gitlabID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('projectbrowse', "gitlabID=$gitlabID")));
|
||||
}
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
$user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
|
||||
|
||||
$this->view->gitlab = $gitlab;
|
||||
$this->view->user = $user;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editProject($gitlabID, $projectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->editProject($gitlabID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('projectbrowse', "gitlabID=$gitlabID")));
|
||||
}
|
||||
|
||||
$project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID);
|
||||
$this->view->project = $project;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteProject($gitlabID, $projectID, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->project->confirmDelete , inlink('deleteProject', "gitlabID=$gitlabID&projectID=$projectID&confirm=yes")));
|
||||
|
||||
$reponse = $this->gitlab->apiDeleteProject($gitlabID, $projectID);
|
||||
if(substr($reponse->message, 0, 2) == '20') die(js::reload('parent'));
|
||||
die(js::alert($reponse->message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Import gitlab issue to zentaopms.
|
||||
*
|
||||
|
||||
@@ -16,10 +16,12 @@ $lang->gitlab->zentaoAccount = 'Zentao Account';
|
||||
$lang->gitlab->bindingStatus = 'Binding Status';
|
||||
$lang->gitlab->binded = 'Binded';
|
||||
$lang->gitlab->serverFail = 'Connect to GitLab server failed, please check the GitLab server.';
|
||||
$lang->gitlab->lastUpdate = 'Last Update';
|
||||
|
||||
$lang->gitlab->browseAction = 'GitLab List';
|
||||
$lang->gitlab->deleteAction = 'Delete GitLab';
|
||||
$lang->gitlab->gitlabProject = "GitLab Project";
|
||||
$lang->gitlab->browseProject = "GitLab Project List";
|
||||
$lang->gitlab->gitlabIssue = "GitLab Issue";
|
||||
$lang->gitlab->zentaoProduct = 'Zentao Product';
|
||||
$lang->gitlab->objectType = 'Type'; // task, bug, story
|
||||
@@ -48,3 +50,24 @@ $lang->gitlab->hostError = "Invalid GitLab service address.";
|
||||
$lang->gitlab->bindUserError = "Can not bind users repeatedly %s";
|
||||
$lang->gitlab->importIssueError = "The execution to which this issue belongs is not selected.";
|
||||
$lang->gitlab->importIssueWarn = "There is a problem of import failure, you can try to import again.";
|
||||
|
||||
$lang->gitlab->project = new stdclass;
|
||||
$lang->gitlab->project->id = "Project ID";
|
||||
$lang->gitlab->project->name = "Project name";
|
||||
$lang->gitlab->project->create = "Create {$lang->gitlab->gitlabProject}";
|
||||
$lang->gitlab->project->edit = "Edit {$lang->gitlab->gitlabProject}";
|
||||
$lang->gitlab->project->url = "Project URL";
|
||||
$lang->gitlab->project->path = "Project slug";
|
||||
$lang->gitlab->project->description = "Project description";
|
||||
$lang->gitlab->project->visibility = "Visibility Level";
|
||||
$lang->gitlab->project->visibilityList['private'] = "Private(Project access must be granted explicitly to each user. If this project is part of a group, access will be granted to members of the group)";
|
||||
$lang->gitlab->project->visibilityList['internal'] = "Internal(The project can be accessed by any logged in user except external users)";
|
||||
$lang->gitlab->project->visibilityList['public'] = "Public(The project can be accessed without any authentication)";
|
||||
$lang->gitlab->project->star = "Stars";
|
||||
$lang->gitlab->project->fork = "Forks";
|
||||
$lang->gitlab->project->mergeRequests = "Merge Requests";
|
||||
$lang->gitlab->project->issues = "Issues";
|
||||
$lang->gitlab->project->tagList = "Topics";
|
||||
$lang->gitlab->project->tagListTips = "Separate topics with commas.";
|
||||
$lang->gitlab->project->emptyError = "Project name or slug cannot be empty";
|
||||
$lang->gitlab->project->confirmDelete = 'Do you want to delete this GitLab project?';
|
||||
|
||||
@@ -16,10 +16,12 @@ $lang->gitlab->zentaoAccount = '禅道用户';
|
||||
$lang->gitlab->bindingStatus = '绑定状态';
|
||||
$lang->gitlab->binded = '已绑定';
|
||||
$lang->gitlab->serverFail = '连接GitLab服务器异常,请检查GitLab服务器。';
|
||||
$lang->gitlab->lastUpdate = '最后更新';
|
||||
|
||||
$lang->gitlab->browseAction = 'GitLab列表';
|
||||
$lang->gitlab->deleteAction = '删除GitLab';
|
||||
$lang->gitlab->gitlabProject = "{$lang->gitlab->common}项目";
|
||||
$lang->gitlab->browseProject = "{$lang->gitlab->common}项目列表";
|
||||
$lang->gitlab->gitlabIssue = "{$lang->gitlab->common} issue";
|
||||
$lang->gitlab->zentaoProduct = '禅道产品';
|
||||
$lang->gitlab->objectType = '类型'; // task, bug, story
|
||||
@@ -48,3 +50,24 @@ $lang->gitlab->hostError = "无效的GitLab服务地址。";
|
||||
$lang->gitlab->bindUserError = "不能重复绑定用户 %s";
|
||||
$lang->gitlab->importIssueError = "未选择该issue所属的执行。";
|
||||
$lang->gitlab->importIssueWarn = "存在导入失败的issue,可再次尝试导入。";
|
||||
|
||||
$lang->gitlab->project = new stdclass;
|
||||
$lang->gitlab->project->id = "项目ID";
|
||||
$lang->gitlab->project->name = "项目名称";
|
||||
$lang->gitlab->project->create = "添加{$lang->gitlab->gitlabProject}";
|
||||
$lang->gitlab->project->edit = "编辑{$lang->gitlab->gitlabProject}";
|
||||
$lang->gitlab->project->url = "项目 URL";
|
||||
$lang->gitlab->project->path = "项目标识串";
|
||||
$lang->gitlab->project->description = "项目描述";
|
||||
$lang->gitlab->project->visibility = "可见性级别";
|
||||
$lang->gitlab->project->visibilityList['private'] = "私有(项目访问必须明确授予每个用户。 如果此项目是在一个群组中,群组成员将会获得访问权限)";
|
||||
$lang->gitlab->project->visibilityList['internal'] = "内部(除外部用户外,任何登录用户均可访问该项目)";
|
||||
$lang->gitlab->project->visibilityList['public'] = "公开(该项目允许任何人访问)";
|
||||
$lang->gitlab->project->star = "星标";
|
||||
$lang->gitlab->project->fork = "派生";
|
||||
$lang->gitlab->project->mergeRequests = "合并请求";
|
||||
$lang->gitlab->project->issues = "议题";
|
||||
$lang->gitlab->project->tagList = "主题";
|
||||
$lang->gitlab->project->tagListTips = "用逗号分隔主题。";
|
||||
$lang->gitlab->project->emptyError = "项目名称或标识符不能为空";
|
||||
$lang->gitlab->project->confirmDelete = '确认删除该GitLab项目吗?';
|
||||
|
||||
@@ -495,6 +495,57 @@ class gitlabModel extends model
|
||||
return $allResults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitab project by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param object $project
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiCreateProject($gitlabID, $project)
|
||||
{
|
||||
if(empty($project->name) and empty($project->path)) return false;
|
||||
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects");
|
||||
return json_decode(commonModel::http($url, $project));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a gitab project by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param object $project
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiUpdateProject($gitlabID, $project)
|
||||
{
|
||||
if(empty($project->id)) return false;
|
||||
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects/{$project->id}");
|
||||
return json_decode(commonModel::http($url, $project, $options = array(CURLOPT_CUSTOMREQUEST => 'PUT')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a gitab project by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiDeleteProject($gitlabID, $projectID)
|
||||
{
|
||||
if(empty($projectID)) return false;
|
||||
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects/{$projectID}");
|
||||
return json_decode(commonModel::http($url, $project, $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single project by API.
|
||||
*
|
||||
@@ -1550,4 +1601,61 @@ class gitlabModel extends model
|
||||
}
|
||||
return $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createProject($gitlabID)
|
||||
{
|
||||
$project = fixer::input('post')->get();
|
||||
if(empty($project->name) and empty($project->path)) dao::$errors['name'][] = $this->lang->gitlab->project->emptyError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiCreateProject($gitlabID, $project);
|
||||
|
||||
if($reponse->id) return TRUE;
|
||||
foreach($reponse->message as $field => $fieldErrors)
|
||||
{
|
||||
foreach($fieldErrors as $error)
|
||||
{
|
||||
if($error) dao::$errors[$field][] = $error;
|
||||
}
|
||||
}
|
||||
if(!$reponse) dao::$errors[] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit gitlab project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function editProject($gitlabID)
|
||||
{
|
||||
$project = fixer::input('post')->get();
|
||||
if(empty($project->name)) dao::$errors['name'][] = $this->lang->gitlab->project->emptyError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiUpdateProject($gitlabID, $project);
|
||||
|
||||
if($reponse->id) return TRUE;
|
||||
if(is_string($reponse->message)) dao::$errors[] = $reponse->message;
|
||||
else
|
||||
{
|
||||
foreach($reponse->message as $field => $fieldErrors)
|
||||
{
|
||||
foreach($fieldErrors as $error)
|
||||
{
|
||||
if($error) dao::$errors[$field][] = $error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$reponse) dao::$errors[] = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>
|
||||
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->name);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('url', $orderBy, $vars, $lang->gitlab->url);?></th>
|
||||
<th class='c-actions-3'><?php echo $lang->actions;?></th>
|
||||
<th class='c-actions-4'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -47,6 +47,7 @@
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
|
||||
common::printLink('gitlab', 'projectBrowse', "gitlabID=$id", "<i class='icon icon-project'></i> ", '',"title={$lang->gitlab->browseProject} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'edit', "gitlabID=$id", "<i class='icon icon-edit'></i> ", '',"title={$lang->gitlab->edit} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-group'></i> ", '', "title={$lang->gitlab->bindUser} class='btn {$disabled}' ,'disabled'");
|
||||
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'delete', "gitlabID=$id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->delete}' class='btn'");
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of gitlab module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/base64.js');?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->gitlab->project->create;?></h2>
|
||||
</div>
|
||||
<form id='gitlabForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->name;?></th>
|
||||
<td class='required'><?php echo html::input('name', '', "class='form-control' placeholder='{$lang->gitlab->project->name}'");?></td>
|
||||
<td class="tips-git"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->url;?></th>
|
||||
<td><?php echo html::input('url', $gitlab->url . '/' . $user->username . '/', "class='form-control' disabled");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->path;?></th>
|
||||
<td class='required'><?php echo html::input('path', '', "class='form-control' placeholder='{$lang->gitlab->project->path}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->description;?></th>
|
||||
<td><?php echo html::textarea('description', '', "rows='10' class='form-control' placeholder='{$lang->gitlab->project->description}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->visibility;?></th>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('visibility', $lang->gitlab->project->visibilityList, 'private', "", 'block'));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('projectbrowse', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of gitlab module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/base64.js');?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->gitlab->project->edit;?></h2>
|
||||
</div>
|
||||
<form id='gitlabForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->id;?></th>
|
||||
<td><?php echo html::input('id', $project->id, "class='form-control' readonly placeholder='{$lang->gitlab->project->id}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->name;?></th>
|
||||
<td class='required'><?php echo html::input('name', $project->name, "class='form-control' placeholder='{$lang->gitlab->project->name}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->tagList;?></th>
|
||||
<td><?php echo html::input('tag_list', join(',', $project->tag_list), "class='form-control'");?></td>
|
||||
<td class="tips-git"><?php echo $lang->gitlab->project->tagListTips;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->description;?></th>
|
||||
<td><?php echo html::textarea('description', $project->description, "rows='10' class='form-control' placeholder='{$lang->gitlab->project->description}'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->visibility;?></th>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('visibility', $lang->gitlab->project->visibilityList, $project->visibility, "", 'block'));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('projectbrowse', "gitlabID=$gitlabID"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of gitlab module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2017 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Gang Liu <liugang@cnezsoft.com>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('gitlab', 'createProject')) common::printLink('gitlab', 'createProject', "gitlabID=$gitlabID", "<i class='icon icon-plus'></i> " . $lang->gitlab->project->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($gitlabProjectList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->noData;?></span>
|
||||
<?php if(common::hasPriv('gitlab', 'createProject')):?>
|
||||
<?php echo html::a($this->createLink('gitlab', 'createProject', "gitlabID=$gitlabID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->project->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<form class='main-table' id='ajaxForm' method='post'>
|
||||
<table id='gitlabProjectList' class='table has-sort-head table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<th class='c-id'><?php echo $lang->gitlab->project->id;?></th>
|
||||
<th class='c-name text-left'><?php echo $lang->gitlab->project->name;?></th>
|
||||
<th class='text-left'></th>
|
||||
<th class='text-left'><?php echo $lang->gitlab->lastUpdate;?></th>
|
||||
<th class='c-actions-4'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($gitlabProjectList as $id => $gitlabProject): ?>
|
||||
<tr class='text'>
|
||||
<td class='text-center'><?php echo $gitlabProject->id;?></td>
|
||||
<td class='text-c-name' title='<?php echo $gitlabProject->name;?>'><?php echo $gitlabProject->name;?></td>
|
||||
<td class='text text-c-counts'>
|
||||
<span title="<?php echo $lang->gitlab->project->star;?>"><i class="icon icon-star"></i> <?php echo $gitlabProject->star_count;?></span>
|
||||
<span title="<?php echo $lang->gitlab->project->fork;?>"><i class="icon icon-code-fork"></i> <?php echo $gitlabProject->forks_count;?></span>
|
||||
</td>
|
||||
<td class='text' title='<?php echo substr($gitlabProject->last_activity_at, 0, 10);?>'><?php echo substr($gitlabProject->last_activity_at, 0, 10);?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
common::printLink('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->edit} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'deleteProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->project->confirmDelete}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user