Merge branch 'devops16'
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
ALTER TABLE `zt_task` ADD `repo` mediumint unsigned NOT NULL AFTER `activatedDate`;
|
||||
ALTER TABLE `zt_task` ADD `entry` varchar(255) NOT NULL AFTER `repo`;
|
||||
ALTER TABLE `zt_task` ADD `lines` varchar(10) NOT NULL AFTER `entry`;
|
||||
ALTER TABLE `zt_task` ADD `v1` varchar(40) NOT NULL AFTER `lines`;
|
||||
ALTER TABLE `zt_task` ADD `v2` varchar(40) NOT NULL AFTER `v1`;
|
||||
ALTER TABLE `zt_task` ADD `mr` mediumint(8) unsigned NOT NULL AFTER `repo`;
|
||||
ALTER TABLE `zt_bug` ADD `mr` mediumint(8) unsigned NOT NULL AFTER `repo`;
|
||||
|
||||
UPDATE `zt_grouppriv` SET `method`='addReview' where `module`='mr' and `method`='addBug';
|
||||
@@ -203,6 +203,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
`caseVersion` smallint(6) NOT NULL DEFAULT '1',
|
||||
`result` mediumint(8) unsigned NOT NULL,
|
||||
`repo` mediumint(8) unsigned NOT NULL,
|
||||
`mr` mediumint(8) unsigned NOT NULL,
|
||||
`entry` varchar(255) NOT NULL,
|
||||
`lines` varchar(10) NOT NULL,
|
||||
`v1` varchar(40) NOT NULL,
|
||||
@@ -1250,6 +1251,12 @@ CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`lastEditedBy` varchar(30) NOT NULL,
|
||||
`lastEditedDate` datetime NOT NULL,
|
||||
`activatedDate` date NOT NULL,
|
||||
`repo` mediumint(8) unsigned NOT NULL,
|
||||
`mr` mediumint(8) unsigned NOT NULL,
|
||||
`entry` varchar(255) NOT NULL,
|
||||
`lines` varchar(10) NOT NULL,
|
||||
`v1` varchar(40) NOT NULL,
|
||||
`v2` varchar(40) NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `execution` (`execution`),
|
||||
|
||||
@@ -220,7 +220,10 @@ class gitlab
|
||||
$count = $count == 0 ? '' : "-n $count";
|
||||
|
||||
$list = $this->getCommitsByPath($path, $fromRevision, $toRevision);
|
||||
foreach($list as $commit) $commit->diffs = $this->getFilesByCommit($commit->id);
|
||||
foreach($list as $commit)
|
||||
{
|
||||
if(isset($commit->id)) $commit->diffs = $this->getFilesByCommit($commit->id);
|
||||
}
|
||||
|
||||
return $this->parseLog($list);
|
||||
}
|
||||
@@ -656,6 +659,7 @@ class gitlab
|
||||
{
|
||||
$results = $this->fetch($api, $params);
|
||||
$params->page ++;
|
||||
if(!is_array($results)) $results = array();
|
||||
$allResults = $allResults + $results;
|
||||
if(count($results) < 100) break;
|
||||
}
|
||||
@@ -751,6 +755,7 @@ class gitlab
|
||||
$i = 0;
|
||||
foreach($logs as $commit)
|
||||
{
|
||||
if(!isset($commit->id)) continue;
|
||||
$parsedLog = new stdclass();
|
||||
$parsedLog->revision = $commit->id;
|
||||
$parsedLog->committer = $commit->committer_name;
|
||||
|
||||
+100
-92
@@ -79,101 +79,104 @@ $lang->action->periods['lastweek'] = $lang->action->dynamic->lastWeek;
|
||||
$lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['branch'] = 'Branch';
|
||||
$lang->action->objectTypes['story'] = $lang->SRCommon;
|
||||
$lang->action->objectTypes['design'] = 'Design';
|
||||
$lang->action->objectTypes['productplan'] = 'Plan';
|
||||
$lang->action->objectTypes['release'] = 'Release';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = $lang->executionCommon;
|
||||
$lang->action->objectTypes['task'] = 'Task';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['job'] = 'Job';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = 'Case';
|
||||
$lang->action->objectTypes['caseresult'] = 'Case Result';
|
||||
$lang->action->objectTypes['stepresult'] = 'Case Steps';
|
||||
$lang->action->objectTypes['caselib'] = 'Library';
|
||||
$lang->action->objectTypes['testsuite'] = 'Suite';
|
||||
$lang->action->objectTypes['testtask'] = 'Test Build';
|
||||
$lang->action->objectTypes['testreport'] = 'Report';
|
||||
$lang->action->objectTypes['doc'] = 'Document';
|
||||
$lang->action->objectTypes['api'] = 'Interface';
|
||||
$lang->action->objectTypes['doclib'] = 'Document Library';
|
||||
$lang->action->objectTypes['apistruct'] = 'API struct';
|
||||
$lang->action->objectTypes['todo'] = 'Todo';
|
||||
$lang->action->objectTypes['risk'] = 'Risk';
|
||||
$lang->action->objectTypes['issue'] = 'Issue';
|
||||
$lang->action->objectTypes['module'] = 'Module';
|
||||
$lang->action->objectTypes['user'] = 'User';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['budget'] = 'Cost Estimate';
|
||||
$lang->action->objectTypes['entry'] = 'Entry';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
$lang->action->objectTypes['team'] = 'Team';
|
||||
$lang->action->objectTypes['whitelist'] = 'Whitelist';
|
||||
$lang->action->objectTypes['pipeline'] = 'GitLab';
|
||||
$lang->action->objectTypes['gitlab'] = 'GitLab';
|
||||
$lang->action->objectTypes['jenkins'] = 'Jenkins';
|
||||
$lang->action->objectTypes['mr'] = 'Merge Request';
|
||||
$lang->action->objectTypes['gitlabproject'] = 'GitLab Project';
|
||||
$lang->action->objectTypes['gitlabuser'] = 'GitLab User';
|
||||
$lang->action->objectTypes['gitlabgroup'] = 'GitLab Group';
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['branch'] = 'Branch';
|
||||
$lang->action->objectTypes['story'] = $lang->SRCommon;
|
||||
$lang->action->objectTypes['design'] = 'Design';
|
||||
$lang->action->objectTypes['productplan'] = 'Plan';
|
||||
$lang->action->objectTypes['release'] = 'Release';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = $lang->executionCommon;
|
||||
$lang->action->objectTypes['task'] = 'Task';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['job'] = 'Job';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = 'Case';
|
||||
$lang->action->objectTypes['caseresult'] = 'Case Result';
|
||||
$lang->action->objectTypes['stepresult'] = 'Case Steps';
|
||||
$lang->action->objectTypes['caselib'] = 'Library';
|
||||
$lang->action->objectTypes['testsuite'] = 'Suite';
|
||||
$lang->action->objectTypes['testtask'] = 'Test Build';
|
||||
$lang->action->objectTypes['testreport'] = 'Report';
|
||||
$lang->action->objectTypes['doc'] = 'Document';
|
||||
$lang->action->objectTypes['api'] = 'Interface';
|
||||
$lang->action->objectTypes['doclib'] = 'Document Library';
|
||||
$lang->action->objectTypes['apistruct'] = 'API struct';
|
||||
$lang->action->objectTypes['todo'] = 'Todo';
|
||||
$lang->action->objectTypes['risk'] = 'Risk';
|
||||
$lang->action->objectTypes['issue'] = 'Issue';
|
||||
$lang->action->objectTypes['module'] = 'Module';
|
||||
$lang->action->objectTypes['user'] = 'User';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['budget'] = 'Cost Estimate';
|
||||
$lang->action->objectTypes['entry'] = 'Entry';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
$lang->action->objectTypes['team'] = 'Team';
|
||||
$lang->action->objectTypes['whitelist'] = 'Whitelist';
|
||||
$lang->action->objectTypes['pipeline'] = 'GitLab';
|
||||
$lang->action->objectTypes['gitlab'] = 'GitLab';
|
||||
$lang->action->objectTypes['jenkins'] = 'Jenkins';
|
||||
$lang->action->objectTypes['mr'] = 'Merge Request';
|
||||
$lang->action->objectTypes['gitlabproject'] = 'GitLab Project';
|
||||
$lang->action->objectTypes['gitlabuser'] = 'GitLab User';
|
||||
$lang->action->objectTypes['gitlabgroup'] = 'GitLab Group';
|
||||
$lang->action->objectTypes['gitlabbranch'] = 'GitLab Branch';
|
||||
$lang->action->objectTypes['gitlabbranchpriv'] = 'GitLab Protected Branches';
|
||||
|
||||
/* Used to describe operation history. */
|
||||
$lang->action->desc = new stdclass();
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->opened = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->openedbysystem = '$date, opened by system.' . "\n";
|
||||
$lang->action->desc->created = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->added = '$date, added by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->changed = '$date, changed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->edited = '$date, edited by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->assigned = '$date, <strong>$actor</strong> assigned to <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->closed = '$date, closed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->closedbysystem = '$date, closed by system.' . "\n";
|
||||
$lang->action->desc->deleted = '$date, deleted by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->deletedfile = '$date, <strong>$actor</strong> deleted <strong><i>$extra</i></strong>.' . "\n";
|
||||
$lang->action->desc->editfile = '$date, <strong>$actor</strong> edited <strong><i>$extra</i></strong>.' . "\n";
|
||||
$lang->action->desc->erased = '$date, deleted by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->undeleted = '$date, restored by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->hidden = '$date, hidden by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->commented = '$date, added by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->activated = '$date, activated by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->blocked = '$date, blocked by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> , which was "$extra".' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, <strong>$actor</strong> confirmed the story change. The latest build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, <strong>$actor</strong> confirmed the case change. The latest build is <strong>#$extra</strong>' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, <strong>$actor</strong> confirmed Bug.' . "\n";
|
||||
$lang->action->desc->frombug = '$date, converted from <strong>$actor</strong>. Its ID was <strong>$extra</strong>.';
|
||||
$lang->action->desc->started = '$date, started by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->restarted = '$date, continued by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->delayed = '$date, postponed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->suspended = '$date, suspended by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->recordestimate = '$date, recorded by <strong>$actor</strong> and it cost <strong>$extra</strong> hours.';
|
||||
$lang->action->desc->editestimate = '$date, <strong>$actor</strong> edited Hour.';
|
||||
$lang->action->desc->deleteestimate = '$date, <strong>$actor</strong> deleted Hour.';
|
||||
$lang->action->desc->canceled = '$date, cancelled by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->svncommited = '$date, <strong>$actor</strong> committed and the build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->gitcommited = '$date, <strong>$actor</strong> committed and the build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->finished = '$date, finished by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->paused = '$date, paused by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->verified = '$date, verified by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->diff1 = '<strong><i>%s</i></strong> is changed. It was "%s" and it is "%s".<br />' . "\n";
|
||||
$lang->action->desc->diff2 = '<strong><i>%s</i></strong> is changed. The difference is ' . "\n" . "<blockquote class='textdiff'>%s</blockquote>" . "\n<blockquote class='original'>%s</blockquote>";
|
||||
$lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n";
|
||||
$lang->action->desc->linked2bug = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->linked2testtask = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->resolved = '$date, resolved by <strong>$actor</strong> ' . "\n";
|
||||
$lang->action->desc->managed = '$date, by <strong>$actor</strong> managed.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, by <strong>$actor</strong> estimated.' . "\n";
|
||||
$lang->action->desc->run = '$date, by <strong>$actor</strong> executed.' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, started by <strong>$actor</strong>(starting the project sets the program status as Ongoing).' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the project status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, starting the task sets the execution status as Ongoing.' . "\n";
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->opened = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->openedbysystem = '$date, opened by system.' . "\n";
|
||||
$lang->action->desc->created = '$date, created by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->added = '$date, added by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->changed = '$date, changed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->edited = '$date, edited by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->assigned = '$date, <strong>$actor</strong> assigned to <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->closed = '$date, closed by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->closedbysystem = '$date, closed by system.' . "\n";
|
||||
$lang->action->desc->deleted = '$date, deleted by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->deletedfile = '$date, <strong>$actor</strong> deleted <strong><i>$extra</i></strong>.' . "\n";
|
||||
$lang->action->desc->editfile = '$date, <strong>$actor</strong> edited <strong><i>$extra</i></strong>.' . "\n";
|
||||
$lang->action->desc->erased = '$date, deleted by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->undeleted = '$date, restored by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->hidden = '$date, hidden by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->commented = '$date, added by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->activated = '$date, activated by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->blocked = '$date, blocked by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> , which was "$extra".' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, <strong>$actor</strong> confirmed the story change. The latest build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, <strong>$actor</strong> confirmed the case change. The latest build is <strong>#$extra</strong>' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, <strong>$actor</strong> confirmed Bug.' . "\n";
|
||||
$lang->action->desc->frombug = '$date, converted from <strong>$actor</strong>. Its ID was <strong>$extra</strong>.';
|
||||
$lang->action->desc->started = '$date, started by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->restarted = '$date, continued by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->delayed = '$date, postponed by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->suspended = '$date, suspended by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->recordestimate = '$date, recorded by <strong>$actor</strong> and it cost <strong>$extra</strong> hours.';
|
||||
$lang->action->desc->editestimate = '$date, <strong>$actor</strong> edited Hour.';
|
||||
$lang->action->desc->deleteestimate = '$date, <strong>$actor</strong> deleted Hour.';
|
||||
$lang->action->desc->canceled = '$date, cancelled by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->svncommited = '$date, <strong>$actor</strong> committed and the build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->gitcommited = '$date, <strong>$actor</strong> committed and the build is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->finished = '$date, finished by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->paused = '$date, paused by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->verified = '$date, verified by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->diff1 = '<strong><i>%s</i></strong> is changed. It was "%s" and it is "%s".<br />' . "\n";
|
||||
$lang->action->desc->diff2 = '<strong><i>%s</i></strong> is changed. The difference is ' . "\n" . "<blockquote class='textdiff'>%s</blockquote>" . "\n<blockquote class='original'>%s</blockquote>";
|
||||
$lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n";
|
||||
$lang->action->desc->linked2bug = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->linked2testtask = '$date, linked to <strong>$extra</strong> by <strong>$actor</strong>';
|
||||
$lang->action->desc->resolved = '$date, resolved by <strong>$actor</strong> ' . "\n";
|
||||
$lang->action->desc->managed = '$date, by <strong>$actor</strong> managed.' . "\n";
|
||||
$lang->action->desc->estimated = '$date, by <strong>$actor</strong> estimated.' . "\n";
|
||||
$lang->action->desc->run = '$date, by <strong>$actor</strong> executed.' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, started by <strong>$actor</strong>(starting the project sets the program status as Ongoing).' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, starting the execution sets the project status as Ongoing.' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, starting the task sets the execution status as Ongoing.' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, Issue associate created from gitlab by <strong>$actor</strong>.' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -303,6 +306,7 @@ $lang->action->label->compilefail = 'Compile Fail';
|
||||
$lang->action->label->reopen = 'Reopen';
|
||||
$lang->action->label->approve = 'Passed';
|
||||
$lang->action->label->reject = 'Rejected';
|
||||
$lang->action->label->importfromgitlab = 'Issue associate created';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
$lang->action->dynamicAction = new stdclass;
|
||||
@@ -353,6 +357,7 @@ $lang->action->dynamicAction->release['notified'] = 'Notify Release';
|
||||
$lang->action->dynamicAction->release['hidden'] = 'Hide Release';
|
||||
|
||||
$lang->action->dynamicAction->story['opened'] = 'Create Story';
|
||||
$lang->action->dynamicAction->story['importfromgitlab'] = "Issue associate create story";
|
||||
$lang->action->dynamicAction->story['edited'] = 'Edit Story';
|
||||
$lang->action->dynamicAction->story['activated'] = 'Activate Story';
|
||||
$lang->action->dynamicAction->story['reviewed'] = 'Review Story';
|
||||
@@ -393,6 +398,7 @@ $lang->action->dynamicAction->kanbanlane['moved'] = 'Move Swimlane';
|
||||
$lang->action->dynamicAction->team['managedTeam'] = 'Manage Team';
|
||||
|
||||
$lang->action->dynamicAction->task['opened'] = 'Create Task';
|
||||
$lang->action->dynamicAction->task['importfromgitlab'] = "Issue associate create task";
|
||||
$lang->action->dynamicAction->task['edited'] = 'Edit Task';
|
||||
$lang->action->dynamicAction->task['commented'] = 'Task Comment';
|
||||
$lang->action->dynamicAction->task['assigned'] = 'Assign Task';
|
||||
@@ -426,6 +432,7 @@ $lang->action->dynamicAction->build['edited'] = 'Edit Build';
|
||||
$lang->action->dynamicAction->build['deleted'] = 'Delete Build';
|
||||
|
||||
$lang->action->dynamicAction->bug['opened'] = 'Report Bug';
|
||||
$lang->action->dynamicAction->bug['importfromgitlab'] = "Issue associate create bug";
|
||||
$lang->action->dynamicAction->bug['edited'] = 'Edit Bug';
|
||||
$lang->action->dynamicAction->bug['activated'] = 'Activate Bug';
|
||||
$lang->action->dynamicAction->bug['assigned'] = 'Assign Bug';
|
||||
@@ -614,6 +621,7 @@ $lang->action->search->label['canceled'] = $lang->action->label->ca
|
||||
$lang->action->search->label['finished'] = $lang->action->label->finished;
|
||||
$lang->action->search->label['paused'] = $lang->action->label->paused;
|
||||
$lang->action->search->label['verified'] = $lang->action->label->verified;
|
||||
$lang->action->search->label['importfromgitlab'] = $lang->action->label->importfromgitlab;
|
||||
$lang->action->search->label['login'] = $lang->action->label->login;
|
||||
$lang->action->search->label['logout'] = $lang->action->label->logout;
|
||||
|
||||
|
||||
+100
-92
@@ -79,101 +79,104 @@ $lang->action->periods['lastweek'] = $lang->action->dynamic->lastWeek;
|
||||
$lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['branch'] = '分支';
|
||||
$lang->action->objectTypes['story'] = $lang->SRCommon;
|
||||
$lang->action->objectTypes['design'] = '设计';
|
||||
$lang->action->objectTypes['productplan'] = '计划';
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['program'] = '项目集';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['execution'] = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = '版本';
|
||||
$lang->action->objectTypes['job'] = '构建';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['caseresult'] = '用例结果';
|
||||
$lang->action->objectTypes['stepresult'] = '用例步骤';
|
||||
$lang->action->objectTypes['caselib'] = '用例库';
|
||||
$lang->action->objectTypes['testsuite'] = '套件';
|
||||
$lang->action->objectTypes['testtask'] = '测试单';
|
||||
$lang->action->objectTypes['testreport'] = '报告';
|
||||
$lang->action->objectTypes['doc'] = '文档';
|
||||
$lang->action->objectTypes['api'] = '接口';
|
||||
$lang->action->objectTypes['doclib'] = '文档库';
|
||||
$lang->action->objectTypes['apistruct'] = '数据结构';
|
||||
$lang->action->objectTypes['todo'] = '待办';
|
||||
$lang->action->objectTypes['risk'] = '风险';
|
||||
$lang->action->objectTypes['issue'] = '问题';
|
||||
$lang->action->objectTypes['module'] = '模块';
|
||||
$lang->action->objectTypes['user'] = '用户';
|
||||
$lang->action->objectTypes['stakeholder'] = '干系人';
|
||||
$lang->action->objectTypes['budget'] = '费用估算';
|
||||
$lang->action->objectTypes['entry'] = '应用';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
$lang->action->objectTypes['team'] = '团队';
|
||||
$lang->action->objectTypes['whitelist'] = '白名单';
|
||||
$lang->action->objectTypes['pipeline'] = 'GitLab';
|
||||
$lang->action->objectTypes['gitlab'] = 'GitLab';
|
||||
$lang->action->objectTypes['jenkins'] = 'Jenkins';
|
||||
$lang->action->objectTypes['mr'] = '合并请求';
|
||||
$lang->action->objectTypes['gitlabproject'] = 'GitLab项目';
|
||||
$lang->action->objectTypes['gitlabuser'] = 'GitLab用户';
|
||||
$lang->action->objectTypes['gitlabgroup'] = 'GitLab群组';
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['branch'] = '分支';
|
||||
$lang->action->objectTypes['story'] = $lang->SRCommon;
|
||||
$lang->action->objectTypes['design'] = '设计';
|
||||
$lang->action->objectTypes['productplan'] = '计划';
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['program'] = '项目集';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['execution'] = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = '版本';
|
||||
$lang->action->objectTypes['job'] = '构建';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
$lang->action->objectTypes['case'] = '用例';
|
||||
$lang->action->objectTypes['caseresult'] = '用例结果';
|
||||
$lang->action->objectTypes['stepresult'] = '用例步骤';
|
||||
$lang->action->objectTypes['caselib'] = '用例库';
|
||||
$lang->action->objectTypes['testsuite'] = '套件';
|
||||
$lang->action->objectTypes['testtask'] = '测试单';
|
||||
$lang->action->objectTypes['testreport'] = '报告';
|
||||
$lang->action->objectTypes['doc'] = '文档';
|
||||
$lang->action->objectTypes['api'] = '接口';
|
||||
$lang->action->objectTypes['doclib'] = '文档库';
|
||||
$lang->action->objectTypes['apistruct'] = '数据结构';
|
||||
$lang->action->objectTypes['todo'] = '待办';
|
||||
$lang->action->objectTypes['risk'] = '风险';
|
||||
$lang->action->objectTypes['issue'] = '问题';
|
||||
$lang->action->objectTypes['module'] = '模块';
|
||||
$lang->action->objectTypes['user'] = '用户';
|
||||
$lang->action->objectTypes['stakeholder'] = '干系人';
|
||||
$lang->action->objectTypes['budget'] = '费用估算';
|
||||
$lang->action->objectTypes['entry'] = '应用';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
$lang->action->objectTypes['team'] = '团队';
|
||||
$lang->action->objectTypes['whitelist'] = '白名单';
|
||||
$lang->action->objectTypes['pipeline'] = 'GitLab';
|
||||
$lang->action->objectTypes['gitlab'] = 'GitLab';
|
||||
$lang->action->objectTypes['jenkins'] = 'Jenkins';
|
||||
$lang->action->objectTypes['mr'] = '合并请求';
|
||||
$lang->action->objectTypes['gitlabproject'] = 'GitLab项目';
|
||||
$lang->action->objectTypes['gitlabuser'] = 'GitLab用户';
|
||||
$lang->action->objectTypes['gitlabgroup'] = 'GitLab群组';
|
||||
$lang->action->objectTypes['gitlabbranch'] = 'GitLab分支';
|
||||
$lang->action->objectTypes['gitlabbranchpriv'] = 'GitLab保护分支';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc = new stdclass();
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>。' . "\n";
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>。' . "\n";
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。' . "\n";
|
||||
$lang->action->desc->openedbysystem = '$date, 由系统创建。' . "\n";
|
||||
$lang->action->desc->created = '$date, 由 <strong>$actor</strong> 创建。' . "\n";
|
||||
$lang->action->desc->added = '$date, 由 <strong>$actor</strong> 添加。' . "\n";
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。' . "\n";
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。' . "\n";
|
||||
$lang->action->desc->assigned = '$date, 由 <strong>$actor</strong> 指派给 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。' . "\n";
|
||||
$lang->action->desc->closedbysystem = '$date, 由系统关闭。' . "\n";
|
||||
$lang->action->desc->deleted = '$date, 由 <strong>$actor</strong> 删除。' . "\n";
|
||||
$lang->action->desc->deletedfile = '$date, 由 <strong>$actor</strong> 删除了附件:<strong><i>$extra</i></strong>。' . "\n";
|
||||
$lang->action->desc->editfile = '$date, 由 <strong>$actor</strong> 编辑了附件:<strong><i>$extra</i></strong>。' . "\n";
|
||||
$lang->action->desc->erased = '$date, 由 <strong>$actor</strong> 删除。' . "\n";
|
||||
$lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原。' . "\n";
|
||||
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隐藏。' . "\n";
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加备注。' . "\n";
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
|
||||
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"。' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认' . $lang->SRCommon . '变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认用例变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, 由 <strong>$actor</strong> 确认Bug。' . "\n";
|
||||
$lang->action->desc->frombug = '$date, 由 <strong>$actor</strong> Bug转化而来,Bug编号为 <strong>$extra</strong>。';
|
||||
$lang->action->desc->started = '$date, 由 <strong>$actor</strong> 启动。' . "\n";
|
||||
$lang->action->desc->restarted = '$date, 由 <strong>$actor</strong> 继续。' . "\n";
|
||||
$lang->action->desc->delayed = '$date, 由 <strong>$actor</strong> 延期。' . "\n";
|
||||
$lang->action->desc->suspended = '$date, 由 <strong>$actor</strong> 挂起。' . "\n";
|
||||
$lang->action->desc->recordestimate = '$date, 由 <strong>$actor</strong> 记录工时,消耗 <strong>$extra</strong> 小时。';
|
||||
$lang->action->desc->editestimate = '$date, 由 <strong>$actor</strong> 编辑工时。';
|
||||
$lang->action->desc->deleteestimate = '$date, 由 <strong>$actor</strong> 删除工时。';
|
||||
$lang->action->desc->canceled = '$date, 由 <strong>$actor</strong> 取消。' . "\n";
|
||||
$lang->action->desc->svncommited = '$date, 由 <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->gitcommited = '$date, 由 <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->finished = '$date, 由 <strong>$actor</strong> 完成。' . "\n";
|
||||
$lang->action->desc->paused = '$date, 由 <strong>$actor</strong> 暂停。' . "\n";
|
||||
$lang->action->desc->verified = '$date, 由 <strong>$actor</strong> 验收。' . "\n";
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />' . "\n";
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . "<blockquote class='textdiff'>%s</blockquote>" . "\n<blockquote class='original'>%s</blockquote>";
|
||||
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
|
||||
$lang->action->desc->linked2bug = '$date 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>';
|
||||
$lang->action->desc->linked2testtask = '$date 由 <strong>$actor</strong> 关联到测试单 <strong>$extra</strong>';
|
||||
$lang->action->desc->resolved = '$date, 由 <strong>$actor</strong> 解决。' . "\n";
|
||||
$lang->action->desc->managed = '$date, 由 <strong>$actor</strong> 维护。' . "\n";
|
||||
$lang->action->desc->estimated = '$date, 由 <strong>$actor</strong> 估算。' . "\n";
|
||||
$lang->action->desc->run = '$date, 由 <strong>$actor</strong> 执行。' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, 由 <strong>$actor</strong> 启动(因项目开始而启动项目集)。' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, 系统判断由于执行开始,将项目状态置为进行中。' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, 系统判断由于任务开始,将执行状态置为进行中。' . "\n";
|
||||
$lang->action->desc->common = '$date, <strong>$action</strong> by <strong>$actor</strong>。' . "\n";
|
||||
$lang->action->desc->extra = '$date, <strong>$action</strong> as <strong>$extra</strong> by <strong>$actor</strong>。' . "\n";
|
||||
$lang->action->desc->opened = '$date, 由 <strong>$actor</strong> 创建。' . "\n";
|
||||
$lang->action->desc->openedbysystem = '$date, 由系统创建。' . "\n";
|
||||
$lang->action->desc->created = '$date, 由 <strong>$actor</strong> 创建。' . "\n";
|
||||
$lang->action->desc->added = '$date, 由 <strong>$actor</strong> 添加。' . "\n";
|
||||
$lang->action->desc->changed = '$date, 由 <strong>$actor</strong> 变更。' . "\n";
|
||||
$lang->action->desc->edited = '$date, 由 <strong>$actor</strong> 编辑。' . "\n";
|
||||
$lang->action->desc->assigned = '$date, 由 <strong>$actor</strong> 指派给 <strong>$extra</strong>。' . "\n";
|
||||
$lang->action->desc->closed = '$date, 由 <strong>$actor</strong> 关闭。' . "\n";
|
||||
$lang->action->desc->closedbysystem = '$date, 由系统关闭。' . "\n";
|
||||
$lang->action->desc->deleted = '$date, 由 <strong>$actor</strong> 删除。' . "\n";
|
||||
$lang->action->desc->deletedfile = '$date, 由 <strong>$actor</strong> 删除了附件:<strong><i>$extra</i></strong>。' . "\n";
|
||||
$lang->action->desc->editfile = '$date, 由 <strong>$actor</strong> 编辑了附件:<strong><i>$extra</i></strong>。' . "\n";
|
||||
$lang->action->desc->erased = '$date, 由 <strong>$actor</strong> 删除。' . "\n";
|
||||
$lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原。' . "\n";
|
||||
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隐藏。' . "\n";
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加备注。' . "\n";
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
|
||||
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"。' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认' . $lang->SRCommon . '变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认用例变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->bugconfirmed = '$date, 由 <strong>$actor</strong> 确认Bug。' . "\n";
|
||||
$lang->action->desc->frombug = '$date, 由 <strong>$actor</strong> Bug转化而来,Bug编号为 <strong>$extra</strong>。';
|
||||
$lang->action->desc->started = '$date, 由 <strong>$actor</strong> 启动。' . "\n";
|
||||
$lang->action->desc->restarted = '$date, 由 <strong>$actor</strong> 继续。' . "\n";
|
||||
$lang->action->desc->delayed = '$date, 由 <strong>$actor</strong> 延期。' . "\n";
|
||||
$lang->action->desc->suspended = '$date, 由 <strong>$actor</strong> 挂起。' . "\n";
|
||||
$lang->action->desc->recordestimate = '$date, 由 <strong>$actor</strong> 记录工时,消耗 <strong>$extra</strong> 小时。';
|
||||
$lang->action->desc->editestimate = '$date, 由 <strong>$actor</strong> 编辑工时。';
|
||||
$lang->action->desc->deleteestimate = '$date, 由 <strong>$actor</strong> 删除工时。';
|
||||
$lang->action->desc->canceled = '$date, 由 <strong>$actor</strong> 取消。' . "\n";
|
||||
$lang->action->desc->svncommited = '$date, 由 <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->gitcommited = '$date, 由 <strong>$actor</strong> 提交代码,版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->finished = '$date, 由 <strong>$actor</strong> 完成。' . "\n";
|
||||
$lang->action->desc->paused = '$date, 由 <strong>$actor</strong> 暂停。' . "\n";
|
||||
$lang->action->desc->verified = '$date, 由 <strong>$actor</strong> 验收。' . "\n";
|
||||
$lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值为 "%s",新值为 "%s"。<br />' . "\n";
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:' . "\n" . "<blockquote class='textdiff'>%s</blockquote>" . "\n<blockquote class='original'>%s</blockquote>";
|
||||
$lang->action->desc->diff3 = '将文件名 %s 改为 %s 。' . "\n";
|
||||
$lang->action->desc->linked2bug = '$date 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>';
|
||||
$lang->action->desc->linked2testtask = '$date 由 <strong>$actor</strong> 关联到测试单 <strong>$extra</strong>';
|
||||
$lang->action->desc->resolved = '$date, 由 <strong>$actor</strong> 解决。' . "\n";
|
||||
$lang->action->desc->managed = '$date, 由 <strong>$actor</strong> 维护。' . "\n";
|
||||
$lang->action->desc->estimated = '$date, 由 <strong>$actor</strong> 估算。' . "\n";
|
||||
$lang->action->desc->run = '$date, 由 <strong>$actor</strong> 执行。' . "\n";
|
||||
$lang->action->desc->syncprogram = '$date, 由 <strong>$actor</strong> 启动(因项目开始而启动项目集)。' . "\n";
|
||||
$lang->action->desc->syncproject = '$date, 系统判断由于执行开始,将项目状态置为进行中。' . "\n";
|
||||
$lang->action->desc->syncexecution = '$date, 系统判断由于任务开始,将执行状态置为进行中。' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, 由 <strong>$actor</strong> 从Gitlab的Issue关联创建。' . "\n";
|
||||
|
||||
/* 用来描述和父子任务相关的操作历史记录。*/
|
||||
$lang->action->desc->createchildren = '$date, 由 <strong>$actor</strong> 创建子任务 <strong>$extra</strong>。' . "\n";
|
||||
@@ -303,6 +306,7 @@ $lang->action->label->compilefail = '构建失败';
|
||||
$lang->action->label->reopen = '重新打开';
|
||||
$lang->action->label->approve = '通过了';
|
||||
$lang->action->label->reject = '拒绝了';
|
||||
$lang->action->label->importfromgitlab = '从Gitlab关联创建了';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
$lang->action->dynamicAction = new stdclass();
|
||||
@@ -353,6 +357,7 @@ $lang->action->dynamicAction->release['notified'] = '通知发布';
|
||||
$lang->action->dynamicAction->release['hidden'] = '隐藏发布';
|
||||
|
||||
$lang->action->dynamicAction->story['opened'] = "创建{$lang->SRCommon}";
|
||||
$lang->action->dynamicAction->story['importfromgitlab'] = "从Gitlab关联创建{$lang->SRCommon}";
|
||||
$lang->action->dynamicAction->story['edited'] = "编辑{$lang->SRCommon}";
|
||||
$lang->action->dynamicAction->story['activated'] = "激活{$lang->SRCommon}";
|
||||
$lang->action->dynamicAction->story['reviewed'] = "评审{$lang->SRCommon}";
|
||||
@@ -393,6 +398,7 @@ $lang->action->dynamicAction->kanbanlane['moved'] = '移动泳道';
|
||||
$lang->action->dynamicAction->team['managedTeam'] = '维护团队';
|
||||
|
||||
$lang->action->dynamicAction->task['opened'] = '创建任务';
|
||||
$lang->action->dynamicAction->task['importfromgitlab'] = "从Gitlab关联创建任务";
|
||||
$lang->action->dynamicAction->task['edited'] = '编辑任务';
|
||||
$lang->action->dynamicAction->task['commented'] = '备注任务';
|
||||
$lang->action->dynamicAction->task['assigned'] = '指派任务';
|
||||
@@ -426,6 +432,7 @@ $lang->action->dynamicAction->build['edited'] = '编辑版本';
|
||||
$lang->action->dynamicAction->build['deleted'] = '删除版本';
|
||||
|
||||
$lang->action->dynamicAction->bug['opened'] = '创建Bug';
|
||||
$lang->action->dynamicAction->bug['importfromgitlab'] = "从Gitlab关联创建Bug";
|
||||
$lang->action->dynamicAction->bug['edited'] = '编辑Bug';
|
||||
$lang->action->dynamicAction->bug['activated'] = '激活Bug';
|
||||
$lang->action->dynamicAction->bug['assigned'] = '指派Bug';
|
||||
@@ -614,6 +621,7 @@ $lang->action->search->label['canceled'] = $lang->action->label->ca
|
||||
$lang->action->search->label['finished'] = $lang->action->label->finished;
|
||||
$lang->action->search->label['paused'] = $lang->action->label->paused;
|
||||
$lang->action->search->label['verified'] = $lang->action->label->verified;
|
||||
$lang->action->search->label['importfromgitlab'] = $lang->action->label->importfromgitlab;
|
||||
$lang->action->search->label['login'] = $lang->action->label->login;
|
||||
$lang->action->search->label['logout'] = $lang->action->label->logout;
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ $lang->block->refresh = 'Refresh';
|
||||
$lang->block->nbsp = ' ';
|
||||
$lang->block->hidden = 'Hide';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
$lang->block->noLinkDynamic = "<span class='timeline-tag'>%s</span> <span class='timeline-text' title='%s'>%s <em>%s</em> %s %s</span>";
|
||||
$lang->block->cannotPlaceInLeft = 'Cannot place the block at left side.';
|
||||
$lang->block->cannotPlaceInRight = 'Cannot place the block at right side.';
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ $lang->block->refresh = '刷新';
|
||||
$lang->block->nbsp = '';
|
||||
$lang->block->hidden = '隐藏';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
$lang->block->noLinkDynamic = "<span class='timeline-tag'>%s</span> <span class='timeline-text' title='%s'>%s <em>%s</em> %s %s</span>";
|
||||
$lang->block->cannotPlaceInLeft = '此区块无法放置在左侧。';
|
||||
$lang->block->cannotPlaceInRight = '此区块无法放置在右侧。';
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = '';
|
||||
$class = $action->major ? "class='active'" : '';
|
||||
echo "<li $class><div>";
|
||||
printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName, $action->objectName);
|
||||
if($action->objectLink) printf($lang->block->dynamicInfo, $action->date, $user, $action->actionLabel, $action->objectLabel, $action->objectLink, $action->objectName, $action->objectName);
|
||||
if(!$action->objectLink) printf($lang->block->noLinkDynamic, $action->date, $action->objectName, $user, $action->actionLabel, $action->objectLabel, $action->objectName);
|
||||
echo "</div></li>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,12 @@ $config->gitlab->create->requiredFields = 'name,url,token';
|
||||
$config->gitlab->edit = new stdclass;
|
||||
$config->gitlab->edit->requiredFields = 'name,url,token';
|
||||
|
||||
$config->gitlab->createbranch = new stdclass;
|
||||
$config->gitlab->createbranch->requiredFields = 'branch,ref';
|
||||
|
||||
$config->gitlab->createbranchpriv = new stdclass;
|
||||
$config->gitlab->createbranchpriv->requiredFields = 'name';
|
||||
|
||||
$config->gitlab->labelPattern = new stdclass;
|
||||
$config->gitlab->labelPattern->task = '/^zentao_task\/\d+$/';
|
||||
$config->gitlab->labelPattern->bug = '/^zentao_bug\/\d+$/';
|
||||
|
||||
+247
-28
@@ -712,6 +712,224 @@ class gitlab extends control
|
||||
die(js::alert($reponse->message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse gitlab branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browseBranch($gitlabID, $projectID, $orderBy = 'name_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->session->set('gitlabBranchList', $this->app->getURI(true));
|
||||
|
||||
$branchList = array();
|
||||
$result = $this->gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
foreach($result as $gitlabBranch)
|
||||
{
|
||||
$branch = new stdClass();
|
||||
$branch->name = $gitlabBranch->name;
|
||||
$branch->lastCommitter = $gitlabBranch->commit->committer_name;
|
||||
$branch->lastCommittedDate = date('Y-m-d H:i:s', strtotime($gitlabBranch->commit->committed_date));
|
||||
|
||||
$branchList[] = $branch;
|
||||
}
|
||||
|
||||
/* Data sort. */
|
||||
list($order, $sort) = explode('_', $orderBy);
|
||||
$orderList = array();
|
||||
foreach($branchList as $branch)
|
||||
{
|
||||
$orderList[] = $branch->$order;
|
||||
}
|
||||
array_multisort($orderList, $sort == 'desc' ? SORT_DESC : SORT_ASC, $branchList);
|
||||
|
||||
/* Pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$recTotal = count($branchList);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$branchList = array_chunk($branchList, $pager->recPerPage);
|
||||
|
||||
$this->view->gitlab = $this->gitlab->getByID($gitlabID);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseBranch;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->gitlabBranchList = empty($branchList) ? $branchList: $branchList[$pageID - 1];
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creat a gitlab branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createBranch($gitlabID, $projectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createBranch($gitlabID, $projectID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$locate = $this->session->gitlabBranchList ? $this->session->gitlabBranchList : inlink('browseBranch', "gitlibID=$gitlabID&projectID=$projectID");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->gitlab->createSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
/* Get branches by api. */
|
||||
$branches = $this->gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
if(!is_array($branches)) $branches= array();
|
||||
|
||||
$branchPairs = array();
|
||||
foreach($branches as $branch) $branchPairs[$branch->name] = $branch->name;
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->createBranch;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->branchPairs = $branchPairs;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse gitlab protect branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browseBranchPriv($gitlabID, $projectID, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword');
|
||||
$branches = $this->gitlab->apiGetBranchPrivs($gitlabID, $projectID, $keyword, $orderBy);
|
||||
$project = $this->gitlab->apiGetSingleProject($gitlabID, $projectID);
|
||||
|
||||
/* Pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$recTotal = count($branches);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$branchList = array_chunk($branches, $pager->recPerPage);
|
||||
|
||||
$this->view->keyword = $keyword;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->browseBranchPriv;
|
||||
$this->view->levelLang = $this->lang->gitlab->branch->branchCreationLevelList;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->branchList = empty($branchList) ? $branchList: $branchList[$pageID - 1];
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a gitlab protect branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createBranchPriv($gitlabID, $projectID, $branch = '')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createBranchPriv($gitlabID, $projectID, $branch);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseBranchPriv', "gitlabID=$gitlabID&projectID=$projectID")));
|
||||
}
|
||||
|
||||
$branchPriv = new stdClass();
|
||||
$branchPriv->name = '';
|
||||
$branchPriv->mergeAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
|
||||
$branchPriv->pushAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
$title = $this->lang->gitlab->createBranchPriv;
|
||||
|
||||
if($branch)
|
||||
{
|
||||
$title = $this->lang->gitlab->editBranchPriv;
|
||||
$branchPriv = $this->gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
|
||||
$branchPriv->mergeAccessLevel = $this->gitlab->checkAccessLevel($branchPriv->merge_access_levels);
|
||||
$branchPriv->pushAccessLevel = $this->gitlab->checkAccessLevel($branchPriv->push_access_levels);
|
||||
}
|
||||
|
||||
$gitlabBranches = $this->gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
$protectBranches = $this->gitlab->apiGetBranchPrivs($gitlabID, $projectID, '', 'name_asc');
|
||||
$protectNames = array_keys($protectBranches);
|
||||
|
||||
$branches = array();
|
||||
foreach($gitlabBranches as $oneBranch)
|
||||
{
|
||||
if(!in_array($oneBranch->name, $protectNames) || $oneBranch->name == $branch) $branches[$oneBranch->name] = $oneBranch->name;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $title;
|
||||
$this->view->pageTitle = $title;
|
||||
$this->view->gitlab = $gitlab;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->branchPriv = $branchPriv;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a gitlab branch protect.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function editBranchPriv($gitlabID, $projectID, $branch)
|
||||
{
|
||||
echo $this->fetch('gitlab', 'createBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch");
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a gitlab protect branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function deleteBranchPriv($gitlabID, $projectID, $branch, $confirm = 'no')
|
||||
{
|
||||
if($confirm != 'yes') die(js::confirm($this->lang->gitlab->branch->confirmDelete , inlink('deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch&confirm=yes")));
|
||||
|
||||
$reponse = $this->gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
|
||||
/* If the status code beginning with 20 is returned or empty is returned, it is successful. */
|
||||
if(!$reponse or substr($reponse->message, 0, 2) == '20')
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabbranchPriv', $branch, 'deleted', '', $branch);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
die(js::alert($reponse->message));
|
||||
}
|
||||
|
||||
/**
|
||||
* Import gitlab issue to zentaopms.
|
||||
*
|
||||
@@ -730,7 +948,6 @@ class gitlab extends control
|
||||
if($gitlab) $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token);
|
||||
if(empty($user->is_admin)) die(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID))));
|
||||
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$executionList = $this->post->executionList;
|
||||
@@ -740,38 +957,40 @@ class gitlab extends control
|
||||
$failedIssues = array();
|
||||
foreach($executionList as $issueID => $executionID)
|
||||
{
|
||||
if($executionID)
|
||||
if(empty($executionID) and $productList[$issueID] != 0) return $this->send(array('result' => 'fail', 'message' => $this->lang->gitlab->importIssueError, 'locate' => $this->server->http_referer));
|
||||
}
|
||||
|
||||
foreach($executionList as $issueID => $executionID)
|
||||
{
|
||||
if(empty($executionID)) continue;
|
||||
|
||||
$objectType = $objectTypeList[$issueID];
|
||||
|
||||
$issue = $this->gitlab->apiGetSingleIssue($gitlabID, $projectID, $issueID);
|
||||
$issue->objectType = $objectType;
|
||||
$issue->objectID = 0; // Meet the required parameters for issueToZentaoObject.
|
||||
if(isset($issue->assignee)) $issue->assignee_id = $issue->assignee->id;
|
||||
$issue->updated_by_id = $issue->author->id; // Here can be replaced by current zentao user.
|
||||
|
||||
$object = $this->gitlab->issueToZentaoObject($issue, $gitlabID);
|
||||
$object->product = $productList[$issueID];
|
||||
$object->execution = $executionID;
|
||||
$clonedObject = clone $object;
|
||||
|
||||
if($objectType == 'task') $objectID = $this->loadModel('task')->createTaskFromGitlabIssue($clonedObject, $executionID);
|
||||
if($objectType == 'bug') $objectID = $this->loadModel('bug')->createBugFromGitlabIssue($clonedObject, $executionID);
|
||||
if($objectType == 'story') $objectID = $this->loadModel('story')->createStoryFromGitlabIssue($clonedObject, $executionID);
|
||||
|
||||
if($objectID)
|
||||
{
|
||||
$objectType = $objectTypeList[$issueID];
|
||||
$this->loadModel('action')->create($objectType, $objectID, 'ImportFromGitlab', '', $issueID);
|
||||
|
||||
$issue = $this->gitlab->apiGetSingleIssue($gitlabID, $projectID, $issueID);
|
||||
$issue->objectType = $objectType;
|
||||
$issue->objectID = 0; // Meet the required parameters for issueToZentaoObject.
|
||||
if(isset($issue->assignee)) $issue->assignee_id = $issue->assignee->id;
|
||||
$issue->updated_by_id = $issue->author->id; // Here can be replaced by current zentao user.
|
||||
|
||||
$object = $this->gitlab->issueToZentaoObject($issue, $gitlabID);
|
||||
$object->product = $productList[$issueID];
|
||||
$object->execution = $executionID;
|
||||
$clonedObject = clone $object;
|
||||
|
||||
if($objectType == 'task') $objectID = $this->loadModel('task')->createTaskFromGitlabIssue($clonedObject, $executionID);
|
||||
if($objectType == 'bug') $objectID = $this->loadModel('bug')->createBugFromGitlabIssue($clonedObject, $executionID);
|
||||
if($objectType == 'story') $objectID = $this->loadModel('story')->createStoryFromGitlabIssue($clonedObject, $executionID);
|
||||
|
||||
if($objectID)
|
||||
{
|
||||
$object->id = $objectID;
|
||||
$this->gitlab->saveImportedIssue($gitlabID, $projectID, $objectType, $objectID, $issue, $object);
|
||||
}
|
||||
else
|
||||
{
|
||||
$failedIssues[] = $issue->iid;
|
||||
}
|
||||
$object->id = $objectID;
|
||||
$this->gitlab->saveImportedIssue($gitlabID, $projectID, $objectType, $objectID, $issue, $object);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($productList[$issueID] != 0) return $this->send(array('result' => 'fail', 'message' => $this->lang->gitlab->importIssueError, 'locate' => $this->server->http_referer));
|
||||
$failedIssues[] = $issue->iid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
.text-c-counts > span {margin-left: 5px;}
|
||||
#mainMenu .pull-left {margin-right: 15px;}
|
||||
@@ -0,0 +1,2 @@
|
||||
.table-form>tbody>tr>th {width: 110px;}
|
||||
.table-form {width: 50%;}
|
||||
@@ -1 +1,3 @@
|
||||
.table-form {min-width: 600px;}
|
||||
.table-form {min-width: 700px;}
|
||||
.c-levels {width: 150px;}
|
||||
.c-names {width: 300px;}
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
.table-form {min-width: 600px;}
|
||||
.table-form {min-width: 700px;}
|
||||
.c-levels {width: 150px;}
|
||||
.c-names {width: 300px;}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#branchSearch').click(function()
|
||||
{
|
||||
triggerSearch();
|
||||
});
|
||||
$('#keyword').keypress(function(event)
|
||||
{
|
||||
if(event.which == 13) triggerSearch();
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Trigger filtering function.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function triggerSearch()
|
||||
{
|
||||
$("#branchPrivForm").submit();
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
$("input[type='radio'][value='public']").parent().parent().css("margin-bottom", "0px");
|
||||
@@ -41,6 +41,25 @@ function addItem(obj)
|
||||
*/
|
||||
function deleteItem(obj)
|
||||
{
|
||||
if($('#teamForm .table tbody').children().length < 2) return false;
|
||||
if($('#teamForm .table-form tbody').children().length < 2) return false;
|
||||
$(obj).closest('tr').remove();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('change', '[id^="levels"]', function()
|
||||
{
|
||||
$tr = $(this).closest('tr');
|
||||
$next = $(this).closest('td').next()
|
||||
var ownerLevel = 50;
|
||||
if($(this).val() == ownerLevel)
|
||||
{
|
||||
$next.prepend('<input type="text" value="" class="form-control disabled" disabled autocomplete="off" />');
|
||||
$next.find('[id^="expires"]').addClass('hidden');
|
||||
$tr.find('a[onclick^="deleteItem"]').addClass('disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$next.find('[id^="expires"]').removeClass('hidden');
|
||||
$next.find('input.disabled').remove();
|
||||
$tr.find('a[onclick^="deleteItem"]').removeClass('disabled');
|
||||
}
|
||||
})
|
||||
|
||||
@@ -41,6 +41,6 @@ function addItem(obj)
|
||||
*/
|
||||
function deleteItem(obj)
|
||||
{
|
||||
if($('#teamForm .table tbody').children().length < 2) return false;
|
||||
if($('#teamForm .table-form tbody').children().length < 2) return false;
|
||||
$(obj).closest('tr').remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ $lang->gitlab->gitlabProject = "GitLab Project";
|
||||
$lang->gitlab->browseProject = "GitLab Project List";
|
||||
$lang->gitlab->browseUser = "User List";
|
||||
$lang->gitlab->browseGroup = "Group List";
|
||||
$lang->gitlab->browseBranch = "GitLab Branch List";
|
||||
$lang->gitlab->gitlabIssue = "GitLab Issue";
|
||||
$lang->gitlab->zentaoProduct = 'Zentao Product';
|
||||
$lang->gitlab->objectType = 'Type'; // task, bug, story
|
||||
@@ -43,8 +44,13 @@ $lang->gitlab->deleteGroup = 'Delete group';
|
||||
$lang->gitlab->createUser = 'Create user';
|
||||
$lang->gitlab->editUser = 'Edit user';
|
||||
$lang->gitlab->deleteUser = 'Delete user';
|
||||
$lang->gitlab->createBranch = 'Add branch';
|
||||
$lang->gitlab->manageGroupMembers = 'Manage group member';
|
||||
$lang->gitlab->createWebhook = 'Create Webhook';
|
||||
$lang->gitlab->browseBranchPriv = 'Protect branch';
|
||||
$lang->gitlab->createBranchPriv = 'Cerate branch protected';
|
||||
$lang->gitlab->editBranchPriv = 'Edit branch protected';
|
||||
$lang->gitlab->deleteBranchPriv = 'Delete branch protected';
|
||||
|
||||
$lang->gitlab->id = 'ID';
|
||||
$lang->gitlab->name = "GitLab Name";
|
||||
@@ -53,10 +59,12 @@ $lang->gitlab->token = 'Token';
|
||||
$lang->gitlab->defaultProject = 'Default Project';
|
||||
$lang->gitlab->private = 'MD5 Verify';
|
||||
|
||||
$lang->gitlab->lblCreate = 'Create GitLab Server';
|
||||
$lang->gitlab->desc = 'Description';
|
||||
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
|
||||
$lang->gitlab->tips = 'When using a password, please disable the "Prevent cross-site request forgery" option in the GitLab global security settings.';
|
||||
$lang->gitlab->lblCreate = 'Create GitLab Server';
|
||||
$lang->gitlab->desc = 'Description';
|
||||
$lang->gitlab->tokenFirst = 'When the Token is not empty, the Token will be used first';
|
||||
$lang->gitlab->tips = 'When using a password, please disable the "Prevent cross-site request forgery" option in the GitLab global security settings.';
|
||||
$lang->gitlab->emptyError = " cannot be empty";
|
||||
$lang->gitlab->createSuccess = "Create success";
|
||||
|
||||
$lang->gitlab->placeholder = new stdclass;
|
||||
$lang->gitlab->placeholder->name = '';
|
||||
@@ -82,11 +90,15 @@ $lang->gitlab->apiError[0] = 'internal is not allowed in a private group.';
|
||||
$lang->gitlab->apiError[1] = 'public is not allowed in a private group.';
|
||||
$lang->gitlab->apiError[2] = 'is too short (minimum is 8 characters)';
|
||||
$lang->gitlab->apiError[3] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'";
|
||||
$lang->gitlab->apiError[4] = 'Branch already exists';
|
||||
$lang->gitlab->apiError[5] = 'Failed to save group {:path=>["has already been taken"]}';
|
||||
|
||||
$lang->gitlab->errorLang[0] = 'You cannot set Internal as its Visibility Level, if it is private in GitLab.';
|
||||
$lang->gitlab->errorLang[1] = 'You cannot set Public as its Visibility Level, if it is private in GitLab.';
|
||||
$lang->gitlab->errorLang[2] = 'Password is too short (minimum is 8 characters)';
|
||||
$lang->gitlab->errorLang[3] = 'It should contain only letters, digits, underscore, hyphen and period. It should not start with hypen, or end with .git or .atom.';
|
||||
$lang->gitlab->errorLang[4] = 'Branch already exists.';
|
||||
$lang->gitlab->errorLang[5] = 'Failed to save group, path has already been taken.';
|
||||
|
||||
$lang->gitlab->project = new stdclass;
|
||||
$lang->gitlab->project->id = "Project ID";
|
||||
@@ -122,7 +134,7 @@ $lang->gitlab->user->projectsLimit = "Projects limit";
|
||||
$lang->gitlab->user->canCreateGroup = "Can create group";
|
||||
$lang->gitlab->user->external = "External";
|
||||
$lang->gitlab->user->externalTip = "External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.";
|
||||
$lang->gitlab->user->bind = "Bind Zentao user";
|
||||
$lang->gitlab->user->bind = "Zentao user";
|
||||
$lang->gitlab->user->avatar = "Avatar";
|
||||
$lang->gitlab->user->skype = "Skype";
|
||||
$lang->gitlab->user->linkedin = "Linkedin";
|
||||
@@ -150,6 +162,7 @@ $lang->gitlab->group->visibility = "Visibility leve
|
||||
$lang->gitlab->group->visibilityList['private'] = "Private(The group and its projects can only be viewed by members)";
|
||||
$lang->gitlab->group->visibilityList['internal'] = "Internal(The group and any internal projects can be viewed by any logged in user except external users)";
|
||||
$lang->gitlab->group->visibilityList['public'] = "Public(The group and any public projects can be viewed without any authentication.)";
|
||||
$lang->gitlab->group->permission = 'Permission';
|
||||
$lang->gitlab->group->requestAccessEnabledTip = "Allow users to request access (if visibility is public or internal)";
|
||||
$lang->gitlab->group->lfsEnabled = 'Large File Storage';
|
||||
$lang->gitlab->group->lfsEnabledTip = "Allow projects within this group to use Git LFS(This setting can be overridden in each project)";
|
||||
@@ -171,3 +184,21 @@ $lang->gitlab->group->memberName = 'Account';
|
||||
$lang->gitlab->group->memberAccessLevel = 'Access Level';
|
||||
$lang->gitlab->group->memberExpiresAt = 'Expiration time';
|
||||
$lang->gitlab->group->repeatError = "Group members cannot be added repeatedly";
|
||||
|
||||
$lang->gitlab->branch = new stdclass();
|
||||
$lang->gitlab->branch->name = 'Branch name';
|
||||
$lang->gitlab->branch->from = 'Create from';
|
||||
$lang->gitlab->branch->create = 'Create';
|
||||
$lang->gitlab->branch->lastCommitter = 'Last Committer';
|
||||
$lang->gitlab->branch->lastCommittedDate = 'Last Committed Date';
|
||||
$lang->gitlab->branch->accessLevel = "Branch protection list";
|
||||
$lang->gitlab->branch->mergeAllowed = "Merge Allowed";
|
||||
$lang->gitlab->branch->pushAllowed = "Push Allowed";
|
||||
$lang->gitlab->branch->placeholderSearch = "Branch name";
|
||||
$lang->gitlab->branch->placeholderSelect = "Branch name";
|
||||
$lang->gitlab->branch->confirmDelete = 'Branch will be writable for developers. Are you sure?';
|
||||
$lang->gitlab->branch->branchCreationLevelList[40] = "Maintainers";
|
||||
$lang->gitlab->branch->branchCreationLevelList[30] = "Developers + Maintainers";
|
||||
$lang->gitlab->branch->branchCreationLevelList[0] = "No one";
|
||||
$lang->gitlab->branch->emptyPrivNameError = "Branch cannot be empty.";
|
||||
$lang->gitlab->branch->issetPrivNameError = "The protection branch already exists";
|
||||
|
||||
@@ -30,6 +30,7 @@ $lang->gitlab->gitlabProject = "{$lang->gitlab->common}项目";
|
||||
$lang->gitlab->browseProject = "{$lang->gitlab->common}项目列表";
|
||||
$lang->gitlab->browseUser = "用户列表";
|
||||
$lang->gitlab->browseGroup = "群组列表";
|
||||
$lang->gitlab->browseBranch = "GitLab分支列表";
|
||||
$lang->gitlab->gitlabIssue = "{$lang->gitlab->common} issue";
|
||||
$lang->gitlab->zentaoProduct = '禅道产品';
|
||||
$lang->gitlab->objectType = '类型'; // task, bug, story
|
||||
@@ -43,8 +44,13 @@ $lang->gitlab->deleteGroup = '删除群组';
|
||||
$lang->gitlab->createUser = '添加用户';
|
||||
$lang->gitlab->editUser = '编辑用户';
|
||||
$lang->gitlab->deleteUser = '删除用户';
|
||||
$lang->gitlab->createBranch = '添加分支';
|
||||
$lang->gitlab->manageGroupMembers = '群组成员管理';
|
||||
$lang->gitlab->createWebhook = '创建Webhook';
|
||||
$lang->gitlab->browseBranchPriv = '分支保护管理';
|
||||
$lang->gitlab->createBranchPriv = '创建分支保护';
|
||||
$lang->gitlab->editBranchPriv = '编辑分支保护';
|
||||
$lang->gitlab->deleteBranchPriv = '删除分支保护';
|
||||
|
||||
$lang->gitlab->id = 'ID';
|
||||
$lang->gitlab->name = "{$lang->gitlab->common}名称";
|
||||
@@ -53,10 +59,12 @@ $lang->gitlab->token = 'Token';
|
||||
$lang->gitlab->defaultProject = '默认项目';
|
||||
$lang->gitlab->private = 'MD5验证';
|
||||
|
||||
$lang->gitlab->lblCreate = '添加GitLab服务器';
|
||||
$lang->gitlab->desc = '描述';
|
||||
$lang->gitlab->tokenFirst = 'Token不为空时,优先使用Token。';
|
||||
$lang->gitlab->tips = '使用密码时,请在GitLab全局安全设置中禁用"防止跨站点请求伪造"选项。';
|
||||
$lang->gitlab->lblCreate = '添加GitLab服务器';
|
||||
$lang->gitlab->desc = '描述';
|
||||
$lang->gitlab->tokenFirst = 'Token不为空时,优先使用Token。';
|
||||
$lang->gitlab->tips = '使用密码时,请在GitLab全局安全设置中禁用"防止跨站点请求伪造"选项。';
|
||||
$lang->gitlab->emptyError = "不能为空";
|
||||
$lang->gitlab->createSuccess = "创建成功";
|
||||
|
||||
$lang->gitlab->placeholder = new stdclass;
|
||||
$lang->gitlab->placeholder->name = '';
|
||||
@@ -82,11 +90,15 @@ $lang->gitlab->apiError[0] = 'internal is not allowed in a private group.';
|
||||
$lang->gitlab->apiError[1] = 'public is not allowed in a private group.';
|
||||
$lang->gitlab->apiError[2] = 'is too short (minimum is 8 characters)';
|
||||
$lang->gitlab->apiError[3] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'";
|
||||
$lang->gitlab->apiError[4] = 'Branch already exists';
|
||||
$lang->gitlab->apiError[5] = 'Failed to save group {:path=>["has already been taken"]}';
|
||||
|
||||
$lang->gitlab->errorLang[0] = '私有分组的项目,可见性级别不能设为内部。';
|
||||
$lang->gitlab->errorLang[1] = '私有分组的项目,可见性级别不能设为公开。';
|
||||
$lang->gitlab->errorLang[2] = '密码太短(最少8个字符)';
|
||||
$lang->gitlab->errorLang[3] = "只能包含字母、数字、'.'-'和'.'。不能以'-'开头、以'.git'结尾或以'.atom'结尾。";
|
||||
$lang->gitlab->errorLang[4] = '分支名已存在。';
|
||||
$lang->gitlab->errorLang[5] = '保存失败,群组URL路径已经被使用。';
|
||||
|
||||
$lang->gitlab->project = new stdclass;
|
||||
$lang->gitlab->project->id = "项目ID";
|
||||
@@ -122,7 +134,7 @@ $lang->gitlab->user->projectsLimit = "限制项目";
|
||||
$lang->gitlab->user->canCreateGroup = "可创建组";
|
||||
$lang->gitlab->user->external = "外部人员";
|
||||
$lang->gitlab->user->externalTip = "除非明确授予访问权限,否则外部用户无法查看内部或私有项目。另外,外部用户无法创建项目,群组或个人代码片段。";
|
||||
$lang->gitlab->user->bind = "绑定禅道用户";
|
||||
$lang->gitlab->user->bind = "禅道用户";
|
||||
$lang->gitlab->user->avatar = "头像";
|
||||
$lang->gitlab->user->skype = "Skype";
|
||||
$lang->gitlab->user->linkedin = "Linkedin";
|
||||
@@ -150,6 +162,7 @@ $lang->gitlab->group->visibility = "可见性级别
|
||||
$lang->gitlab->group->visibilityList['private'] = "私有(群组及其项目只能由成员查看)";
|
||||
$lang->gitlab->group->visibilityList['internal'] = "内部(除外部用户外,任何登录用户均可查看该组和任何内部项目)";
|
||||
$lang->gitlab->group->visibilityList['public'] = "公开(群组和任何公共项目可以在没有任何身份验证的情况下查看)";
|
||||
$lang->gitlab->group->permission = '许可';
|
||||
$lang->gitlab->group->requestAccessEnabledTip = "允许用户请求访问(如果可见性是公开或内部的)";
|
||||
$lang->gitlab->group->lfsEnabled = '大文件存储';
|
||||
$lang->gitlab->group->lfsEnabledTip = "允许该组内的项目使用 Git LFS(可以在每个项目中覆盖此设置)";
|
||||
@@ -171,3 +184,21 @@ $lang->gitlab->group->memberName = '账号';
|
||||
$lang->gitlab->group->memberAccessLevel = '角色权限';
|
||||
$lang->gitlab->group->memberExpiresAt = '过期时间';
|
||||
$lang->gitlab->group->repeatError = "群组成员不能重复添加";
|
||||
|
||||
$lang->gitlab->branch = new stdclass();
|
||||
$lang->gitlab->branch->name = '分支名';
|
||||
$lang->gitlab->branch->from = '创建自';
|
||||
$lang->gitlab->branch->create = '创建';
|
||||
$lang->gitlab->branch->lastCommitter = '最后提交';
|
||||
$lang->gitlab->branch->lastCommittedDate = '最后修改时间';
|
||||
$lang->gitlab->branch->accessLevel = "分支保护列表";
|
||||
$lang->gitlab->branch->mergeAllowed = "允许合并到";
|
||||
$lang->gitlab->branch->pushAllowed = "允许推送到";
|
||||
$lang->gitlab->branch->placeholderSearch = "请输入分支名称";
|
||||
$lang->gitlab->branch->placeholderSelect = "请选择分支";
|
||||
$lang->gitlab->branch->confirmDelete = '确定删除分支保护?';
|
||||
$lang->gitlab->branch->branchCreationLevelList[40] = "维护者";
|
||||
$lang->gitlab->branch->branchCreationLevelList[30] = "开发者 + 维护者";
|
||||
$lang->gitlab->branch->branchCreationLevelList[0] = "禁止";
|
||||
$lang->gitlab->branch->emptyPrivNameError = "分支不能为空";
|
||||
$lang->gitlab->branch->issetPrivNameError = "已存在该保护分支";
|
||||
|
||||
+220
-37
@@ -620,7 +620,7 @@ class gitlabModel extends model
|
||||
$order = explode('_', $orderBy);
|
||||
|
||||
$keyword = urlencode($keyword);
|
||||
$result = commonModel::httpWithHeader($host . "?private_token={$gitlab->token}&simple=true&&per_page={$pager->recPerPage}&order_by={$order[0]}&sort={$order[1]}&page={$pager->pageID}&search={$keyword}");
|
||||
$result = commonModel::httpWithHeader($host . "?private_token={$gitlab->token}&simple=true&&per_page={$pager->recPerPage}&order_by={$order[0]}&sort={$order[1]}&page={$pager->pageID}&search={$keyword}&search_namespaces=true");
|
||||
|
||||
$header = $result['header'];
|
||||
$recTotal = $header['X-Total'];
|
||||
@@ -896,6 +896,24 @@ class gitlabModel extends model
|
||||
return json_decode(commonModel::http($url, array(), $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitab user by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param object $branch
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiCreateBranch($gitlabID, $projectID, $branch)
|
||||
{
|
||||
if(empty($branch->branch) or empty($branch->ref)) return false;
|
||||
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects/{$projectID}/repository/branches");
|
||||
return json_decode(commonModel::http($url, $branch));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single project by API.
|
||||
*
|
||||
@@ -2032,15 +2050,15 @@ class gitlabModel extends model
|
||||
if(empty($project->path)) dao::$errors['path'][] = $this->lang->gitlab->project->emptyPathError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiCreateProject($gitlabID, $project);
|
||||
$response = $this->apiCreateProject($gitlabID, $project);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabproject', $reponse->id, 'created', '', $reponse->name);
|
||||
$this->loadModel('action')->create('gitlabproject', $response->id, 'created', '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2056,15 +2074,15 @@ class gitlabModel extends model
|
||||
if(empty($project->name)) dao::$errors['name'][] = $this->lang->gitlab->project->emptyNameError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiUpdateProject($gitlabID, $project);
|
||||
$response = $this->apiUpdateProject($gitlabID, $project);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabproject', $project->id, 'edited', '', $project->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2101,11 +2119,11 @@ class gitlabModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$reponse = $this->apiCreateUser($gitlabID, $user);
|
||||
$response = $this->apiCreateUser($gitlabID, $user);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabuser', $reponse->id, 'created', '', $reponse->name);
|
||||
$this->loadModel('action')->create('gitlabuser', $response->id, 'created', '', $response->name);
|
||||
|
||||
/* Bind user. */
|
||||
if($user->account)
|
||||
@@ -2114,13 +2132,13 @@ class gitlabModel extends model
|
||||
$userBind->providerID = $gitlabID;
|
||||
$userBind->providerType = 'gitlab';
|
||||
$userBind->account = $user->account;
|
||||
$userBind->openID = $reponse->id;
|
||||
$userBind->openID = $response->id;
|
||||
$this->dao->insert(TABLE_OAUTH)->data($userBind)->exec();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2161,14 +2179,14 @@ class gitlabModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$reponse = $this->apiUpdateUser($gitlabID, $user);
|
||||
$response = $this->apiUpdateUser($gitlabID, $user);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabuser', $reponse->id, 'edited', '', $reponse->name);
|
||||
$this->loadModel('action')->create('gitlabuser', $response->id, 'edited', '', $response->name);
|
||||
|
||||
/* Delete old bind. */
|
||||
$this->dao->delete()->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($reponse->id)->andWhere('account')->ne($user->account)->exec();
|
||||
$this->dao->delete()->from(TABLE_OAUTH)->where('providerType')->eq('gitlab')->andWhere('providerID')->eq($gitlabID)->andWhere('openID')->eq($response->id)->andWhere('account')->ne($user->account)->exec();
|
||||
/* Bind user. */
|
||||
if($user->account && $changeBind)
|
||||
{
|
||||
@@ -2176,13 +2194,13 @@ class gitlabModel extends model
|
||||
$userBind->providerID = $gitlabID;
|
||||
$userBind->providerType = 'gitlab';
|
||||
$userBind->account = $user->account;
|
||||
$userBind->openID = $reponse->id;
|
||||
$userBind->openID = $response->id;
|
||||
$this->dao->replace(TABLE_OAUTH)->data($userBind)->exec();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2200,15 +2218,15 @@ class gitlabModel extends model
|
||||
if(empty($group->path)) dao::$errors['path'][] = $this->lang->gitlab->group->path . $this->lang->gitlab->group->emptyError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiCreateGroup($gitlabID, $group);
|
||||
$response = $this->apiCreateGroup($gitlabID, $group);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabgroup', $reponse->id, 'created', '', $reponse->name);
|
||||
$this->loadModel('action')->create('gitlabgroup', $response->id, 'created', '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2225,41 +2243,68 @@ class gitlabModel extends model
|
||||
if(empty($group->name)) dao::$errors['name'][] = $this->lang->gitlab->group->name . $this->lang->gitlab->group->emptyError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$reponse = $this->apiUpdateGroup($gitlabID, $group);
|
||||
$response = $this->apiUpdateGroup($gitlabID, $group);
|
||||
|
||||
if(!empty($reponse->id))
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabgroup', $reponse->id, 'edited', '', $reponse->name);
|
||||
$this->loadModel('action')->create('gitlabgroup', $response->id, 'edited', '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($reponse);
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitlab branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createBranch($gitlabID, $projectID)
|
||||
{
|
||||
$branch = fixer::input('post')->get();
|
||||
|
||||
if(empty($branch->branch)) dao::$errors['branch'][] = $this->lang->gitlab->branch->name . $this->lang->gitlab->emptyError;
|
||||
if(empty($branch->ref)) dao::$errors['ref'][] = $this->lang->gitlab->branch->from . $this->lang->gitlab->emptyError;
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$response = $this->apiCreateBranch($gitlabID, $projectID, $branch);
|
||||
|
||||
if(!empty($response->name))
|
||||
{
|
||||
$this->loadModel('action')->create('gitlabbranch', 0, 'created', '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Api error handling.
|
||||
*
|
||||
* @param object $reponse
|
||||
* @param object $response
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function apiErrorHandling($reponse)
|
||||
public function apiErrorHandling($response)
|
||||
{
|
||||
if(!empty($reponse->error))
|
||||
if(!empty($response->error))
|
||||
{
|
||||
dao::$errors[] = $reponse->error;
|
||||
dao::$errors[] = $response->error;
|
||||
return false;
|
||||
}
|
||||
if(!empty($reponse->message))
|
||||
if(!empty($response->message))
|
||||
{
|
||||
if(is_string($reponse->message))
|
||||
if(is_string($response->message))
|
||||
{
|
||||
$errorKey = array_search($reponse->message, $this->lang->gitlab->apiError);
|
||||
dao::$errors[] = $errorKey === false ? $reponse->message : zget($this->lang->gitlab->errorLang, $errorKey);
|
||||
$errorKey = array_search($response->message, $this->lang->gitlab->apiError);
|
||||
dao::$errors[] = $errorKey === false ? $response->message : zget($this->lang->gitlab->errorLang, $errorKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($reponse->message as $field => $fieldErrors)
|
||||
foreach($response->message as $field => $fieldErrors)
|
||||
{
|
||||
foreach($fieldErrors as $error)
|
||||
{
|
||||
@@ -2270,7 +2315,7 @@ class gitlabModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!$reponse) dao::$errors[] = false;
|
||||
if(!$response) dao::$errors[] = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2287,4 +2332,142 @@ class gitlabModel extends model
|
||||
->andWhere('path')->in($projectIDs)
|
||||
->fetchPairs('path', 'product');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get protect branches of one project.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $keyword
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function apiGetBranchPrivs($gitlabID, $projectID, $keyword = '', $orderBy = 'id_desc')
|
||||
{
|
||||
$keyword = urlencode($keyword);
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/protected_branches");
|
||||
$branches = json_decode(commonModel::http($url));
|
||||
|
||||
if(!is_array($branches)) return $branches;
|
||||
/* Parse order string. */
|
||||
$order = explode('_', $orderBy);
|
||||
|
||||
$newBranches = array();
|
||||
foreach($branches as $branch)
|
||||
{
|
||||
if(empty($keyword) || stristr($branch->name, $keyword)) $newBranches[$branch->{$order[0]}] = $branch;
|
||||
}
|
||||
|
||||
if($order[1] == 'asc') ksort($newBranches);
|
||||
if($order[1] == 'desc') krsort($newBranches);
|
||||
|
||||
return $newBranches;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get single protct branch by API.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiGetSingleBranchPriv($gitlabID, $projectID, $branch)
|
||||
{
|
||||
if(empty($gitlabID)) return false;
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/protected_branches/$branch");
|
||||
return json_decode(commonModel::http($url));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create gitlab potect branch.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function createBranchPriv($gitlabID, $projectID, $branch = '')
|
||||
{
|
||||
$priv = fixer::input('post')->get();
|
||||
if(empty($priv->name)) dao::$errors['name'][] = $this->lang->gitlab->branch->emptyPrivNameError;
|
||||
$singleBranch = $this->apiGetSingleBranchPriv($gitlabID, $projectID, $priv->name);
|
||||
if(empty($branch) && !empty($singleBranch->id)) dao::$errors['name'][] = $this->lang->gitlab->branch->issetPrivNameError;
|
||||
if(dao::isError()) return false;
|
||||
if(!empty($branch) && !empty($singleBranch->id)) $this->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
|
||||
$response = $this->apiCreateBranchPriv($gitlabID, $projectID, $priv);
|
||||
|
||||
if(!empty($response->id))
|
||||
{
|
||||
$action = empty($branch) ? 'created' : 'edited';
|
||||
$this->loadModel('action')->create('gitlabbranchpriv', $response->id, $action, '', $response->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->apiErrorHandling($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitab protect branch by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param object $priv
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiCreateBranchPriv($gitlabID, $projectID, $priv)
|
||||
{
|
||||
if(empty($gitlabID)) return false;
|
||||
if(empty($priv->name)) return false;
|
||||
$url = sprintf($this->getApiRoot($gitlabID), "/projects/" . $projectID . '/protected_branches');
|
||||
return json_decode(commonModel::http($url, $priv));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a gitab protect branch by api.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function apiDeleteBranchPriv($gitlabID, $projectID, $branch)
|
||||
{
|
||||
if(empty($gitlabID)) return false;
|
||||
$apiRoot = $this->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects/{$projectID}/protected_branches/{$branch}");
|
||||
return json_decode(commonModel::http($url, array(), $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check access level.
|
||||
*
|
||||
* @param array $accessLevels
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function checkAccessLevel($accessLevels)
|
||||
{
|
||||
$noAccess = 0;
|
||||
$developerAccess = 30;
|
||||
$maintainerAccess = 40;
|
||||
if(is_array($accessLevels))
|
||||
{
|
||||
$levels = array();
|
||||
foreach($accessLevels as $level)
|
||||
{
|
||||
if(is_array($level)) $level = (object)$level;
|
||||
$levels[] = isset($level->access_level) ? (int)$level->access_level : $maintainerAccess;
|
||||
}
|
||||
if(in_array($noAccess, $levels)) return $noAccess;
|
||||
if(in_array($developerAccess, $levels)) return $developerAccess;
|
||||
}
|
||||
return $maintainerAccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $lang->gitlab->gitlabAccount;?></th>
|
||||
<th><?php echo $lang->gitlab->zentaoAccount;?></th>
|
||||
<th class='w-150px'><?php echo $lang->gitlab->zentaoAccount;?></th>
|
||||
<th class='w-150px'><?php echo $lang->gitlab->bindingStatus;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -51,7 +51,8 @@
|
||||
<td><?php echo html::select("zentaoUsers[$gitlabUser->id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?></td>
|
||||
<td>
|
||||
<?php if(isset($bindedUsers[$gitlabUser->zentaoAccount])):?>
|
||||
<?php if(!empty(zget($userPairs, $gitlabUser->zentaoAccount, ''))):?>
|
||||
<?php $zentaoAccount = zget($userPairs, $gitlabUser->zentaoAccount, '');?>
|
||||
<?php if(!empty($zentaoAccount)):?>
|
||||
<?php echo $lang->gitlab->binded;?>
|
||||
<?php else:?>
|
||||
<?php echo '<span class="text-red">' . $lang->gitlab->bindedError . '</span>';?>
|
||||
|
||||
@@ -42,16 +42,16 @@
|
||||
<?php foreach ($gitlabList as $id => $gitlab): ?>
|
||||
<tr class='text' title='<?php if(!$gitlab->isAdminToken) echo $lang->gitlab->tokenLimit;?>'>
|
||||
<td class='text-center'><?php echo $id;?></td>
|
||||
<td class='text-c-name' title='<?php echo $gitlab->name;?>'><a class="iframe" data-width="90%" href="<?php echo $this->createLink('gitlab', 'view', "id=$id", '', true); ?>"><?php echo $gitlab->name;?></a></td>
|
||||
<td class='text-c-name' title='<?php echo $gitlab->name;?>'><a class="iframe" href="<?php echo $this->createLink('gitlab', 'view', "id=$id", '', true); ?>"><?php echo $gitlab->name;?></a></td>
|
||||
<td class='text' title='<?php echo $gitlab->url;?>'><?php echo $gitlab->url;?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
$disabled = !empty($gitlab->isAdminToken) ? '' : 'disabled';
|
||||
common::printLink('gitlab', 'browseProject', "gitlabID=$id", "<i class='icon icon-list-box'></i> ", '',"title={$lang->gitlab->browseProject} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'browseGroup', "gitlabID=$id", "<i class='icon icon-groups'></i> ", '', "title={$lang->gitlab->browseGroup} 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', 'browseUser', "gitlabID=$id", "<i class='icon icon-persons'></i> ", '', "title={$lang->gitlab->browseUser} class='btn {$disabled}' ,'disabled'");
|
||||
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-link'></i> ", '', "title={$lang->gitlab->bindUser} class='btn {$disabled}' ,'disabled'");
|
||||
common::printLink('gitlab', 'browseProject', "gitlabID=$id", "<i class='icon icon-list-box'></i> ", '',"title='{$lang->gitlab->browseProject}' class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'browseGroup', "gitlabID=$id", "<i class='icon icon-groups'></i> ", '', "title='{$lang->gitlab->browseGroup}' 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', 'browseUser', "gitlabID=$id", "<i class='icon icon-person'></i> ", '', "title='{$lang->gitlab->browseUser}' class='btn {$disabled}' ,'disabled'");
|
||||
common::printLink('gitlab', 'bindUser', "id=$id", "<i class='icon icon-link'></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'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of gitlab module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Gang Zeng <zenggang@easycorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('vars', "keyword=%s&orderBy=id_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID=1")?>
|
||||
<?php js::set('gitlabID', $gitlabID)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='pull-left'>
|
||||
<?php echo html::linkButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, $this->createLink('gitlab', 'browseProject', "gitlabID=$gitlabID"), 'self', '','btn btn-secondary');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('gitlab', 'createBranch')) common::printLink('gitlab', 'createBranch', "gitlabID=$gitlabID&projectID=$projectID", "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($gitlabBranchList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->noData;?></span>
|
||||
<?php if(empty($keyword) and common::hasPriv('gitlab', 'createBranch')):?>
|
||||
<?php echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID=$gitlabID&projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranch, '', "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='gitlabBranchList' class='table has-sort-head table-fixed'>
|
||||
<?php $vars = "gitlabID={$gitlabID}&projectID={$projectID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->branch->name);?></th>
|
||||
<th class='text-left'><?php echo $lang->gitlab->branch->lastCommitter;?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('lastCommittedDate', $orderBy, $vars, $lang->gitlab->branch->lastCommittedDate);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($gitlabBranchList as $id => $gitlabBranch): ?>
|
||||
<tr class='text'>
|
||||
<td class='text-c-name' title='<?php echo $gitlabBranch->name;?>'><?php echo $gitlabBranch->name;?></td>
|
||||
<td class='text'><?php echo $gitlabBranch->lastCommitter;?></td>
|
||||
<td class='text'><?php echo $gitlabBranch->lastCommittedDate?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($gitlabBranchList):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of gitlab protext branch of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='pull-left'>
|
||||
<?php echo html::a($this->createLink('gitlab', 'browseProject', "gitlabID=$gitlabID"), "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
</div>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title" title="<?php echo $project->name_with_namespace; ?>"><?php echo $project->name_with_namespace; ?></div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div>
|
||||
<form id='branchPrivForm' method='post'>
|
||||
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->branch->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
|
||||
<a id="branchSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::hasPriv('gitlab', 'createBranchPriv')) common::printLink('gitlab', 'createBranchPriv', "gitlabID=$gitlabID&projectID=$projectID", "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranchPriv, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($branchList)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->noData;?></span>
|
||||
<?php if(empty($keyword) and common::hasPriv('gitlab', 'createBranchPriv')):?>
|
||||
<?php echo html::a($this->createLink('gitlab', 'createBranchPriv', "gitlabID=$gitlabID&projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->gitlab->createBranchPriv, '', "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='branchList' class='table has-sort-head table-fixed'>
|
||||
<?php $vars = "gitlabID={$gitlabID}&projectID={$projectID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='c-name text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->gitlab->branch->name);?></th>
|
||||
<th class='text-left'><?php echo $lang->gitlab->branch->mergeAllowed;?></th>
|
||||
<th class='text-left'><?php echo $lang->gitlab->branch->pushAllowed;?></th>
|
||||
<th class='c-actions-4'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($branchList as $id => $branch): ?>
|
||||
<?php $branch->merge_access_level = $this->gitlab->checkAccessLevel($branch->merge_access_levels); ?>
|
||||
<?php $branch->push_access_level = $this->gitlab->checkAccessLevel($branch->push_access_levels); ?>
|
||||
<tr class='text'>
|
||||
<td class='text-c-name' title='<?php echo $branch->name;?>'><?php echo $branch->name;?></td>
|
||||
<td class-'text' title="<?php echo $levelLang[$branch->merge_access_level];?>"><?php echo $levelLang[$branch->merge_access_level];?></td>
|
||||
<td class='text' title="<?php echo $levelLang[$branch->push_access_level];?>"><?php echo $levelLang[$branch->push_access_level];?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
if(common::hasPriv('gitlab', 'editBranchPriv')) common::printLink('gitlab', 'editBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch->name", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->editBranchPriv} class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'deleteBranchPriv')) echo html::a($this->createLink('gitlab', 'deleteBranchPriv', "gitlabID=$gitlabID&projectID=$projectID&branch=$branch->name"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteBranchPriv}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if($branchList):?>
|
||||
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -54,8 +54,8 @@
|
||||
<td class='text' title='<?php echo substr($gitlabGroup->created_at, 0, 10);?>'><?php echo substr($gitlabGroup->created_at, 0, 10);?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
common::printLink('gitlab', 'manageGroupMembers', "gitlabID=$gitlabID&groupID=$gitlabGroup->id", "<i class='icon icon-team'></i> ", '',"title={$lang->gitlab->group->manageMembers} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'editGroup', "gitlabID=$gitlabID&groupID=$gitlabGroup->id", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->group->edit} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'manageGroupMembers', "gitlabID=$gitlabID&groupID=$gitlabGroup->id", "<i class='icon icon-team'></i> ", '',"title='{$lang->gitlab->group->manageMembers}' class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'editGroup', "gitlabID=$gitlabID&groupID=$gitlabGroup->id", "<i class='icon icon-edit'></i> ", '', "title='{$lang->gitlab->group->edit}' class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'deleteGroup', "gitlabID=$gitlabID&groupID=$gitlabGroup->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteGroup}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<?php js::set('gitlabID', $gitlabID)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='pull-left'>
|
||||
<?php echo html::backButton('<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', 'btn btn-secondary');?>
|
||||
<?php echo html::a($this->createLink('gitlab', 'browse'), "<i class='icon icon-back icon-sm'></i> " . $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
</div>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title"><?php echo $this->lang->gitlab->common . ':' . $gitlab->name; ?></div>
|
||||
@@ -62,12 +62,15 @@
|
||||
<td class='text-c-name' title='<?php echo $gitlabProject->name;?>'><?php echo $gitlabProject->name_with_namespace;?></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-treemap"></i> <?php echo $gitlabProject->forks_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->project->edit} class='btn btn-primary'");
|
||||
|
||||
common::printLink('gitlab', 'browseBranch', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-treemap'></i> ", '', "title='{$lang->gitlab->browseBranch}' class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'browseBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-branch-lock'></i> ", '', "title='{$lang->gitlab->branch->accessLevel}' class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", "<i class='icon icon-edit'></i> ", '', "title='{$lang->gitlab->project->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->deleteProject}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<td class='text' title='<?php echo substr($gitlabUser->lastActivityOn, 0, 10);?>'><?php echo substr($gitlabUser->lastActivityOn, 0, 10);?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<?php
|
||||
common::printLink('gitlab', 'editUser', "gitlabID=$gitlabID&userID=$gitlabUser->id", "<i class='icon icon-edit'></i> ", '', "title={$lang->gitlab->user->edit} class='btn btn-primary'");
|
||||
common::printLink('gitlab', 'editUser', "gitlabID=$gitlabID&userID=$gitlabUser->id", "<i class='icon icon-edit'></i> ", '', "title='{$lang->gitlab->user->edit}' class='btn btn-primary'");
|
||||
if(common::hasPriv('gitlab', 'delete')) echo html::a($this->createLink('gitlab', 'deleteUser', "gitlabID=$gitlabID&userID=$gitlabUser->id"), '<i class="icon-trash"></i>', 'hiddenwin', "title='{$lang->gitlab->deleteUser}' class='btn'");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* The create branch view file of gitlab module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yuchun Li <liyuchun@zcorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<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->createBranch;?></h2>
|
||||
</div>
|
||||
<form id='gitlabForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->branch->name;?></th>
|
||||
<td><?php echo html::input('branch', '', "class='form-control' placeholder='{$lang->gitlab->branch->name}'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->branch->from;?></th>
|
||||
<td><?php echo html::select('ref', $branchPairs, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton($lang->gitlab->branch->create);?>
|
||||
<?php $backLink = $this->session->gitlabBranchList ? $this->session->gitlabBranchList : inlink('browseBranch', "gitlibID=$gitlabID&projectID=$projectID");?>
|
||||
<?php if(!isonlybody()) echo html::a($backLink, $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view file of protext branch of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
|
||||
* @package gitlab
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='main-col main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $pageTitle;?></h2>
|
||||
</div>
|
||||
<form id='branchForm' method='post' class='form-ajax' enctype="multipart/form-data">
|
||||
<?php if($branch) echo html::hidden('name', $branch);?>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->branch->name;?></th>
|
||||
<td><?php echo html::select('name', $branches, $branchPriv->name, "class='form-control chosen' data-placeholder='{$lang->gitlab->branch->placeholderSelect}' " . ($branch ? 'disabled' : ''));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->branch->mergeAllowed;?></th>
|
||||
<td><?php echo html::select('merge_access_level', $lang->gitlab->branch->branchCreationLevelList, $branchPriv->mergeAccessLevel, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->branch->pushAllowed;?></th>
|
||||
<td><?php echo html::select('push_access_level', $lang->gitlab->branch->branchCreationLevelList, $branchPriv->pushAccessLevel, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(!isonlybody()) echo html::a(inlink('browseBranchPriv', "gitlabID=$gitlabID&projectID=$projectID"), $lang->goback, '', 'class="btn btn-wide"');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -43,7 +43,7 @@
|
||||
<td colspan='2'><?php echo nl2br(html::radio('visibility', $lang->gitlab->group->visibilityList, 'private', "", 'block'));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><?php echo $lang->gitlab->group->permission;?></th>
|
||||
<td>
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name='request_access_enabled' id="requestAccessEnabled" value='1' checked /><label for="external" class="no-margin"><?php echo $lang->gitlab->group->requestAccessEnabledTip; ?></label>
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="checkbox-primary">
|
||||
<input type="checkbox" name='lfs_enabled' id="lfsEnabled" value='1' checked /><label for="external" class="no-margin"><?php echo $lang->gitlab->group->lfsEnabledTip; ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->group->projectCreationLevel;?></th>
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<form id='gitlabForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->name;?></th>
|
||||
<th class='w-150px'><?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>
|
||||
<td class="tips-git w-p20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->url;?></th>
|
||||
|
||||
@@ -20,8 +20,9 @@
|
||||
<form id='gitlabForm' method='post' class='form-ajax'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->id;?></th>
|
||||
<th class='w-150px'><?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>
|
||||
<td class="tips-git w-p20"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->gitlab->project->name;?></th>
|
||||
|
||||
@@ -12,25 +12,31 @@
|
||||
<table class='table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th><?php echo $lang->gitlab->group->memberName;?></th>
|
||||
<th><?php echo $lang->gitlab->group->memberAccessLevel;?></th>
|
||||
<th class='c-names'><?php echo $lang->gitlab->group->memberName;?></th>
|
||||
<th class='c-levels'><?php echo $lang->gitlab->group->memberAccessLevel;?></th>
|
||||
<th class='c-date'><?php echo $lang->gitlab->group->memberExpiresAt;?></th>
|
||||
<th class="c-actions"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $ownerLevel = 50;?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($currentMembers as $member):?>
|
||||
<tr>
|
||||
<td><?php echo html::input("names[$i]", $member->name, "class='form-control' readonly");?></td>
|
||||
<td><?php echo html::select("levels[$i]", array(''=>'') + $this->lang->gitlab->accessLevels, $member->access_level, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<?php if($member->access_level == $ownerLevel):?>
|
||||
<input type="text" value="" class="form-control disabled" disabled autocomplete="off" />
|
||||
<?php echo html::input("expires[$i]", $member->expires_at, "class='form-control form-date hidden'");?>
|
||||
<?php else:?>
|
||||
<?php echo html::input("expires[$i]", $member->expires_at, "class='form-control form-date'");?>
|
||||
<?php endif;?>
|
||||
<?php echo html::hidden("ids[$i]", $member->id);?>
|
||||
</td>
|
||||
<td class='c-actions text-center'>
|
||||
<?php echo html::a('javascript:;', "<i class='icon-plus'></i>", '', "onclick='addItem(this)' class='btn btn-link'");?>
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-close'></i>", '', "onclick='deleteItem(this)' class='btn btn-link'");?>
|
||||
<?php echo html::a('javascript:;', "<i class='icon icon-close'></i>", '', "onclick='deleteItem(this)' class='btn btn-link" . ($member->access_level == $ownerLevel ? ' disabled' : '') . "'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<table class='table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th><?php echo $lang->gitlab->group->memberName;?></th>
|
||||
<th><?php echo $lang->gitlab->group->memberAccessLevel;?></th>
|
||||
<th class='c-names'><?php echo $lang->gitlab->group->memberName;?></th>
|
||||
<th class='c-levels'><?php echo $lang->gitlab->group->memberAccessLevel;?></th>
|
||||
<th class='c-date'><?php echo $lang->gitlab->group->memberExpiresAt;?></th>
|
||||
<th class="c-actions"><?php echo $lang->actions;?></th>
|
||||
<th></th>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('sysurl', common::getSysUrl());?>
|
||||
<style>.action-cell {margin-bottom: 10px;}</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="page-title">
|
||||
@@ -22,8 +23,13 @@
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->gitlab->url;?></div>
|
||||
<div class="detail-content article-content"><?php echo $gitlab->url;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='cell action-cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1245,9 +1245,15 @@ $lang->resource->gitlab->browseUser = 'browseUser';
|
||||
$lang->resource->gitlab->createUser = 'createUser';
|
||||
$lang->resource->gitlab->editUser = 'editUser';
|
||||
$lang->resource->gitlab->deleteUser = 'deleteUser';
|
||||
$lang->resource->gitlab->createBranch = 'createBranch';
|
||||
$lang->resource->gitlab->browseBranch = 'browseBranch';
|
||||
$lang->resource->gitlab->webhook = 'webhook';
|
||||
$lang->resource->gitlab->createWebhook = 'createWebhook';
|
||||
$lang->resource->gitlab->manageProjectMembers = 'manageProjectMembers';
|
||||
$lang->resource->gitlab->browseBranchPriv = 'browseBranchPriv';
|
||||
$lang->resource->gitlab->createBranchPriv = 'createBranchPriv';
|
||||
$lang->resource->gitlab->editBranchPriv = 'editBranchPriv';
|
||||
$lang->resource->gitlab->deleteBranchPriv = 'deleteBranchPriv';
|
||||
|
||||
$lang->gitlab->methodOrder[5] = 'browse';
|
||||
$lang->gitlab->methodOrder[10] = 'create';
|
||||
@@ -1269,9 +1275,11 @@ $lang->gitlab->methodOrder[90] = 'browseUser';
|
||||
$lang->gitlab->methodOrder[95] = 'createUser';
|
||||
$lang->gitlab->methodOrder[100] = 'editUser';
|
||||
$lang->gitlab->methodOrder[105] = 'deleteUser';
|
||||
$lang->gitlab->methodOrder[110] = 'webhook';
|
||||
$lang->gitlab->methodOrder[115] = 'createWebhook';
|
||||
$lang->gitlab->methodOrder[120] = 'manageProjectMembers';
|
||||
$lang->gitlab->methodOrder[110] = 'createBranch';
|
||||
$lang->gitlab->methodOrder[115] = 'browseBranch';
|
||||
$lang->gitlab->methodOrder[120] = 'webhook';
|
||||
$lang->gitlab->methodOrder[125] = 'createWebhook';
|
||||
$lang->gitlab->methodOrder[130] = 'manageProjectMembers';
|
||||
|
||||
/* merge request. */
|
||||
$lang->resource->mr = new stdclass();
|
||||
@@ -1290,7 +1298,7 @@ $lang->resource->mr->unlink = 'unlink';
|
||||
$lang->resource->mr->approval = 'approval';
|
||||
$lang->resource->mr->close = 'close';
|
||||
$lang->resource->mr->reopen = 'reopen';
|
||||
$lang->resource->mr->addBug = 'addBug';
|
||||
$lang->resource->mr->addReview = 'addReview';
|
||||
|
||||
$lang->mr->methodOrder[10] = 'create';
|
||||
$lang->mr->methodOrder[15] = 'browse';
|
||||
@@ -1307,7 +1315,7 @@ $lang->mr->methodOrder[75] = 'unlink';
|
||||
$lang->mr->methodOrder[80] = 'approval';
|
||||
$lang->mr->methodOrder[85] = 'close';
|
||||
$lang->mr->methodOrder[90] = 'reopen';
|
||||
$lang->mr->methodOrder[95] = 'addBug';
|
||||
$lang->mr->methodOrder[95] = 'addReview';
|
||||
|
||||
/* Git. */
|
||||
$lang->resource->git = new stdclass();
|
||||
|
||||
+14
-27
@@ -300,7 +300,7 @@ class mr extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function diff($MRID, $encoding= '')
|
||||
public function diff($MRID, $encoding = '')
|
||||
{
|
||||
$this->app->loadLang('productplan');
|
||||
$this->app->loadLang('bug');
|
||||
@@ -316,7 +316,7 @@ class mr extends control
|
||||
$this->view->rawMR = $rawMR;
|
||||
if(!isset($rawMR->id) or (isset($rawMR->message) and $rawMR->message == '404 Not found') or empty($rawMR)) return $this->display();
|
||||
|
||||
$diffs = $this->mr->getDiffs($MR, $encoding = '');
|
||||
$diffs = $this->mr->getDiffs($MR, $encoding);
|
||||
$arrange = $this->cookie->arrange ? $this->cookie->arrange : 'inline';
|
||||
|
||||
if($this->server->request_method == 'POST')
|
||||
@@ -455,7 +455,6 @@ class mr extends control
|
||||
$this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($product->id, 'story');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->stories = $stories;
|
||||
$this->view->summary = $this->loadModel('product')->summary($stories);
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->product = $product;
|
||||
@@ -782,49 +781,37 @@ class mr extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Bug for this review.
|
||||
* Add a review for this review.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $file
|
||||
* @param int $mr
|
||||
* @param int $v1
|
||||
* @param int $v2
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function addBug($repoID, $file, $v1, $v2)
|
||||
public function addReview($repoID, $mr, $v1, $v2)
|
||||
{
|
||||
/* Handle the exception that when $repoID is empty. */
|
||||
if($repoID == "0") $this->send(array());
|
||||
|
||||
$this->loadModel('repo');
|
||||
if($this->get->repoPath) $file = $this->get->repoPath;
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$result = $this->mr->saveBug($repoID, $file, $v1, $v2);
|
||||
if(dao::isError()) die(json_encode($result));
|
||||
if($this->post->reviewType == 'bug') $result = $this->mr->saveBug($repoID, $mr, $v1, $v2);
|
||||
if($this->post->reviewType == 'task') $result = $this->mr->saveTask($repoID, $mr, $v1, $v2);
|
||||
if($result['result'] == 'fail') die(json_encode($result));
|
||||
|
||||
$bugID = $result['id'];
|
||||
$objectID = $result['id'];
|
||||
$repo = $this->repo->getRepoById($repoID);
|
||||
/* Handle the exception that when $repo is empty. */
|
||||
if(empty($repo)) $this->send(array());
|
||||
if(empty($repo) or empty($result)) $this->send(json_encode(array()));
|
||||
|
||||
$entry = isset($repo->name) ? $repo->name . '/' . $this->repo->decodePath($file) : '';
|
||||
$location = sprintf($this->lang->repo->reviewLocation, $entry, $repo->SCM != 'Subversion' ? substr($v2, 0, 10) : $v2, $this->post->begin, $this->post->end);
|
||||
if(empty($v1))
|
||||
{
|
||||
$revision = $repo->SCM != 'Subversion' ? substr($v2, 0, 10) : $v2;
|
||||
$link = $this->repo->createLink('view', "repoID=$repoID&objectID=0&entry={$file}&revision=$v2&showBug=true") . '#L' . $this->post->begin;
|
||||
}
|
||||
else
|
||||
{
|
||||
$revision = $repo->SCM != 'Subversion' ? substr($v1, 0, 10) : $v1;
|
||||
$revision .= ' : ';
|
||||
$revision .= $repo->SCM != 'Subversion' ? substr($v2, 0, 10) : $v2;
|
||||
$link = $this->repo->createLink('diff', "repoID=$repoID&objectID=0&entry={$file}&oldRevision=$v1&newRevision=$v2&showBug=true") . '#L' . $this->post->begin;
|
||||
}
|
||||
$location = sprintf($this->lang->repo->reviewLocation, $this->post->entry ? base64_decode($this->post->entry) : '', $repo->SCM != 'Subversion' ? substr($v2, 0, 10) : $v2, $this->post->begin, $this->post->end);
|
||||
$link = $this->createLink('mr', 'diff', "mr=$mr") . '#L' . $this->post->begin;
|
||||
|
||||
$actionID = $this->loadModel('action')->create('bug', $bugID, 'repoCreated', '', html::a($link, $location));
|
||||
$this->loadModel('mail')->sendmail($bugID, $actionID);
|
||||
$actionID = $this->loadModel('action')->create($this->post->reviewType, $objectID, 'repoCreated', '', html::a($link, $location));
|
||||
$this->loadModel('mail')->sendmail($objectID, $actionID);
|
||||
|
||||
echo json_encode($result);
|
||||
}
|
||||
|
||||
+20
-20
@@ -88,8 +88,8 @@ h3 {font-size: 16px;}
|
||||
|
||||
/* repo action form */
|
||||
.repoCode .comment-list, .repoCode .comment-actions {max-width: 900px;}
|
||||
.repoCode .bugFormContainer {border: 1px solid #bbb; margin: 0 0 0 15px; padding: 10px 20px 10px 10px; max-width: 880px; background: #fff;}
|
||||
.repoCode .bugFormContainer th {width: 70px;}
|
||||
.repoCode .reviewFormContainer {border: 1px solid #bbb; margin: 0 0 0 15px; padding: 10px 20px 10px 10px; max-width: 880px; background: #fff;}
|
||||
.repoCode .reviewFormContainer th {width: 70px;}
|
||||
|
||||
.repoCode .action-row {display: none;}
|
||||
.repoCode .with-action-row .action-row {display: table-row;}
|
||||
@@ -106,26 +106,26 @@ h3 {font-size: 16px;}
|
||||
.repoCode .comment-cell .panel-body {padding: 6px 10px;}
|
||||
.repoCode .comment-cell .panel-actions.pull-right {margin-right: 0; margin-top: 0;}
|
||||
.repoCode .comment-cell .editing .panel-body, .repoCode .comment-cell .commentContainer.show-form .panel-body {display: none;}
|
||||
.repoCode .comment-cell .bug-edit-form, {padding: 10px; display: none;}
|
||||
.repoCode .comment-cell .editing .bug-edit-form, .repoCode .comment-cell .commentContainer.show-form .comment-edit-form {display: block;}
|
||||
.repoCode .comment-cell .review-edit-form, {padding: 10px; display: none;}
|
||||
.repoCode .comment-cell .editing .review-edit-form, .repoCode .comment-cell .commentContainer.show-form .comment-edit-form {display: block;}
|
||||
|
||||
.repoCode .comment {border: 1px solid #e5e5e5; background: #fafafa; padding: 5px 10px; margin-bottom: 10px;}
|
||||
.repoCode .comment .comment-edit-form {margin-top: 10px;}
|
||||
.repoCode .panel-bug .steps {background: #f1f1f1; padding: 5px 10px;}
|
||||
.repoCode .panel-bug .bug-edit-form {margin-bottom: 10px;}
|
||||
.repoCode .panel-bug .panel-body {display: none;}
|
||||
.repoCode .panel-bug .panel-heading {cursor: pointer;}
|
||||
.repoCode .panel-bug.show .panel-body {display: block;}
|
||||
.repoCode .panel-bug.show .icon-chevron-sign-down:before {content: '\e711';}
|
||||
.repoCode .panel-bug.show-edit-form .bug-edit-form,
|
||||
.repoCode .panel-bug.show-form .commentForm,
|
||||
.repoCode .panel-review .steps {background: #f1f1f1; padding: 5px 10px;}
|
||||
.repoCode .panel-review .review-edit-form {margin-bottom: 10px;}
|
||||
.repoCode .panel-review .panel-body {display: none;}
|
||||
.repoCode .panel-review .panel-heading {cursor: pointer;}
|
||||
.repoCode .panel-review.show .panel-body {display: block;}
|
||||
.repoCode .panel-review.show .icon-chevron-sign-down:before {content: '\e711';}
|
||||
.repoCode .panel-review.show-edit-form .review-edit-form,
|
||||
.repoCode .panel-review.show-form .commentForm,
|
||||
.repoCode .comment.show-form .comment-edit-form {display: block;}
|
||||
.repoCode .panel-bug .bug-edit-form,
|
||||
.repoCode .panel-bug.show-form .addComment,
|
||||
.repoCode .panel-bug .commentForm,
|
||||
.repoCode .panel-review .review-edit-form,
|
||||
.repoCode .panel-review.show-form .addComment,
|
||||
.repoCode .panel-review .commentForm,
|
||||
.repoCode .comment .comment-edit-form,
|
||||
.repoCode .panel-bug.show-edit-form .panel-body .title,
|
||||
.repoCode .panel-bug.show-edit-form .bug-date,
|
||||
.repoCode .panel-review.show-edit-form .panel-body .title,
|
||||
.repoCode .panel-review.show-edit-form .bug-date,
|
||||
.repoCode .comment.show-form .comment-content, .repoCode .comment.show-form .comment-date {display: none;}
|
||||
|
||||
.repoCode .text-content {white-space: normal; white-space: pre-line;}
|
||||
@@ -154,8 +154,8 @@ h3 {font-size: 16px;}
|
||||
.repoCode #diff tr.commented .row-tip {right: 0;}
|
||||
.repoCode #diff tr.commented .icon-chat-dot {left: 0;}
|
||||
|
||||
.repoCode .panel, .bugFormContainer {transition: border 0.4s;}
|
||||
.repoCode .panel.highlight, #bugForm.highlight .bugFormContainer {border-color: #e48600;}
|
||||
.repoCode .panel, .reviewFormContainer {transition: border 0.4s;}
|
||||
.repoCode .panel.highlight, #reviewForm.highlight .reviewFormContainer {border-color: #e48600;}
|
||||
|
||||
#bugsPreview {white-space: normal;}
|
||||
#bugsPreview .dropdown-menu {top: -100%; left: 30%; padding-top: 0; min-width: 300px; max-width: 500px;}
|
||||
@@ -166,7 +166,7 @@ h3 {font-size: 16px;}
|
||||
.icon-comments {position: relative; left: -50px;}
|
||||
|
||||
/* bug form */
|
||||
#bugForm, #bugForm table {margin: 0; padding: 0;}
|
||||
#reviewForm, #reviewForm table {margin: 0; padding: 0;}
|
||||
|
||||
.panel .table + .panel-footer {border-top: 0; background: #fff;}
|
||||
|
||||
|
||||
+118
-311
@@ -5,6 +5,13 @@ $(document).ready(function()
|
||||
$(".label-exchange").click(function(){ $('#exchange').submit();});
|
||||
});
|
||||
|
||||
/**
|
||||
* Change encoding.
|
||||
*
|
||||
* @param string $encoding
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function changeEncoding(encoding)
|
||||
{
|
||||
$('#encoding').val(encoding);
|
||||
@@ -14,11 +21,8 @@ function changeEncoding(encoding)
|
||||
$(document).ready(function()
|
||||
{
|
||||
var $diffCode = $('.diff');
|
||||
var hidePreview;
|
||||
var $bugsPreview = $('#bugsPreview');
|
||||
var $bugsPreviewMenu = $('#bugsPreview').children('.dropdown-menu');
|
||||
var $rows = $diffCode.find('tr');
|
||||
var rowTip = $('#rowTip').html();
|
||||
var $rows = $diffCode.find('tr');
|
||||
var rowTip = $('#rowTip').html();
|
||||
var lastLine;
|
||||
$rows.each(function()
|
||||
{
|
||||
@@ -48,13 +52,11 @@ $(document).ready(function()
|
||||
$(this).removeClass("over");
|
||||
});
|
||||
|
||||
var isInline = $.cookie('arrange') == 'inline';
|
||||
var $bugFormRow = $('<tr class="action-row"><th></th>' + (isInline ? '<th></th><td class="action-cell"></td>' : '<td colspan="3" class="action-cell"></td>') + '</tr>');
|
||||
var $bugForm = $('#bugForm');
|
||||
var $commentCell = $('#commentCell');
|
||||
var $bugPanel = $('#bugPanel');
|
||||
// $bugForm.find('input[name="begin"], input[name="end"]').attr('max', lastLine);
|
||||
$bugFormRow.find('td').append($bugForm.removeClass('hide'));
|
||||
var isInline = $.cookie('arrange') == 'inline';
|
||||
var $reviewFormRow = $('<tr class="action-row"><th></th>' + (isInline ? '<th></th><td class="action-cell"></td>' : '<td colspan="3" class="action-cell"></td>') + '</tr>');
|
||||
var $reviewForm = $('#reviewForm');
|
||||
var $reviewPanel = $('#reviewPanel');
|
||||
$reviewFormRow.find('td').append($reviewForm.removeClass('hide'));
|
||||
|
||||
var highlight = function($e)
|
||||
{
|
||||
@@ -62,76 +64,47 @@ $(document).ready(function()
|
||||
$e.addClass('highlight');
|
||||
};
|
||||
|
||||
var createComment = function(comment, $comments)
|
||||
var createReview = function(review, line, show)
|
||||
{
|
||||
console.log();
|
||||
var $comment = $commentCell.clone()
|
||||
.removeClass('hide')
|
||||
.attr('id', 'comment-' + comment.id)
|
||||
.attr('data-comment', comment.id);
|
||||
$comment.find('.realname').text(comment.realname);
|
||||
$comment.find('.comment-content').text(comment.comment);
|
||||
$comment.find('.date').text(comment.date);
|
||||
$comment.find('.edit').toggle(comment.edit);
|
||||
$comment.find('.comment-edit-form').attr('action', createLink('repo', 'editComment', 'commentID=' + comment.id));
|
||||
var $review = $reviewPanel.clone().removeClass('hide').attr('id', review.objectType + '-' + review.id);
|
||||
$review.find('.realname').text(review.realname);
|
||||
$review.find('.openedDate').text(review.openedDate);
|
||||
$review.find('.title').text(review.title);
|
||||
$review.find('.content').toggle(review.content != '').html(review.content);
|
||||
$review.find('.code-lines').text(review.lines);
|
||||
$review.find('input[name="objectID"]').val(review.id);
|
||||
$review.data(review);
|
||||
|
||||
if($comments)
|
||||
{
|
||||
if(typeof $comments !== 'object') $comments = $('#bug-' + $comments + ' .comments');
|
||||
($comments.hasClass('comments') ? $comments : $comments.find('.comments')).append($comment);
|
||||
}
|
||||
id = review.objectType == 'bug' ? 'Bug' : 'Task';
|
||||
id += '#' + review.id;
|
||||
if(review.view) id = "<a href='" + createLink(review.objectType, 'view', 'id=' + review.id) + "'>" + id + "</a>";
|
||||
$review.find('.title').closest('.panel-heading').find('.panel-actions').prepend(id);
|
||||
if(!review.delete) $review.find('.title').closest('.panel-heading').find('.panel-actions .reviewDelete').hide();
|
||||
|
||||
return $comment;
|
||||
};
|
||||
$review.toggleClass('show', show > 1);
|
||||
if(show > 2) highlight($review);
|
||||
|
||||
var createBug = function(bug, line, $commentRow, show)
|
||||
{
|
||||
var commentCount, j;
|
||||
var $bug = $bugPanel.clone().removeClass('hide').attr('id', 'bug-' + bug.id).attr('data-bug', bug.id);
|
||||
$bug.find('.bugid').text(bug.id);
|
||||
$bug.find('.realname').text(bug.realname);
|
||||
$bug.find('.openedDate').text(bug.openedDate);
|
||||
$bug.find('.title').text(bug.title);
|
||||
$bug.find('.steps').toggle(bug.steps != '').html(bug.steps);
|
||||
$bug.find('.edit').toggle(bug.edit);
|
||||
$bug.find('.code-lines').text(bug.lines);
|
||||
$bug.find('.delete').toggle(bug.delete);
|
||||
$bug.find('input[name="objectID"]').val(bug.id);
|
||||
$bug.find('.bug-edit-form').attr('action', createLink('repo', 'editBug', 'bugID=' + bug.id));
|
||||
$bug.find('a.view-bug').attr('href', createLink('bug', 'view', "bugID=" + bug.id));
|
||||
$bug.data('data', bug);
|
||||
$bug.toggleClass('show', show > 1);
|
||||
if(show > 2) highlight($bug);
|
||||
|
||||
if(bug.comments)
|
||||
{
|
||||
commentCount = bug.comments.length;
|
||||
$bugComments = $bug.find('.comments');
|
||||
for(j = 0; j < commentCount; j++)
|
||||
{
|
||||
createComment(bug.comments[j], $bugComments);
|
||||
}
|
||||
}
|
||||
|
||||
if(!line && bug.line) line = bug.line;
|
||||
if(!line && review.line) line = review.line;
|
||||
if(line)
|
||||
{
|
||||
if(!$commentRow)
|
||||
var $row = $rows.filter('[data-line="' + line + '"]').last();
|
||||
if(review.entry) $row = $('#diff[data-entry="' + review.entry + '"]').find('tr').filter('[data-line="' + line + '"]');
|
||||
if($row.length == 0) return false;
|
||||
|
||||
$commentRow = $row.next('tr');
|
||||
if($row.hasClass('commented')) $commentRow = $row.nextAll('tr.comment-row').first();
|
||||
if(!$commentRow.hasClass('comment-row'))
|
||||
{
|
||||
var $row = $rows.filter('[data-line="' + line + '"]').last();
|
||||
$commentRow = $row.next('tr');
|
||||
if(!$commentRow.hasClass('comment-row'))
|
||||
{
|
||||
$commentRow = $('<tr class="comment-row"><th></th>' + (isInline ? '<th></th><td class="comment-cell"><div class="comment-list"></div></td>' : '<td colspan="3" class="comment-cell"><div class="comment-list"></div></td>') + '</tr>');
|
||||
$row.addClass('commented').after($commentRow);
|
||||
}
|
||||
$commentRow = $('<tr class="comment-row"><th></th>' + (isInline ? '<th></th><td class="comment-cell"><div class="comment-list"></div></td>' : '<td colspan="3" class="comment-cell"><div class="comment-list"></div></td>') + '</tr>');
|
||||
$row.addClass('commented').after($commentRow);
|
||||
}
|
||||
($commentRow.hasClass('comment-list') ? $commentRow : $commentRow.find('.comment-list')).append($bug);
|
||||
|
||||
$commentRow.find('.comment-list').append($review);
|
||||
|
||||
if(show && $commentRow.hasClass('comment-row')) $commentRow.addClass('show');
|
||||
}
|
||||
|
||||
return $bug;
|
||||
return $review;
|
||||
};
|
||||
|
||||
var toggleComment = function($row, show)
|
||||
@@ -182,233 +155,50 @@ $(document).ready(function()
|
||||
$rows.removeClass('with-action-row')
|
||||
$row.addClass('with-action-row');
|
||||
|
||||
$bugForm.find('input[name="begin"]').val(line);
|
||||
$bugForm.find('input[name="end"]').attr('min', line).val(line);
|
||||
$bugForm.find('select#assignedTo').val(blamePairs[line]);
|
||||
$bugForm.find('select#assignedTo').trigger("chosen:updated");
|
||||
$reviewForm.find('input[name="begin"]').val(line);
|
||||
$reviewForm.find('input[name="end"]').attr('min', line).val(line);
|
||||
$reviewForm.find('select#assignedTo').trigger("chosen:updated");
|
||||
$reviewForm.find('input#entry').val($row.closest('table#diff').data('entry'));
|
||||
|
||||
$row.after($bugFormRow);
|
||||
$row.after($reviewFormRow);
|
||||
|
||||
KindEditor.remove('#commentText');
|
||||
$('#commentText').kindeditor();
|
||||
|
||||
var getCommiterLink = createLink('repo', 'ajaxgetcommitter', 'repoID=' + repoID + "&entry=" + file + "&revision=" + revision + "&line=" + line);
|
||||
var connector = getCommiterLink.indexOf('&') >= 0 ? '&' : '?';
|
||||
getCommiterLink = getCommiterLink + connector + 'entry=' + file;
|
||||
$.ajax({url: getCommiterLink}).done(function(responseText)
|
||||
{
|
||||
$bugForm.find('#assignedTo').val(responseText).trigger("chosen:updated");
|
||||
});
|
||||
}
|
||||
highlight($bugForm);
|
||||
$bugForm.find('input[name="title"]').focus();
|
||||
highlight($reviewForm);
|
||||
$reviewForm.find('input[name="title"]').focus();
|
||||
$row.addClass('selected');
|
||||
}
|
||||
e.stopPropagation();
|
||||
}).on('click', '.bugCancel', function()
|
||||
}).on('click', '.reviewDelete', function(e)
|
||||
{
|
||||
$rows.removeClass('selected');
|
||||
$diffCode.removeClass('with-action-row');
|
||||
}).on('click', '.bugEdit', function(e)
|
||||
{
|
||||
var $panelBug = $(this).closest('.panel-bug');
|
||||
var $review = $(this).closest('.panel-review');
|
||||
if(!$review.length) return;
|
||||
|
||||
if($panelBug.hasClass('show-edit-form'))
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
$panelBug.removeClass('show-edit-form');
|
||||
e.stopPropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
$panelBug.addClass('show show-edit-form').find('input[name="commentText"]').val($panelBug.find('.title').first().text()).focus();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}).on('submit', '.bug-edit-form', function()
|
||||
{
|
||||
var $form = $(this);
|
||||
$(this).ajaxSubmit(
|
||||
{
|
||||
success:function(text)
|
||||
{
|
||||
var $bug = $form.closest('.panel-bug');
|
||||
$bug.find('.title').text(text);
|
||||
$bug.removeClass('show-edit-form');
|
||||
},
|
||||
beforeSubmit:function(formData, jqForm)
|
||||
{
|
||||
var form = jqForm[0];
|
||||
if(!form.commentText.value)
|
||||
{
|
||||
alert(contentError);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}).on('click', '.bugEditCancel', function()
|
||||
{
|
||||
$(this).closest('.panel-bug').removeClass('show-edit-form');
|
||||
}).on('click', '.bugDelete', function(e)
|
||||
{
|
||||
var $bug = $(this).closest('.panel-bug');
|
||||
if(!$bug.length) return;
|
||||
|
||||
if(confirm(confirmDelete))
|
||||
{
|
||||
var link = createLink('repo', 'deleteBug', 'bugID=' + $bug.data('bug') + '&confirm=yes');
|
||||
var link = createLink($review.data('objectType'), 'delete', 'id=' + $review.data('id') + '&confirm=yes');
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'deleted')
|
||||
var $commentRow = $review.closest('.comment-row');
|
||||
if($commentRow.find('.panel-review').length === 1)
|
||||
{
|
||||
var $commentRow = $bug.closest('.comment-row');
|
||||
if($commentRow.find('.panel-bug').length === 1)
|
||||
{
|
||||
$commentRow.removeClass('show').prev('tr').removeClass('commented');
|
||||
}
|
||||
$bug.remove();
|
||||
$commentRow.removeClass('show').prev('tr').removeClass('commented');
|
||||
}
|
||||
$review.remove();
|
||||
});
|
||||
}
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}).on('click', '.addComment', function()
|
||||
{
|
||||
$(this).closest('.panel-bug').addClass('show-form').find('.commentForm textarea').focus();
|
||||
}).on('click', '.commentCancel', function()
|
||||
{
|
||||
$(this).closest('.panel-bug').removeClass('show-form');
|
||||
}).on('submit', '.commentForm', function()
|
||||
{
|
||||
var $form = $(this);
|
||||
$form.ajaxSubmit(
|
||||
{
|
||||
success:function(json)
|
||||
{
|
||||
var $panelBug = $form.closest('.panel-bug');
|
||||
$form.find('textarea').val('');
|
||||
$panelBug.removeClass('show-form');
|
||||
createComment($.parseJSON(json), $panelBug.data('bug'));
|
||||
},
|
||||
beforeSubmit:function(formData, jqForm)
|
||||
{
|
||||
var form = jqForm[0];
|
||||
if(!form.comment.value)
|
||||
{
|
||||
alert(commentError);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}).on('click', '.commentEdit', function()
|
||||
{
|
||||
var $comment = $(this).closest('.comment');
|
||||
|
||||
if($comment.hasClass('show-form'))
|
||||
{
|
||||
$comment.removeClass('show-form');
|
||||
return;
|
||||
}
|
||||
$comment.addClass('show-form').find('textarea').val($comment.find('.comment-content').text()).focus();
|
||||
}).on('click', '.commentEditCancel', function()
|
||||
{
|
||||
$(this).closest('.comment').removeClass('show-form');
|
||||
}).on('submit', '.comment-edit-form', function()
|
||||
{
|
||||
var $form = $(this);
|
||||
$form.ajaxSubmit(
|
||||
{
|
||||
success:function(html)
|
||||
{
|
||||
var $comment = $form.closest('.comment');
|
||||
$comment.find('.comment-content').html(html);
|
||||
$comment.removeClass('show-form');
|
||||
},
|
||||
beforeSubmit:function(formData, jqForm)
|
||||
{
|
||||
var form = jqForm[0];
|
||||
if(!form.commentText.value)
|
||||
{
|
||||
alert(contentError);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}).on('click', '.commentDelete', function()
|
||||
{
|
||||
var $container = $(this).closest('.commentContainer');
|
||||
if(!$container.length) return;
|
||||
|
||||
if(confirm(confirmDeleteComment))
|
||||
{
|
||||
var commentID = $container.data('comment');
|
||||
var link = createLink('repo', 'deleteComment', 'commentID=' + commentID + '&confirm=yes');
|
||||
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'deleted')
|
||||
{
|
||||
var $commentRow = $container.closest('.comment-row');
|
||||
if($commentRow.find('.bugContainer, .commentContainer').length === 1)
|
||||
{
|
||||
$commentRow.removeClass('show').prev('tr').removeClass('commented');
|
||||
}
|
||||
$container.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}).on('click', 'tr.commented', function()
|
||||
{
|
||||
toggleComment($(this));
|
||||
}).on('click', '.panel-bug > .panel-heading', function()
|
||||
}).on('click', '.panel-review > .panel-heading', function()
|
||||
{
|
||||
$(this).closest('.panel-bug').toggleClass('show');
|
||||
}).on('mouseenter', 'tr.commented td .preview-icon', function(e)
|
||||
{
|
||||
var $cell = $(this).closest('td');
|
||||
var $row = $cell.closest('tr');
|
||||
var $commentRow = $row.next('tr');
|
||||
|
||||
var $bugs = $commentRow.find('.panel-bug'), line = '?';
|
||||
$bugsPreviewMenu.children('li:not(.dropdown-header)').remove();
|
||||
$bugsPreviewMenu.find('.bug-count').text($bugs.length);
|
||||
$bugsPreviewMenu.find('.comment-count').text($commentRow.find('.comment').length);
|
||||
$bugs.each(function()
|
||||
{
|
||||
var bug = $(this).data('data');
|
||||
line = bug.line;
|
||||
$bugsPreviewMenu.append('<li><a href="javascript:;" data-id="#bug-' + bug.id + '"><small class="text-muted">#' + bug.id + '</small> ' + bug.title + '</a></li>');
|
||||
});
|
||||
$bugsPreviewMenu.find('.code-line').text(line);
|
||||
|
||||
$bugsPreview.prependTo($cell);
|
||||
clearTimeout(hidePreview);
|
||||
$bugsPreviewMenu.css({top: 0-$bugsPreviewMenu.outerHeight(), left: Math.max(0, e.offsetX-$bugsPreviewMenu.outerWidth())}).addClass('show');
|
||||
setTimeout(function(){$bugsPreviewMenu.addClass('in');}, 50);
|
||||
}).on('mouseleave', 'tr.commented td', function()
|
||||
{
|
||||
$bugsPreviewMenu.removeClass('in');
|
||||
hidePreview = setTimeout(function(){$bugsPreviewMenu.removeClass('show');}, 200);
|
||||
$(this).closest('.panel-review').toggleClass('show');
|
||||
});
|
||||
|
||||
$bugsPreviewMenu.on('click', 'li', function(e)
|
||||
{
|
||||
var $bug = $($(this).find('a').data('id'));
|
||||
if($bug.length)
|
||||
{
|
||||
$bug.addClass('show');
|
||||
toggleComment($bug.closest('tr.comment-row'), true);
|
||||
highlight($bug);
|
||||
|
||||
$bugsPreviewMenu.removeClass('in');
|
||||
hidePreview = setTimeout(function(){$bugsPreviewMenu.removeClass('show');}, 200);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
$bugForm.submit(function()
|
||||
$reviewForm.submit(function()
|
||||
{
|
||||
$(this).ajaxSubmit(
|
||||
{
|
||||
@@ -417,20 +207,42 @@ $(document).ready(function()
|
||||
json = $.parseJSON(json);
|
||||
if(json.result == 'fail')
|
||||
{
|
||||
alert(json.message);
|
||||
return false;
|
||||
var message = '';
|
||||
if(typeof(json.message) != 'string')
|
||||
{
|
||||
for(i in json.message)
|
||||
{
|
||||
if(typeof(json.message[i]) == 'string')
|
||||
{
|
||||
message += json.message[i] + '\n';
|
||||
}
|
||||
else
|
||||
{
|
||||
for(j in json.message[i])
|
||||
{
|
||||
message += json.message[i][j] + '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
message += json.message + '\n';
|
||||
}
|
||||
alert(message);
|
||||
return false;
|
||||
}
|
||||
|
||||
createBug(json, null, null, 3);
|
||||
createReview(json, json.line, 3);
|
||||
$diffCode.removeClass('with-action-row');
|
||||
$diffCode.find('tr.with-action-row.selected').removeClass('selected');
|
||||
$bugForm.find('#title').val('');
|
||||
$reviewForm.find('#title').val('');
|
||||
KindEditor.html('#commentText', '');
|
||||
},
|
||||
beforeSubmit:function(formData, jqForm)
|
||||
{
|
||||
var form = jqForm[0];
|
||||
if(!form.product.value)
|
||||
if(!form.product.value)
|
||||
{
|
||||
alert(productError);
|
||||
return false;
|
||||
@@ -438,7 +250,7 @@ $(document).ready(function()
|
||||
if(!form.title.value)
|
||||
{
|
||||
alert(titleError);
|
||||
$bugForm.find('input[name="title"]').focus();
|
||||
$reviewForm.find('input[name="title"]').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -447,27 +259,22 @@ $(document).ready(function()
|
||||
}).on('change', 'input[name="begin"]', function()
|
||||
{
|
||||
var begin = $(this).val();
|
||||
var $end = $bugForm.find('input[name="end"]').attr('min', begin);
|
||||
var $end = $reviewForm.find('input[name="end"]').attr('min', begin);
|
||||
if(parseInt($end.val()) < parseInt(begin))
|
||||
{
|
||||
$end.val(begin);
|
||||
}
|
||||
});
|
||||
|
||||
if(bugs)
|
||||
if(reviews)
|
||||
{
|
||||
var lineBugs, bugsCount, i;
|
||||
for(var line in bugs)
|
||||
var lineReviews;
|
||||
for(var line in reviews)
|
||||
{
|
||||
if(line)
|
||||
{
|
||||
lineBugs = bugs[line];
|
||||
bugsCount = lineBugs.length;
|
||||
|
||||
for(i = 0; i < bugsCount; i++)
|
||||
{
|
||||
createBug(lineBugs[i], line);
|
||||
}
|
||||
{
|
||||
lineReviews = reviews[line];
|
||||
for(var i in lineReviews) createReview(lineReviews[i], line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -479,30 +286,30 @@ $(document).ready(function()
|
||||
$('.highlight').removeClass('highlight');
|
||||
});
|
||||
|
||||
/**
|
||||
* Anchor
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function anchor()
|
||||
{
|
||||
var hash = window.location.hash;
|
||||
if(hash)
|
||||
var hash = window.location.hash;
|
||||
if(!hash) return false;
|
||||
|
||||
var line = hash.substr(1).replace('L', '');
|
||||
var $row = $('.diff tr[data-line="' + line +'"]').first();
|
||||
if($row.length) return false;
|
||||
|
||||
var anchor = $row.offset().top;
|
||||
$('body,html').animate({scrollTop:anchor - 50}, 500);
|
||||
|
||||
$row.addClass('highlight');
|
||||
if($row.hasClass('commented'))
|
||||
{
|
||||
var line = hash.substr(1).replace('L', '');
|
||||
var $row = $('.diff tr[data-line="' + line +'"]').first();
|
||||
if($row.length)
|
||||
{
|
||||
var anchor = $row.offset().top;
|
||||
|
||||
$('body,html').animate({scrollTop:anchor - 50}, 500);
|
||||
|
||||
$row.addClass('highlight');
|
||||
if($row.hasClass('commented'))
|
||||
{
|
||||
toggleComment($row, true);
|
||||
var $commentRow = $row.next('tr');
|
||||
if($commentRow.hasClass('comment-row'))
|
||||
{
|
||||
$commentRow.addClass('highlight');
|
||||
}
|
||||
}
|
||||
}
|
||||
toggleComment($row, true);
|
||||
var $commentRow = $row.next('tr');
|
||||
if($commentRow.hasClass('comment-row')) $commentRow.addClass('highlight');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
+13
-3
@@ -21,11 +21,11 @@ $lang->mr->linkStory = 'Link Stories';
|
||||
$lang->mr->linkBug = 'Link Bugs';
|
||||
$lang->mr->linkTask = 'Link Tasks';
|
||||
$lang->mr->unlink = 'UnLink of stories,Bugs,tasks';
|
||||
$lang->mr->addBug = 'Add Review';
|
||||
$lang->mr->addReview = 'Add Review';
|
||||
|
||||
$lang->mr->id = 'ID';
|
||||
$lang->mr->mriid = "raw MR ID";
|
||||
$lang->mr->title = 'Name';
|
||||
$lang->mr->title = 'Name';
|
||||
$lang->mr->status = 'Status';
|
||||
$lang->mr->author = 'Author';
|
||||
$lang->mr->assignee = 'Assignee';
|
||||
@@ -46,7 +46,12 @@ $lang->mr->reject = 'Reject';
|
||||
$lang->mr->close = 'Close';
|
||||
$lang->mr->reopen = 'Reopen';
|
||||
|
||||
$lang->mr->approvalResult = 'Approval result';
|
||||
$lang->mr->reviewType = 'Review Type';
|
||||
$lang->mr->reviewTypeList = array();
|
||||
$lang->mr->reviewTypeList['bug'] = 'Bug';
|
||||
$lang->mr->reviewTypeList['task'] = 'Task';
|
||||
|
||||
$lang->mr->approvalResult = 'Approval result';
|
||||
$lang->mr->approvalResultList = array();
|
||||
$lang->mr->approvalResultList['approve'] = 'Approve';
|
||||
$lang->mr->approvalResultList['reject'] = 'Reject';
|
||||
@@ -90,6 +95,7 @@ $lang->mr->notFound = "Merge Request does not exist!";
|
||||
$lang->mr->toCreatedMessage = "The merge request you submitted:<a href='%s'>%s</a>, the build task succeeded.";
|
||||
$lang->mr->toReviewerMessage = "You have one merge request <a href='%s'>%s</a> waiting.";
|
||||
$lang->mr->failMessage = "Your merge request <a href='%s'>%s</a> failed. Please check its execution result. ";
|
||||
$lang->mr->storySummary = "Total <strong>%s</strong> {$lang->SRCommon} on this page.";
|
||||
|
||||
$lang->mr->apiError = new stdclass;
|
||||
$lang->mr->apiError->createMR = "Failed to create a merge request through API. Reason: %s";
|
||||
@@ -100,6 +106,10 @@ $lang->mr->accessGitlabFailed = "Unable to connect to the GitLab server.";
|
||||
$lang->mr->reopenSuccess = "The merge request was reopened.";
|
||||
$lang->mr->closeSuccess = "Merge request closed.";
|
||||
|
||||
$lang->mr->apiErrorMap[0] = "You can't use same project/branch for source and target";
|
||||
|
||||
$lang->mr->errorLang[0] = 'The source project branch cannot be the same as the target project branch';
|
||||
|
||||
$lang->mr->from = "from";
|
||||
$lang->mr->to = "to";
|
||||
$lang->mr->at = "at";
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->mr->linkStory = '关联需求';
|
||||
$lang->mr->linkBug = '关联Bug';
|
||||
$lang->mr->linkTask = '关联任务';
|
||||
$lang->mr->unlink = '取消关联需求、Bug、任务';
|
||||
$lang->mr->addBug = '添加评审';
|
||||
$lang->mr->addReview = '添加评审';
|
||||
|
||||
$lang->mr->id = 'ID';
|
||||
$lang->mr->mriid = "MR原始ID";
|
||||
@@ -46,7 +46,12 @@ $lang->mr->reject = '拒绝';
|
||||
$lang->mr->close = '关闭';
|
||||
$lang->mr->reopen = '重新打开';
|
||||
|
||||
$lang->mr->approvalResult = '评审意见';
|
||||
$lang->mr->reviewType = '评审类型';
|
||||
$lang->mr->reviewTypeList = array();
|
||||
$lang->mr->reviewTypeList['bug'] = 'Bug';
|
||||
$lang->mr->reviewTypeList['task'] = '任务';
|
||||
|
||||
$lang->mr->approvalResult = '评审意见';
|
||||
$lang->mr->approvalResultList = array();
|
||||
$lang->mr->approvalResultList['approve'] = '通过';
|
||||
$lang->mr->approvalResultList['reject'] = '拒绝';
|
||||
@@ -90,6 +95,7 @@ $lang->mr->notFound = "此{$lang->mr->common}不存在。";
|
||||
$lang->mr->toCreatedMessage = "您提交的合并请求:<a href='%s'>%s</a> 构建任务执行通过。";
|
||||
$lang->mr->toReviewerMessage = "有一个合并请求:<a href='%s'>%s</a> 待审核。";
|
||||
$lang->mr->failMessage = "您提交的合并请求:<a href='%s'>%s</a> 构建任务执行失败,查看执行结果。";
|
||||
$lang->mr->storySummary = "本页共 <strong>%s</strong> 个" . $lang->SRCommon;
|
||||
|
||||
$lang->mr->apiError = new stdclass;
|
||||
$lang->mr->apiError->createMR = "通过API创建合并请求失败,失败原因:%s";
|
||||
@@ -100,6 +106,10 @@ $lang->mr->accessGitlabFailed = "当前无法连接到GitLab服务器。";
|
||||
$lang->mr->reopenSuccess = "已重新打开合并请求。";
|
||||
$lang->mr->closeSuccess = "已关闭合并请求。";
|
||||
|
||||
$lang->mr->apiErrorMap[0] = "You can't use same project/branch for source and target";
|
||||
|
||||
$lang->mr->errorLang[0] = '源项目分支与目标项目分支不能相同';
|
||||
|
||||
$lang->mr->from = "从";
|
||||
$lang->mr->to = "合并到";
|
||||
$lang->mr->at = "于";
|
||||
|
||||
+166
-43
@@ -134,7 +134,10 @@ class mrModel extends model
|
||||
if(isset($rawMR->message) and !isset($rawMR->iid))
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_MR)->where('id')->eq($MRID)->exec();
|
||||
return array('result' => 'fail', 'message' => sprintf($this->lang->mr->apiError->createMR, $rawMR->message[0]));
|
||||
|
||||
$errorKey = array_search($rawMR->message[0], $this->lang->mr->apiErrorMap);
|
||||
$errorMessage = zget($this->lang->mr->errorLang, $errorKey);
|
||||
return array('result' => 'fail', 'message' => sprintf($this->lang->mr->apiError->createMR, $errorMessage));
|
||||
}
|
||||
|
||||
/* Create MR failed. */
|
||||
@@ -549,7 +552,7 @@ class mrModel extends model
|
||||
public function getDiffs($MR, $encoding = '')
|
||||
{
|
||||
$diffVersions = $this->apiGetDiffVersions($MR->gitlabID, $MR->targetProject, $MR->mriid);
|
||||
$gitlab = $this->gitlab->getByID($MR->gitlabID);
|
||||
$gitlab = $this->gitlab->getByID($MR->gitlabID);
|
||||
|
||||
$this->loadModel('repo');
|
||||
$repo = new stdclass;
|
||||
@@ -567,10 +570,10 @@ class mrModel extends model
|
||||
foreach ($diffVersions as $diffVersion)
|
||||
{
|
||||
$singleDiff = $this->apiGetSingleDiffVersion($MR->gitlabID, $MR->targetProject, $MR->mriid, $diffVersion->id);
|
||||
if ($singleDiff->state == 'empty') continue;
|
||||
if($singleDiff->state == 'empty') continue;
|
||||
$commits = $singleDiff->commits;
|
||||
$diffs = $singleDiff->diffs;
|
||||
foreach ($diffs as $index => $diff)
|
||||
foreach($diffs as $index => $diff)
|
||||
{
|
||||
if(empty($commits[$index])) continue;
|
||||
/* Make sure every file with same commitID is unique in $lines. */
|
||||
@@ -583,9 +586,10 @@ class mrModel extends model
|
||||
$lines[] = sprintf("--a/%s", $diff->old_path);
|
||||
$lines[] = sprintf("--b/%s", $diff->new_path);
|
||||
$diffLines = explode("\n", $diff->diff);
|
||||
foreach ($diffLines as $diffLine) $lines[] = $diffLine;
|
||||
foreach($diffLines as $diffLine) $lines[] = $diffLine;
|
||||
}
|
||||
}
|
||||
|
||||
$scm = $this->app->loadClass('scm');
|
||||
$scm->setEngine($repo);
|
||||
$diff = $scm->engine->parseDiff($lines);
|
||||
@@ -782,45 +786,48 @@ class mrModel extends model
|
||||
* Get review.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param int $MRID
|
||||
* @param string $revision
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getReview($repoID, $entry, $revision)
|
||||
public function getReview($repoID, $MRID, $revision = '')
|
||||
{
|
||||
if(empty($repoID) or empty($MRID)) return array();
|
||||
|
||||
$reviews = array();
|
||||
$bugs = $this->dao->select('t1.*, t2.realname')->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')
|
||||
->on('t1.openedBy = t2.account')
|
||||
->where('t1.repo')->eq($repoID)
|
||||
->andWhere('t1.entry')->eq($entry)
|
||||
->andWhere('t1.v2')->eq($revision)
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.openedBy = t2.account')
|
||||
->where('t1.repo')->eq((int)$repoID)
|
||||
->andWhere('t1.mr')->eq((int)$MRID)
|
||||
->beginIF($revision)->andWhere('t1.v2')->eq($revision)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
$comments = $this->dao->select('t1.*, t2.realname')->from(TABLE_ACTION)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')
|
||||
->on('t1.actor = t2.account')
|
||||
->where('t1.objectType')->eq('bug')
|
||||
->andWhere('t1.objectID')->in(array_keys($bugs))
|
||||
->andWhere('t1.action')->eq('commented')
|
||||
->fetchGroup('objectID', 'id');
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
if(common::hasPriv('bug', 'edit')) $bug->edit = true;
|
||||
if(common::hasPriv('bug', 'delete')) $bug->delete = true;
|
||||
if(common::hasPriv('bug', 'view')) $bug->view = true;
|
||||
$lines = explode(',', trim($bug->lines, ','));
|
||||
$line = $lines[0];
|
||||
$reviews[$line]['bugs'][$bug->id] = $bug;
|
||||
$reviews[$line]['bug'][$bug->id] = $bug;
|
||||
}
|
||||
|
||||
if(isset($comments[$bug->id]))
|
||||
{
|
||||
foreach($comments[$bug->id] as $key => $comment)
|
||||
{
|
||||
if($comment->actor == $this->app->user->account) $comment->edit = true;
|
||||
}
|
||||
$reviews[$line]['comments'] = $comments;
|
||||
}
|
||||
$tasks = $this->dao->select('t1.*, t2.realname')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.openedBy = t2.account')
|
||||
->where('t1.repo')->eq((int)$repoID)
|
||||
->andWhere('t1.mr')->eq((int)$MRID)
|
||||
->beginIF($revision)->andWhere('t1.v2')->eq($revision)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
if(common::hasPriv('task', 'edit')) $task->edit = true;
|
||||
if(common::hasPriv('task', 'delete')) $task->delete = true;
|
||||
if(common::hasPriv('task', 'view')) $task->view = true;
|
||||
$lines = explode(',', trim($task->lines, ','));
|
||||
$line = $lines[0];
|
||||
$reviews[$line]['task'][$task->id] = $task;
|
||||
}
|
||||
|
||||
return $reviews;
|
||||
@@ -878,43 +885,154 @@ class mrModel extends model
|
||||
* Save bug.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $file
|
||||
* @param int $mr
|
||||
* @param int $v1
|
||||
* @param int $v2
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function saveBug($repoID, $file, $v1, $v2)
|
||||
public function saveBug($repoID, $mr, $v1, $v2)
|
||||
{
|
||||
$now = helper::now();
|
||||
$data = fixer::input('post')
|
||||
->add('severity', 3)
|
||||
->stripTags('commentText', $this->config->allowedTags)
|
||||
->add('pri', 2)
|
||||
->add('severity', 2)
|
||||
->add('openedBy', $this->app->user->account)
|
||||
->add('openedDate', $now)
|
||||
->add('openedBuild', 'trunk')
|
||||
->add('assignedDate', $now)
|
||||
->add('type', 'codeimprovement')
|
||||
->add('type', 'codeerror')
|
||||
->add('repo', $repoID)
|
||||
->add('entry', $file)
|
||||
->add('mr', $mr)
|
||||
->add('lines', $this->post->begin . ',' . $this->post->end)
|
||||
->add('v1', $v1)
|
||||
->add('v2', $v2)
|
||||
->remove('commentText,begin,end,uid')
|
||||
->cleanInt('module,execution,mr,repo')
|
||||
->remove('begin,end,uid,reviewType,taskExecution,taskModule,taskAssignedTo')
|
||||
->get();
|
||||
|
||||
$data->steps = $this->loadModel('file')->pasteImage($this->post->commentText, $this->post->uid);
|
||||
$this->dao->insert(TABLE_BUG)->data($data)->exec();
|
||||
$data->steps = $this->loadModel('file')->pasteImage($data->commentText, $this->post->uid);
|
||||
if($data->assignedTo) $data->assignedDate = $now;
|
||||
unset($data->commentText);
|
||||
|
||||
$this->loadModel('bug');
|
||||
foreach(explode(',', $this->config->bug->create->requiredFields . ',repo,mr') as $requiredField)
|
||||
{
|
||||
$requiredField = trim($requiredField);
|
||||
if(empty($requiredField)) continue;
|
||||
if(!isset($data->$requiredField)) continue;
|
||||
if(empty($data->$requiredField))
|
||||
{
|
||||
$fieldName = $requiredField;
|
||||
if(isset($this->lang->bug->$requiredField)) $fieldName = $this->lang->bug->$requiredField;
|
||||
dao::$errors[$requiredField][] = sprintf($this->lang->error->notempty, $fieldName);
|
||||
}
|
||||
}
|
||||
if(dao::isError()) return array('result' => 'fail', 'message' => dao::getError());
|
||||
|
||||
$this->dao->insert(TABLE_BUG)->data($data)->autocheck()->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$bugID = $this->dao->lastInsertID();
|
||||
$this->file->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
$this->loadModel('file')->updateObjectID($this->post->uid, $bugID, 'bug');
|
||||
setcookie("repoPairs[$repoID]", $data->product);
|
||||
|
||||
return array('result' => 'success', 'id' => $bugID, 'realname' => $this->app->user->realname, 'openedDate' => substr($now, 5, 11), 'edit' => true, 'delete' => true, 'lines' => $data->lines, 'line' => $this->post->begin, 'steps' => $data->steps, 'title' => $data->title);
|
||||
$bugInfo = array();
|
||||
$bugInfo['result'] = 'success';
|
||||
$bugInfo['id'] = $bugID;
|
||||
$bugInfo['realname'] = $this->app->user->realname;
|
||||
$bugInfo['openedDate'] = substr($now, 5, 11);
|
||||
$bugInfo['edit'] = common::hasPriv('bug', 'edit');
|
||||
$bugInfo['view'] = common::hasPriv('bug', 'view');
|
||||
$bugInfo['delete'] = common::hasPriv('bug', 'delete');
|
||||
$bugInfo['lines'] = $data->lines;
|
||||
$bugInfo['line'] = $this->post->begin;
|
||||
$bugInfo['content'] = $data->steps;
|
||||
$bugInfo['title'] = $data->title;
|
||||
$bugInfo['objectType'] = 'bug';
|
||||
$bugInfo['entry'] = $data->entry;
|
||||
return $bugInfo;
|
||||
}
|
||||
|
||||
return array('result' => 'fail', 'message' => join("\n", dao::getError()));
|
||||
return array('result' => 'fail', 'message' => dao::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* Save task.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $mr
|
||||
* @param int $v1
|
||||
* @param int $v2
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function saveTask($repoID, $mr, $v1, $v2)
|
||||
{
|
||||
$now = helper::now();
|
||||
$data = fixer::input('post')->stripTags('commentText', $this->config->allowedTags)->get();
|
||||
|
||||
$task = new stdclass();
|
||||
$task->execution = (int)$data->taskExecution;
|
||||
$task->project = (int)$this->dao->select('project')->from(TABLE_PROJECT)->where('id')->eq($task->execution)->fetch('project');
|
||||
$task->module = (int)$data->taskModule;
|
||||
$task->name = $data->title;
|
||||
$task->type = 'devel';
|
||||
$task->pri = '2';
|
||||
$task->status = 'wait';
|
||||
$task->version = '1';
|
||||
$task->openedBy = $this->app->user->account;
|
||||
$task->assignedTo = $data->taskAssignedTo;
|
||||
$task->repo = (int)$repoID;
|
||||
$task->mr = (int)$mr;
|
||||
$task->lines = $this->post->begin . ',' . $this->post->end;
|
||||
$task->entry = $data->entry;
|
||||
$task->v1 = $v1;
|
||||
$task->v2 = $v2;
|
||||
$task->desc = $this->loadModel('file')->pasteImage($data->commentText, $this->post->uid);
|
||||
if($task->assignedTo) $task->assignedDate = $now;
|
||||
|
||||
$this->loadModel('task');
|
||||
foreach(explode(',', $this->config->task->create->requiredFields . ',repo,mr') as $requiredField)
|
||||
{
|
||||
$requiredField = trim($requiredField);
|
||||
if(empty($requiredField)) continue;
|
||||
if(!isset($task->$requiredField)) continue;
|
||||
if(empty($task->$requiredField))
|
||||
{
|
||||
$fieldName = $requiredField;
|
||||
if(isset($this->lang->task->$requiredField)) $fieldName = $this->lang->task->$requiredField;
|
||||
dao::$errors[$requiredField][] = sprintf($this->lang->error->notempty, $fieldName);
|
||||
}
|
||||
}
|
||||
if(dao::isError()) return array('result' => 'fail', 'message' => dao::getError());
|
||||
|
||||
$this->dao->insert(TABLE_TASK)->data($task)->autocheck()->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$taskID = $this->dao->lastInsertID();
|
||||
$this->file->updateObjectID($this->post->uid, $taskID, 'task');
|
||||
|
||||
$taskInfo = array();
|
||||
$taskInfo['result'] = 'success';
|
||||
$taskInfo['id'] = $taskID;
|
||||
$taskInfo['realname'] = $this->app->user->realname;
|
||||
$taskInfo['openedDate'] = substr($now, 5, 11);
|
||||
$taskInfo['edit'] = common::hasPriv('task', 'edit');
|
||||
$taskInfo['view'] = common::hasPriv('task', 'view');
|
||||
$taskInfo['delete'] = common::hasPriv('task', 'delete');
|
||||
$taskInfo['lines'] = $task->lines;
|
||||
$taskInfo['line'] = $this->post->begin;
|
||||
$taskInfo['content'] = $task->desc;
|
||||
$taskInfo['title'] = $data->title;
|
||||
$taskInfo['objectType'] = 'task';
|
||||
$taskInfo['entry'] = $task->entry;
|
||||
return $taskInfo;
|
||||
}
|
||||
|
||||
return array('result' => 'fail', 'message' => dao::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -960,13 +1078,18 @@ class mrModel extends model
|
||||
/**
|
||||
* Get last review info.
|
||||
*
|
||||
* @param string $entry
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getLastReviewInfo($entry)
|
||||
public function getLastReviewInfo($repoID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)->where('entry')->eq($entry)->orderby('id_desc')->fetch();
|
||||
if(empty($repoID)) return null;
|
||||
|
||||
$lastReview = new stdclass();
|
||||
$lastReview->bug = $this->dao->select('*')->from(TABLE_BUG)->where('repo')->eq((int)$repoID)->orderby('id_desc')->fetch();
|
||||
$lastReview->task = $this->dao->select('*')->from(TABLE_TASK)->where('repo')->eq((int)$repoID)->orderby('id_desc')->fetch();
|
||||
return $lastReview;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<?php
|
||||
common::printLink('mr', 'view', "mr={$MR->id}", '<i class="icon icon-eye"></i>', '', "title='{$lang->mr->overview}' class='btn btn-info'");
|
||||
common::printLink('mr', 'edit', "mr={$MR->id}", '<i class="icon icon-edit"></i>', '', "title='{$lang->mr->edit}' class='btn btn-info'");
|
||||
common::printLink('mr', 'diff', "mr={$MR->id}", '<i class="icon icon-review"></i>', '', "title='{$lang->mr->viewDiff}' class='btn btn-info'");
|
||||
common::printLink('mr', 'diff', "mr={$MR->id}", '<i class="icon icon-diff"></i>', '', "title='{$lang->mr->viewDiff}' class='btn btn-info'");
|
||||
common::printLink('mr', 'link', "mr={$MR->id}", '<i class="icon icon-link"></i>', '', "title='{$lang->mr->link}' class='btn btn-info'" . ($MR->linkButton == false ? 'disabled' : ''));
|
||||
common::printLink('mr', 'delete', "mr={$MR->id}", '<i class="icon icon-trash"></i>', 'hiddenwin', "title='{$lang->mr->delete}' class='btn btn-info'");
|
||||
?>
|
||||
|
||||
@@ -55,10 +55,13 @@
|
||||
<div class='btn-toolbar'>
|
||||
<div class='btn-group'>
|
||||
<div class='btn-group'>
|
||||
<?php echo html::commonButton(zget($lang->repo->encodingList, $encoding, $lang->repo->encoding) . "<span class='caret'></span>", "data-toggle='dropdown'", 'btn dropdown-toggle btn-sm')?>
|
||||
<?php $encoding = str_replace('-', '_', $encoding);?>
|
||||
<?php echo html::commonButton(zget($lang->repo->encodingList, $encoding, $lang->repo->encodingList['utf_8']) . "<span class='caret'></span>", "data-toggle='dropdown'", 'btn dropdown-toggle btn-sm')?>
|
||||
<ul class='dropdown-menu' role='menu'>
|
||||
<?php foreach($lang->repo->encodingList as $key => $val):?>
|
||||
<li><?php echo html::a('javascript:changeEncoding("'. $key . '")', $val)?></li>
|
||||
<li <?php echo $key == $encoding ? "class='active'" : '';?>>
|
||||
<?php echo html::a('javascript:changeEncoding("'. $key . '")', $val)?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -69,7 +72,7 @@
|
||||
</div>
|
||||
<?php foreach($diffs as $diffFile):?>
|
||||
<div class='repoCode'>
|
||||
<table class='table diff' id='diff'>
|
||||
<table class='table diff' id='diff' data-entry='<?php echo base64_encode($diffFile->fileName);?>'>
|
||||
<caption><?php echo $diffFile->fileName;?></caption>
|
||||
<?php if(empty($diffFile->contents)) continue;?>
|
||||
<?php foreach($diffFile->contents as $content):?>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
$file= '';
|
||||
$suffix = '';
|
||||
/* get last review info in this file. */
|
||||
$lastReview = $this->mr->getLastReviewInfo($file);
|
||||
$repoModule = isset($lastReview) && isset($lastReview->module) ? $lastReview->module : '';
|
||||
$lastReview = $this->mr->getLastReviewInfo($repo->id);
|
||||
|
||||
/* Get product pairs. */
|
||||
if(isset($repo->product) and $repo->product)
|
||||
@@ -16,111 +13,97 @@ else
|
||||
}
|
||||
|
||||
/* get product by cookie or last review in this file. */
|
||||
$repoProduct = isset($_COOKIE['repoPairs'][$repoID]) ? $_COOKIE['repoPairs'][$repoID] : '';
|
||||
$repoProduct = isset($lastReview) && isset($lastReview->product) ? $lastReview->product : $repoProduct;
|
||||
$repoProduct = isset($products[$repoProduct]) ? $repoProduct : key($products);
|
||||
$executions = $this->mr->getExecutionPairs($repoProduct);
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($repoProduct, $viewType = 'bug', $startModuleID = 0);
|
||||
$users = $this->loadModel('user')->getPairs('devfirst|nodeleted|noclosed');
|
||||
$products = array('' => '') + $products;
|
||||
$executions = array('' => '') + $executions;
|
||||
$repoProduct = isset($_COOKIE['repoPairs'][$repoID]) ? $_COOKIE['repoPairs'][$repoID] : '';
|
||||
$repoProduct = (!empty($lastReview->bug) && isset($lastReview->bug->product)) ? $lastReview->bug->product : $repoProduct;
|
||||
$repoProduct = isset($products[$repoProduct]) ? $repoProduct : key($products);
|
||||
$bugRepoModule = (!empty($lastReview->bug) && $lastReview->bug->product == $repoProduct) ? $lastReview->bug->module : '';
|
||||
$executions = $this->mr->getExecutionPairs($repoProduct);
|
||||
$modules = $this->loadModel('tree')->getOptionMenu($repoProduct, $viewType = 'bug', $startModuleID = 0);
|
||||
$users = $this->loadModel('user')->getPairs('devfirst|nodeleted|noclosed');
|
||||
$products = array('' => '') + $products;
|
||||
$executions = array('' => '') + $executions;
|
||||
|
||||
$cwd = getcwd();
|
||||
$commiters = $this->user->getCommiters();
|
||||
$blamePairs = array();
|
||||
if($suffix and $suffix != 'binary' and strpos($this->config->repo->images, "|$suffix|") === false)
|
||||
$taskExecutions = $executions;
|
||||
if(empty($repo->product)) $taskExecutions = array('' => '') + $this->loadModel('execution')->getPairs();
|
||||
$repoExecution = (!empty($lastReview->task) && isset($lastReview->task->execution)) ? $lastReview->task->execution : $this->session->execution;
|
||||
$repoExecution = isset($taskExecutions[$repoExecution]) ? $repoExecution : key($taskExecutions);
|
||||
$taskModules = array('' => '');
|
||||
$taskRepoModule = 0;
|
||||
$taskMembers = array('' => '');
|
||||
if($repoExecution)
|
||||
{
|
||||
$blames = $this->scm->blame($entry, $info->revision);
|
||||
foreach($blames as $line => $blame)
|
||||
{
|
||||
if(!isset($blame['committer']))
|
||||
{
|
||||
if(isset($blamePairs[$line - 1])) $blamePairs[$line] = $blamePairs[$line - 1];
|
||||
continue;
|
||||
}
|
||||
$blamePairs[$line] = zget($commiters, $blame['committer'], $blame['committer']);
|
||||
}
|
||||
$taskModules = $this->loadModel('tree')->getTaskOptionMenu($repoExecution, 0, 0, 'allModule');
|
||||
$taskRepoModule = (!empty($lastReview->task) && $lastReview->task->execution == $repoExecution) ? $lastReview->task->module : '';
|
||||
$taskMembers = $this->loadModel('user')->getTeamMemberPairs($repoExecution, 'execution', 'nodeleted');
|
||||
}
|
||||
chdir($cwd);
|
||||
|
||||
//$reviews = $this->mr->getReview($repoID, $file, $info->revision);
|
||||
$reviews = $this->mr->getReview($repoID, $file, '');
|
||||
$v1 = isset($oldRevision) ? $oldRevision : 0;
|
||||
$reviews = $this->mr->getReview($repoID, $MR->id);
|
||||
$v1 = isset($oldRevision) ? $oldRevision : 0;
|
||||
|
||||
$this->loadModel('repo');
|
||||
// $bugUrl = $this->repo->createLink('addBug', "repoID=$repoID&file=$file&v1=$v1&v2={$info->revision}");
|
||||
$bugUrl = $this->createLink('mr', 'addBug', "repoID=$repoID&file=$file&v1=$v1&v2=");
|
||||
$commentUrl = $this->createLink('mr', 'addComment');
|
||||
|
||||
$taskModuleSelect = html::select('taskModule', $taskModules, $taskRepoModule, 'class="form-control chosen"');
|
||||
$taskUserSelect = html::select('taskAssignedTo', $taskMembers, '', 'class="form-control chosen"');
|
||||
$taskExecutionSelect = html::select('taskExecution', $taskExecutions, $repoExecution, 'class="form-control chosen" onchange="changeExecution(this)"');
|
||||
|
||||
$reviewUrl = $this->createLink('mr', 'addReview', "repoID=$repoID&mr={$MR->id}&v1=$v1&v2=");
|
||||
$productSelect = html::select('product', $products, $repoProduct, 'class="product form-control chosen" onchange="changeProduct(this)"');
|
||||
$branches = $this->loadModel('branch')->getPairs($repoProduct);
|
||||
$moduleSelect = html::select('module', $modules, $repoModule, 'class="form-control chosen"');
|
||||
$moduleSelect = html::select('module', $modules, $bugRepoModule, 'class="form-control chosen"');
|
||||
$executionSelect = html::select('execution', $executions, '', 'class="form-control chosen"');
|
||||
$typeSelect = html::select('repoType', $lang->repo->typeList, '', 'class="form-control chosen"');
|
||||
$userSelect = html::select('assignedTo', $users, '', 'class="form-control chosen assignedTo"');
|
||||
$bugs = array();
|
||||
|
||||
$lineReviews = array();
|
||||
foreach($reviews as $line => $lineReview)
|
||||
{
|
||||
$lineBugs = array();
|
||||
foreach ($lineReview['bugs'] as $bugID => $bug)
|
||||
foreach($lineReview as $objectType => $objects)
|
||||
{
|
||||
$lineBug = array();
|
||||
$lineBug['id'] = $bugID;
|
||||
$lineBug['line'] = $line;
|
||||
$lineBug['title'] = $bug->title;
|
||||
$lineBug['steps'] = $bug->steps;
|
||||
$lineBug['realname'] = $bug->realname;
|
||||
$lineBug['openedDate'] = substr($bug->openedDate, 5, 11);
|
||||
$lineBug['lines'] = $bug->lines;
|
||||
if($bug->edit) $lineBug['edit'] = true;
|
||||
if($bug->delete) $lineBug['delete'] = true;
|
||||
|
||||
if(isset($lineReview['comments']))
|
||||
foreach($objects as $objectID => $object)
|
||||
{
|
||||
if(isset($lineReview['comments'][$bugID]))
|
||||
{
|
||||
$comments = $lineReview['comments'][$bugID];
|
||||
$bugComments = array();
|
||||
foreach ($comments as $commentID => $comment)
|
||||
{
|
||||
$bugComment = array(
|
||||
'id' => $comment->id,
|
||||
'edit' => $comment->edit,
|
||||
'realname' => $comment->realname,
|
||||
'date' => substr($comment->date, 5, 11),
|
||||
'comment' => $comment->comment,
|
||||
);
|
||||
$bugComments[] = $bugComment;
|
||||
}
|
||||
$lineBug['comments'] = $bugComments;
|
||||
}
|
||||
$lineReview = array();
|
||||
$lineReview['id'] = $objectID;
|
||||
$lineReview['line'] = $line;
|
||||
$lineReview['title'] = $objectType == 'bug' ? $object->title : $object->name;
|
||||
$lineReview['content'] = $objectType == 'bug' ? $object->steps : $object->desc;
|
||||
$lineReview['realname'] = $object->realname;
|
||||
$lineReview['openedDate'] = substr($object->openedDate, 5, 11);
|
||||
$lineReview['lines'] = $object->lines;
|
||||
$lineReview['objectType'] = $objectType;
|
||||
$lineReview['entry'] = $object->entry;
|
||||
$lineReview['edit'] = common::hasPriv($objectType, 'edit');
|
||||
$lineReview['delete'] = common::hasPriv($objectType, 'delete');
|
||||
$lineReview['view'] = common::hasPriv($objectType, 'view');
|
||||
$lineReviews[$line][] = $lineReview;
|
||||
}
|
||||
$lineBugs[] = $lineBug;
|
||||
}
|
||||
|
||||
$bugs[$line] = $lineBugs;
|
||||
}
|
||||
|
||||
js::set('bugs', $bugs);
|
||||
js::set('reviews', $lineReviews);
|
||||
js::set('productError', $lang->repo->error->product);
|
||||
js::set('contentError', $lang->repo->error->commentText);
|
||||
js::set('titleError', $lang->repo->error->title);
|
||||
js::set('commentError', $lang->repo->error->comment);
|
||||
js::set('submit', $lang->repo->submit);
|
||||
js::set('cancel', $lang->repo->cancel);
|
||||
js::set('confirmDelete', $lang->repo->notice->deleteBug);
|
||||
js::set('confirmDeleteComment', $lang->repo->notice->deleteComment);
|
||||
js::set('confirmDelete', $lang->repo->notice->deleteReview);
|
||||
js::set('repoID', $repoID);
|
||||
// js::set('revision', $info->revision);
|
||||
js::set('MRID', $MR->id);
|
||||
js::set('revision', '');
|
||||
js::set('file', $file);
|
||||
js::set('blamePairs', $blamePairs);
|
||||
?>
|
||||
<?php if(common::hasPriv('mr', 'addBug')):?>
|
||||
<form id="bugForm" class="bugForm main-form hide" method="post" action="<?php echo $bugUrl?>">
|
||||
<div class="bugFormContainer">
|
||||
<?php if(common::hasPriv('mr', 'addReview')):?>
|
||||
<form id="reviewForm" class="reviewForm main-form hide" method="post" action="<?php echo $reviewUrl?>">
|
||||
<div class="reviewFormContainer">
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->mr->reviewType;?></th>
|
||||
<td class='w-p45'><?php echo html::select('reviewType', $lang->mr->reviewTypeList, 'bug', "class='form-control' onchange=changeReviewType(this)")?></td>
|
||||
<th class='w-100px'></th>
|
||||
<td class='w-p45'></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->product?></th>
|
||||
<td class='w-p45'>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo $productSelect?>
|
||||
<?php if($branches) echo html::select('branch', $branches, '', "class='form-control' style='width:95px'");?>
|
||||
@@ -131,13 +114,22 @@ js::set('blamePairs', $blamePairs);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->execution?></th>
|
||||
<td><?php echo $executionSelect?></td>
|
||||
<td>
|
||||
<div class='bugExecutionBox'><?php echo $executionSelect?></div>
|
||||
<div class='taskExecutionBox hide required'><?php echo $taskExecutionSelect?></div>
|
||||
</td>
|
||||
<th><?php echo $lang->repo->type?></th>
|
||||
<td><?php echo $typeSelect?></td>
|
||||
</tr>
|
||||
<tr class='taskModuleBox hide'>
|
||||
<th><?php echo $lang->repo->module?></th>
|
||||
<td><?php echo $taskModuleSelect?></td>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->assign?></th>
|
||||
<td><?php echo $userSelect?></td>
|
||||
<td>
|
||||
<div class='bugAssignedToBox'><?php echo $userSelect?></div>
|
||||
<div class='taskAssignedToBox hide'><?php echo $taskUserSelect?></div>
|
||||
</td>
|
||||
<th><?php echo $lang->repo->lines?></th>
|
||||
<td class='lines'>
|
||||
<div class="input-group">
|
||||
@@ -149,7 +141,7 @@ js::set('blamePairs', $blamePairs);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->repo->title?></th>
|
||||
<td colspan='3'>
|
||||
<td colspan='3' class='required'>
|
||||
<?php echo html::input('title', '', "class='form-control'");?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -160,8 +152,9 @@ js::set('blamePairs', $blamePairs);
|
||||
<tr>
|
||||
<th></th>
|
||||
<td colspan="3" class='form-actions'>
|
||||
<?php echo html::submitButton($lang->repo->submit, '', 'btn btn-wide btn-primary bugSubmit');?>
|
||||
<?php echo html::submitButton($lang->repo->submit, '', 'btn btn-wide btn-primary reviewSubmit');?>
|
||||
<?php echo html::commonButton($lang->cancel, "onclick='hiddenForm()'", 'btn btn-wide');?>
|
||||
<input type="hidden" id='entry' name="entry" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -169,73 +162,87 @@ js::set('blamePairs', $blamePairs);
|
||||
</div>
|
||||
</form>
|
||||
<?php else:?>
|
||||
<form id='bugForm' class='bugForm hide'>
|
||||
<?php printf($lang->user->errorDeny, $lang->repo->common, $lang->repo->addBug);?>
|
||||
<form id='reviewForm' class='reviewForm hide'>
|
||||
<?php printf($lang->user->errorDeny, $lang->mr->common, $lang->mr->addReview);?>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
|
||||
<div class='panel panel-sm hide panel-bug' id='bugPanel'>
|
||||
<div class='panel panel-sm hide panel-review' id='reviewPanel'>
|
||||
<div class='panel-heading'>
|
||||
<div class='panel-actions pull-right'>
|
||||
<?php if(common::hasPriv('bug', 'view')):?>
|
||||
<a href='javascript:;' class='view-bug'>Bug#<span class='bugid'></span></a>
|
||||
<?php else:?>
|
||||
Bug#<span class='bugid'></span>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('bug', 'edit')):?>
|
||||
<a href='javascript:;' class='edit bugEdit'><i class='icon-pencil'></i></a>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('bug', 'delete')):?>
|
||||
<a href='javascript:;' class='delete bugDelete'><i class='icon-remove'></i></a>
|
||||
<?php endif;?>
|
||||
<a href='javascript:;' class='delete reviewDelete'><i class='icon-remove'></i></a>
|
||||
<a href="javascript:;"><i class='icon-chevron-down'></i></a>
|
||||
</div>
|
||||
<i class='icon-bug text-muted'></i> <strong class='title'></strong>
|
||||
<i class='text-muted'></i> <strong class='title'></strong>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<p><?php echo $lang->repo->lines?> <strong class='code-lines'></strong> <i class='icon-user text-muted'></i> <strong class='realname'></strong> <span class='text-muted bug-date'><i class='icon-time'></i> <span class='openedDate'></span></span></p>
|
||||
<form method='post' class='bug-edit-form' action>
|
||||
<input type='text' name='commentText' class='commentInput form-control mgb-10'>
|
||||
<button type='submit' class='btn btn-sm btn-primary bugEditSubmit'><?php echo $lang->repo->submit?></button>
|
||||
<button type='button' class='btn btn-sm bugEditCancel'><?php echo $lang->repo->cancel?></button>
|
||||
</form>
|
||||
<p class='steps text-content'></p>
|
||||
<div class='comments'></div>
|
||||
<?php if(common::hasPriv('repo', 'addComment')):?>
|
||||
<button class='btn btn-sm addComment' type='button'><?php echo $lang->repo->addComment?></button>
|
||||
<form class='commentForm' method='post' action='<?php echo $commentUrl?>' id='commentForm'>
|
||||
<textarea name='comment' class='commentText form-control mgb-10' spellcheck='false' placeholder='<?php echo $lang->repo->notice->commentContent?>'></textarea>
|
||||
<input class='commentSubmit btn btn-sm btn-primary' type='submit' value='<?php echo $lang->repo->submit?>'>
|
||||
<input class='commentCancel btn btn-sm' type='button' value='<?php echo $lang->repo->cancel?>'>
|
||||
<input type='hidden' name='objectID' value=''>
|
||||
<div class='optional'></div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<p class='content text-content'></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='comment hide' id='commentCell'>
|
||||
<i class='icon-user text-muted'></i> <strong class='realname'></strong>: <span class='comment-content text-content'></span> <span class='text-muted comment-date'> <i class='icon-time'></i> <span class='date'></span></span> <a href='javascript:;' class='edit commentEdit pull-right'><i class='icon-pencil'></i></a>
|
||||
<form method='post' class='comment-edit-form' action=''>
|
||||
<textarea name='commentText' class='commentInput form-control mgb-10'></textarea>
|
||||
<button type='submit' class='btn btn-sm btn-primary commentEditSubmit'><?php echo $lang->repo->submit?></button>
|
||||
<button type='button' class='btn btn-sm commentEditCancel'><?php echo $lang->repo->cancel?></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class='dropdown' id="bugsPreview">
|
||||
<div class='dropdown' id="reviewsPreview">
|
||||
<ul class='dropdown-menu fade'>
|
||||
<li class='dropdown-header'><?php echo $lang->repo->line?><strong class='code-line'></strong> <i class='icon-bug'></i> <strong class='bug-count'>0</strong> <i class='icon-comments-alt'></i> <strong class='comment-count'>0</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='rowTip' class='hide'><div class='row-tip'><i class='icon-chat-dot preview-icon'></i><div class='on-expand tip'><span><?php echo $lang->repo->expand?> </span><i class='icon-chevron-down'></i></div><div class='on-collapse tip'><span><?php echo $lang->repo->collapse?> </span><i class='icon-chevron-up'></i></div></div></div>
|
||||
<div id='rowTip' class='hide'><div class='row-tip'><div class='on-expand tip'><span><?php echo $lang->repo->expand?> </span><i class='icon-chevron-down'></i></div><div class='on-collapse tip'><span><?php echo $lang->repo->collapse?> </span><i class='icon-chevron-up'></i></div></div></div>
|
||||
<script>
|
||||
function changeReviewType(select)
|
||||
{
|
||||
var reviewType = $(select).val();
|
||||
if(reviewType == 'bug')
|
||||
{
|
||||
$('#product').closest('td').show();
|
||||
$('#product').closest('td').prev().show();
|
||||
$('#module').closest('td').show();
|
||||
$('#module').closest('td').prev().show();
|
||||
$('#repoType').closest('td').show();
|
||||
$('#repoType').closest('td').prev().show();
|
||||
|
||||
$('.taskModuleBox').addClass('hide');
|
||||
$('.bugAssignedToBox').removeClass('hide');
|
||||
$('.taskAssignedToBox').addClass('hide');
|
||||
$('.bugExecutionBox').removeClass('hide');
|
||||
$('.taskExecutionBox').addClass('hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#product').closest('td').hide();
|
||||
$('#product').closest('td').prev().hide();
|
||||
$('#module').closest('td').hide();
|
||||
$('#module').closest('td').prev().hide();
|
||||
$('#repoType').closest('td').hide();
|
||||
$('#repoType').closest('td').prev().hide();
|
||||
|
||||
$('.taskModuleBox').removeClass('hide');
|
||||
$('.bugAssignedToBox').addClass('hide');
|
||||
$('.taskAssignedToBox').removeClass('hide');
|
||||
$('.bugExecutionBox').addClass('hide');
|
||||
$('.taskExecutionBox').removeClass('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function changeProduct(select)
|
||||
{
|
||||
loadProductBranches(select);
|
||||
productID = $(select).children('option:selected').val();
|
||||
link = createLink('repo', 'ajaxGetExecutions', 'productID=' + productID);
|
||||
$(select).closest('.bugFormContainer').find('select[name=execution]').parent().load(link, '', function(){$('#execution').chosen();});
|
||||
$(select).closest('.reviewFormContainer').find('select[name=execution]').parent().load(link, '', function(){$('#execution').chosen();});
|
||||
moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=0&rootModuleID=0&returnType=html');
|
||||
$(select).closest('.bugFormContainer').find('select[name=module]').parent().load(moduleLink, '', function(){$('#module').chosen();});
|
||||
$(select).closest('.reviewFormContainer').find('select[name=module]').parent().load(moduleLink, '', function(){$('#module').chosen();});
|
||||
}
|
||||
|
||||
function changeExecution(select)
|
||||
{
|
||||
if($('#reviewType').val() == 'bug') return false;
|
||||
|
||||
var executionID = $(select).val();
|
||||
|
||||
moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'execution=' + executionID + '&viewtype=task&branch=0&rootModuleID=0&returnType=html');
|
||||
$('.taskModuleBox').find('td:first').load(moduleLink, '', function(){$('.taskModuleBox #module').attr('id', 'taskModule').attr('name', 'taskModule').chosen();});
|
||||
|
||||
assignLink = createLink('execution', 'ajaxGetMembers', 'executionID=' + executionID);
|
||||
$('.taskAssignedToBox').load(assignLink, '', function(){$('.taskAssignedToBox #assignedTo').attr('id', 'taskAssignedTo').attr('name', 'taskAssignedTo').chosen();});
|
||||
}
|
||||
|
||||
function loadProductBranches(select)
|
||||
@@ -257,9 +264,9 @@ function loadBranch(select)
|
||||
branch = $(select).val();
|
||||
productID = $(select).closest('.input-group').find('#product').val();
|
||||
link = createLink('repo', 'ajaxGetExecutions', 'productID=' + productID + '&branch=' + branch);
|
||||
$(select).closest('.bugFormContainer').find('select[name=execution]').parent().load(link, '', function(){$('#execution').chosen();});
|
||||
$(select).closest('.reviewFormContainer').find('select[name=execution]').parent().load(link, '', function(){$('#execution').chosen();});
|
||||
moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html');
|
||||
$(select).closest('.bugFormContainer').find('select[name=module]').parent().load(moduleLink, '', function(){$('#module').chosen();});
|
||||
$(select).closest('.reviewFormContainer').find('select[name=module]').parent().load(moduleLink, '', function(){$('#module').chosen();});
|
||||
}
|
||||
|
||||
function hiddenForm()
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
</table>
|
||||
<?php if($stories):?>
|
||||
<div class='table-footer'>
|
||||
<div class='table-statistic'><?php echo $summary;?></div>
|
||||
<div class='table-statistic'><?php echo sprintf($lang->mr->storySummary, count($stories));?></div>
|
||||
<?php
|
||||
$this->app->rawParams['type'] = 'story';
|
||||
$storyPager->show('right', 'pagerjs');
|
||||
|
||||
@@ -61,12 +61,6 @@
|
||||
<th class="w-100px"><?php echo $lang->mr->status;?></th>
|
||||
<td><?php echo zget($lang->mr->statusList, $MR->status);?></td>
|
||||
</tr>
|
||||
<?php if(isset($rawMR->head_pipeline->status)): ?>
|
||||
<tr>
|
||||
<th><?php echo "{$lang->mr->pipeline}{$lang->mr->status}";?></th>
|
||||
<td><?php echo zget($lang->mr->pipelineStatus, $rawMR->head_pipeline->status, $lang->mr->pipelineUnknown); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th><?php echo $lang->mr->mergeStatus; ?></th>
|
||||
<?php if(empty($rawMR->changes_count)):?>
|
||||
|
||||
@@ -357,6 +357,7 @@ class repo extends control
|
||||
|
||||
session_start();
|
||||
$this->session->set('revisionList', $this->app->getURI(true));
|
||||
$this->session->set('gitlabBranchList', $this->app->getURI(true));
|
||||
session_write_close();
|
||||
|
||||
/* Get repo and synchronous commit. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#mainMenu > .btn-toolbar {height: 35px; line-height: 35px;}
|
||||
#mainMenu > .pull-right {padding-right: 1%;}
|
||||
#sidebar>.sidebar-toggle>.icon {right: -2px; left: auto;}
|
||||
.main-row {width: 99%;}
|
||||
.btn-toolbar > .last-sync-time {display: inline-block; float: left; margin-right: 10px;}
|
||||
|
||||
@@ -146,6 +146,7 @@ $lang->repo->notice->syncedCount = 'The number of records synchronized is ';
|
||||
$lang->repo->notice->delete = 'Do you want to delete this repo?';
|
||||
$lang->repo->notice->successDelete = 'Repository is removed.';
|
||||
$lang->repo->notice->commentContent = 'Comment';
|
||||
$lang->repo->notice->deleteReview = 'Do you want to delete this review?';
|
||||
$lang->repo->notice->deleteBug = 'Do you want to delete this bug?';
|
||||
$lang->repo->notice->deleteComment = 'Do you want to delete this comment?';
|
||||
$lang->repo->notice->lastSyncTime = 'Last Sync:';
|
||||
|
||||
@@ -146,6 +146,7 @@ $lang->repo->notice->syncedCount = '已经同步记录条数';
|
||||
$lang->repo->notice->delete = '是否要删除该版本库?';
|
||||
$lang->repo->notice->successDelete = '已经成功删除版本库。';
|
||||
$lang->repo->notice->commentContent = '输入回复内容';
|
||||
$lang->repo->notice->deleteReview = '确认删除该评审?';
|
||||
$lang->repo->notice->deleteBug = '确认删除该Bug?';
|
||||
$lang->repo->notice->deleteComment = '确认删除该回复?';
|
||||
$lang->repo->notice->lastSyncTime = '最后更新于:';
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<div class="btn-toolbar pull-right">
|
||||
<span class='last-sync-time'><?php echo $lang->repo->notice->lastSyncTime . $cacheTime?></span>
|
||||
<?php echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision&refresh=1"), "<i class='icon icon-refresh'></i> " . $lang->refresh, '', "class='btn btn-primary' data-app={$app->tab}");?>
|
||||
<?php if($repo->SCM == 'Gitlab' and common::hasPriv('gitlab', 'createBranch')) echo html::a($this->createLink('gitlab', 'createBranch', "gitlabID={$repo->gitlab}&projectID={$repo->project}"), "<i class='icon icon-sm icon-plus'></i> " . $lang->gitlab->createBranch, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
common::printIcon('repo', 'edit', "repoID=$repo->id&objectID=$objectID", '', 'list', 'edit');
|
||||
if(strtolower($repo->SCM) == "gitlab")
|
||||
{
|
||||
common::printIcon('gitlab', 'manageProjectMembers', "repo={$repo->id}", '', 'list', 'team');
|
||||
common::printIcon('gitlab', 'createWebhook', "repoID=$repo->id", '', 'list', 'change', 'hiddenwin');
|
||||
common::printIcon('gitlab', 'importIssue', "repo={$repo->id}", '', 'list', 'link');
|
||||
common::printIcon('gitlab', 'manageProjectMembers', "repo={$repo->id}", '', 'list', 'team');
|
||||
}
|
||||
common::printIcon('repo', 'delete', "repoID=$repo->id&objectID=$objectID", '', 'list', 'trash', 'hiddenwin');
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
title: zt_mr
|
||||
author: Yidong Wang
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
range: 1
|
||||
- field: gitlabID
|
||||
range: 1
|
||||
- field: sourceProject
|
||||
range: 42
|
||||
- field: sourceBranch
|
||||
range: branch-08
|
||||
- field: targetProject
|
||||
range: 42
|
||||
- field: targetBranch
|
||||
range: master
|
||||
- field: mriid
|
||||
range: 19
|
||||
- field: title
|
||||
range: Test MR
|
||||
- field: status
|
||||
range: opened
|
||||
- field: mergeStatus
|
||||
range: can_be_merged
|
||||
- field: repoID
|
||||
range: 1
|
||||
- field: jobID
|
||||
range: 0
|
||||
- field: compileID
|
||||
range: 0
|
||||
- field: deleted
|
||||
range: 0
|
||||
@@ -0,0 +1,26 @@
|
||||
title: zt_pipeline
|
||||
author: Zeng gang
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
range: 1
|
||||
- field: type
|
||||
range: gitlab
|
||||
- field: name
|
||||
range: gitlab服务器
|
||||
- field: url
|
||||
range: [http://192.168.1.161:51080]
|
||||
- field: account
|
||||
range: []
|
||||
- field: password
|
||||
range: []
|
||||
- field: token
|
||||
range: x88fZokrp5hShia2jyBN
|
||||
- field: private
|
||||
range: 08bcc98f75d7d40053dc80722bdc117b
|
||||
- field: createdBy
|
||||
range: admin
|
||||
- field: createdDate
|
||||
range: [2021-12-09 11:23:35]
|
||||
- field: deleted
|
||||
range: 0
|
||||
@@ -0,0 +1,20 @@
|
||||
title: zt_repo
|
||||
author: Yidong Wang
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
range: 1
|
||||
- field: product
|
||||
range: 1
|
||||
- field: name
|
||||
range: 723test
|
||||
- field: path
|
||||
range: 42
|
||||
- field: SCM
|
||||
range: Gitlab
|
||||
- field: client
|
||||
range: 1
|
||||
- field: extra
|
||||
range: 42
|
||||
- field: deleted
|
||||
range: 0
|
||||
@@ -29,3 +29,7 @@ $builder->projectProduct = array('rows' => 21, 'data' => array('projectproduct'
|
||||
|
||||
$builder->case = array('rows' => 10000, 'data' => array('case'));
|
||||
$builder->bug = array('rows' => 100, 'data' => array('bug'));
|
||||
|
||||
$builder->pipeline = array('rows' => 1, 'data' => array('pipeline'));
|
||||
$builder->repo = array('rows' => 1, 'data' => array('repo'));
|
||||
$builder->mr = array('rows' => 1, 'data' => array('mr'));
|
||||
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiCreateBranch();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、分支对象创建GitLab分支 >> return false
|
||||
使用空的gitlabID、projectID,正确的分支对象创建GitLab分支 >> return null
|
||||
使用正确的gitlabID、分支信息,错误的projectID创建分支 >> 404 Project Not Found
|
||||
使用正确的gitlabID,projectID,分支对象创建GitLab分支 >> test_branch17
|
||||
使用重复的分支信息创建分支 >> Branch already exists
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
$branch = new stdclass();
|
||||
|
||||
$result = $gitlab->apiCreateBranch($gitlabID, $projectID, $branch);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,分支对象创建GitLab分支
|
||||
|
||||
$branch->branch = 'test_branch17';
|
||||
$branch->ref = 'master';
|
||||
$result = $gitlab->apiCreateBranch($gitlabID, $projectID, $branch);
|
||||
if($result === null) $result = 'return null';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID、projectID,正确的分支对象创建GitLab分支
|
||||
|
||||
$gitlabID = 1;
|
||||
r($gitlab->apiCreateBranch($gitlabID, $projectID, $branch)) && p('message') && e('404 Project Not Found'); //使用正确的gitlabID、分支信息,错误的projectID创建分支
|
||||
|
||||
$projectID = 1555;
|
||||
r($gitlab->apiCreateBranch($gitlabID, $projectID, $branch)) && p('name') && e($branch->branch); //通过gitlabID,projectID,分支对象正确创建GitLab分支
|
||||
r($gitlab->apiCreateBranch($gitlabID, $projectID, $branch)) && p('message') && e('Branch already exists'); //使用重复的分支信息创建分支
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiCreateBranchPriv();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、保护分支对象创建GitLab保护分支 >> return false
|
||||
使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支 >> return null
|
||||
使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支 >> 404 Project Not Found
|
||||
使用正确的gitlabID,projectID,保护分支对象创建GitLab保护分支 >> master
|
||||
使用重复的保护分支信息创建保护分支 >> Protected branch 'master' already exists
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
|
||||
$branch = new stdclass();
|
||||
|
||||
$result = $gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,保护分支对象创建GitLab保护分支
|
||||
|
||||
$branch->name = 'master';
|
||||
$branch->merge_access_level = '40';
|
||||
$branch->push_access_level = '40';
|
||||
$result = $gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch);
|
||||
if($result === null) $result = 'return null';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支
|
||||
|
||||
$gitlabID = 1;
|
||||
r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('message') && e('404 Project Not Found'); //使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支
|
||||
|
||||
$projectID = 966;
|
||||
r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('name') && e($branch->name); //通过gitlabID,projectID,保护分支对象正确创建GitLab保护分支
|
||||
r($gitlab->apiCreateBranchPriv($gitlabID, $projectID, $branch)) && p('message') && e("Protected branch 'master' already exists"); //使用重复的保护分支信息创建保护分支
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiDeleteBranchPriv();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、保护分支删除保护分支 >> return false
|
||||
使用正确的gitlabID、保护分支信息,错误的projectID删除保护分支 >> 404 Project Not Found
|
||||
使用正确的gitlabID,projectID,保护分支删除保护分支 >> return true
|
||||
使用错误的保护分支信息删除保护分支 >> 404 Not found
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
$branch = '';
|
||||
|
||||
$result = $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,分支名称删除保护分支
|
||||
|
||||
$gitlabID = 1;
|
||||
$branch = 'master';
|
||||
$result = $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
r($result) && p('message') && e('404 Project Not Found'); //使用正确的gitlabID、保护分支信息,错误的projectID删除保护分支
|
||||
|
||||
$projectID = 1565;
|
||||
$result = $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
if(!$result or substr($result->message, 0, 2) == '20') $result = 'return true';
|
||||
r($result) && p() && e('return true'); //通过gitlabID,projectID,分支名称正确删除保护分支
|
||||
|
||||
$branch = 'masters';
|
||||
$result = $gitlab->apiDeleteBranchPriv($gitlabID, $projectID, $branch);
|
||||
r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息删除保护分支
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiGetBranches();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
通过gitlabID,projectID,获取GitLab分支列表 >> branch1
|
||||
通过gitlabID,projectID,获取GitLab分支数量 >> 3
|
||||
当前项目没有分支时,获取GitLab分支列表 >> 0
|
||||
当gitlabID存在,projectID不存在时,获取GitLab分支列表 >> 404 Project Not Found
|
||||
当gitlabID,projectID都为0时,获取GitLab分支列表 >> return empty
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 1;
|
||||
$projectID = 1552;
|
||||
$result = $gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
r($result) && p('0:name') && e('branch1'); //通过gitlabID,projectID,获取GitLab分支列表
|
||||
r(count($result)) && p() && e(3); //通过gitlabID,projectID,获取GitLab分支数量
|
||||
|
||||
$gitlabID = 1;
|
||||
$projectID = 1570;
|
||||
r(count($gitlab->apiGetBranches($gitlabID, $projectID))) && p() && e(0); //当前项目没有分支时,获取GitLab分支列表
|
||||
|
||||
$gitlabID = 1;
|
||||
$projectID = 0;
|
||||
r($gitlab->apiGetBranches($gitlabID, $projectID)) && p('message') && e('404 Project Not Found'); //通过gitlabID,projectID,获取GitLab分支列表
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
$result = $gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
if(empty($result)) $result = 'return empty';
|
||||
r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取GitLab分支列表
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiGetBranchPrivs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取指定项目下受保护分支列表 >> master
|
||||
获取指定项目下受保护分支数量 >> 3
|
||||
获取无保护分支的项目下受保护分支数量 >> 0
|
||||
通过不存在projectID,获取受保护分支列表 >> 404 Project Not Found
|
||||
当gitlabID,projectID都为0时,获取受保护分支列表 >> return empty
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 1;
|
||||
$projectID = 961;
|
||||
$keyword = '';
|
||||
$orderBy = 'name_desc';
|
||||
$result = $gitlab->apiGetBranchPrivs($gitlabID, $projectID, $keyword, $orderBy);
|
||||
r($result) && p('master:name') && e('master'); //获取指定项目下受保护分支列表
|
||||
r(count($result)) && p() && e(3); //获取指定项目下受保护分支数量
|
||||
|
||||
$projectID = 1572;
|
||||
r(count($gitlab->apiGetBranchPrivs($gitlabID, $projectID))) && p() && e(0); //获取无保护分支的项目下受保护分支数量
|
||||
|
||||
$projectID = 0;
|
||||
r($gitlab->apiGetBranchPrivs($gitlabID, $projectID)) && p('message') && e('404 Project Not Found'); //通过不存在projectID,获取受保护分支列表
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
$result = $gitlab->apiGetBranchPrivs($gitlabID, $projectID);
|
||||
if(empty($result)) $result = 'return empty';
|
||||
r($result) && p() && e('return empty'); //当gitlabID,projectID都为0时,获取受保护分支列表
|
||||
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::apiGetSingleBranchPriv();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、保护分支获取保护分支 >> return false
|
||||
使用正确的gitlabID、保护分支信息,错误的projectID获取保护分支 >> 404 Project Not Found
|
||||
使用正确的gitlabID,projectID,保护分支获取保护分支 >> master
|
||||
使用错误的保护分支信息获取保护分支 >> 404 Not found
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
$branch = '';
|
||||
|
||||
$result = $gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,分支名称获取保护分支
|
||||
|
||||
$gitlabID = 1;
|
||||
$branch = 'master';
|
||||
$result = $gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
|
||||
r($result) && p('message') && e('404 Project Not Found'); //使用正确的gitlabID、保护分支信息,错误的projectID获取保护分支
|
||||
|
||||
$projectID = 1565;
|
||||
$result = $gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
|
||||
r($result) && p('name') && e('master'); //通过gitlabID,projectID,分支名称正确获取保护分支
|
||||
|
||||
$branch = 'masters';
|
||||
$result = $gitlab->apiGetSingleBranchPriv($gitlabID, $projectID, $branch);
|
||||
r($result) && p('message') && e('404 Not found'); //使用错误的保护分支信息获取保护分支
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::checkAccessLevel();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的权限信息查询 >> 40
|
||||
使用只有维护者权限信息查询 >> 40
|
||||
使用包含维护者和开发者权限信息查询 >> 30
|
||||
使用包含禁止权限信息查询 >> 0
|
||||
使用包含禁止权限信息的二维数组查询 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$accessLevels = array();
|
||||
|
||||
$result = $gitlab->checkAccessLevel($accessLevels);
|
||||
r($result) && p() && e(40); //使用空的权限信息查询
|
||||
|
||||
$accessLevels[0] = new stdClass();
|
||||
$accessLevels[0]->access_level = 40;
|
||||
$accessLevels[0]->access_level_description = 'Maintainers';
|
||||
r($gitlab->checkAccessLevel($accessLevels)) && p() && e(40); //使用只有维护者权限信息查询
|
||||
|
||||
$accessLevels[1] = new stdClass();
|
||||
$accessLevels[1]->access_level = 30;
|
||||
$accessLevels[1]->access_level_description = 'Developers + Maintainers';
|
||||
r($gitlab->checkAccessLevel($accessLevels)) && p() && e(30); //使用包含维护者和开发者权限信息查询
|
||||
|
||||
$accessLevels[2] = new stdClass();
|
||||
$accessLevels[2]->access_level = 0;
|
||||
$accessLevels[2]->access_level_description = 'No one';
|
||||
r($gitlab->checkAccessLevel($accessLevels)) && p() && e(0); //使用包含禁止权限信息查询
|
||||
|
||||
$accessLevelArray = array(
|
||||
array(
|
||||
'access_level' => 40,
|
||||
'access_level_description' => 'Maintainers'
|
||||
),
|
||||
array(
|
||||
'access_level' => 0,
|
||||
'access_level_description' => 'No one'
|
||||
)
|
||||
);
|
||||
r($gitlab->checkAccessLevel($accessLevelArray)) && p() && e(0); //使用包含禁止权限信息的二维数组查询
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::createBranch();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、分支创建GitLab分支 >> return false
|
||||
使用空的gitlabID、projectID,正确的分支创建GitLab分支 >> return false
|
||||
使用正确的gitlabID、分支信息,错误的projectID创建分支 >> return false
|
||||
使用正确的gitlabID,projectID,分支创建GitLab分支 >> return true
|
||||
使用重复的分支信息创建分支 >> return false
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,分支对象创建GitLab分支
|
||||
|
||||
dao::$errors = array();
|
||||
$_POST['branch'] = 'test_branch17';
|
||||
$_POST['ref'] = 'master';
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID、projectID,正确的分支对象创建GitLab分支
|
||||
|
||||
dao::$errors = array();
|
||||
$gitlabID = 1;
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用正确的gitlabID、分支信息,错误的projectID创建分支
|
||||
|
||||
dao::$errors = array();
|
||||
$projectID = 1555;
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === true) $result = 'return true';
|
||||
r($result) && p() && e('return true'); //通过gitlabID,projectID,分支对象正确创建GitLab分支
|
||||
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用重复的分支信息创建分支
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 gitlabModel::createBranchPriv();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的gitlabID、projectID、保护分支创建GitLab保护分支 >> return false
|
||||
使用空的gitlabID、projectID,正确的保护分支创建GitLab保护分支 >> return false
|
||||
使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支 >> return false
|
||||
使用正确的gitlabID,projectID,保护分支创建GitLab保护分支 >> return true
|
||||
使用重复的保护分支信息创建保护分支 >> return false
|
||||
使用保护分支信息更新保护分支 >> return true
|
||||
|
||||
*/
|
||||
|
||||
$gitlab = $tester->loadModel('gitlab');
|
||||
|
||||
$gitlabID = 0;
|
||||
$projectID = 0;
|
||||
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID,projectID,保护分支对象创建GitLab保护分支
|
||||
|
||||
dao::$errors = array();
|
||||
$_POST['name'] = 'master';
|
||||
$_POST['merge_access_level'] = '40';
|
||||
$_POST['push_access_level'] = '40';
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的gitlabID、projectID,正确的保护分支对象创建GitLab保护分支
|
||||
|
||||
dao::$errors = array();
|
||||
$gitlabID = 1;
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用正确的gitlabID、保护分支信息,错误的projectID创建保护分支
|
||||
|
||||
dao::$errors = array();
|
||||
$projectID = 1565;
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID);
|
||||
if($result === true) $result = 'return true';
|
||||
r($result) && p() && e('return true'); //通过gitlabID,projectID,保护分支对象正确创建GitLab保护分支
|
||||
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID);
|
||||
if($result === false) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用重复的保护分支信息创建保护分支
|
||||
|
||||
dao::$errors = array();
|
||||
$_POST['merge_access_level'] = '0';
|
||||
$result = $gitlab->createBranchPriv($gitlabID, $projectID, $branch = 'master');
|
||||
if($result === true) $result = 'return true';
|
||||
r($result) && p() && e('return true'); //使用保护分支信息更新保护分支
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mrModel::getDiffs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的MR >> return null
|
||||
使用正确的MR >> return normal
|
||||
|
||||
*/
|
||||
|
||||
$mrModel = $tester->loadModel('mr');
|
||||
|
||||
$MR = '';
|
||||
$result = $mrModel->getDiffs($MR);
|
||||
if(empty($result)) $result = 'return null';
|
||||
r($result) && p() && e('return null'); //使用空的MR
|
||||
|
||||
$MR = $tester->dao->select('*')->from(TABLE_MR)->orderBy('id_desc')->limit(1)->fetch();
|
||||
$result = $mrModel->getDiffs($MR);
|
||||
if(!empty($result))
|
||||
{
|
||||
$first = reset($result);
|
||||
if(isset($first->fileName) and is_array($first->contents)) $result = 'return normal';
|
||||
}
|
||||
r($result) && p() && e('return normal'); //使用正确的MR
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mrModel::getLastReviewInfo();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的repoID >> return null
|
||||
使用正确的repoID >> return normal
|
||||
|
||||
*/
|
||||
|
||||
$mrModel = $tester->loadModel('mr');
|
||||
|
||||
$repoID = 0;
|
||||
$result = $mrModel->getLastReviewInfo($repoID);
|
||||
if(empty($result)) $result = 'return null';
|
||||
r($result) && p() && e('return null'); //使用空的repoID
|
||||
|
||||
$repo = $tester->dao->select('*')->from(TABLE_REPO)->orderBy('id_desc')->limit(1)->fetch();
|
||||
$result = $mrModel->getLastReviewInfo($repo->id);
|
||||
if(isset($result->bug) and isset($result->task)) $result = 'return normal';
|
||||
r($result) && p() && e('return normal'); //使用正确的repoID
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mrModel::getReview();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的repoID, MRID, revision >> return null
|
||||
使用正确的repoID, MRID >> return normal
|
||||
使用正确的repoID, MRID, 错误的revision >> return null
|
||||
|
||||
*/
|
||||
|
||||
$mrModel = $tester->loadModel('mr');
|
||||
|
||||
$repoID = 0;
|
||||
$MRID = 0;
|
||||
$revision = '';
|
||||
|
||||
$result = $mrModel->getReview($repoID, $MRID, $revision);
|
||||
if(empty($result)) $result = 'return null';
|
||||
r($result) && p() && e('return null'); //使用空的repoID, MRID, revision
|
||||
|
||||
$MR = $tester->dao->select('*')->from(TABLE_MR)->orderBy('id_desc')->limit(1)->fetch();
|
||||
$repoID = $MR->repoID;
|
||||
$MRID = $MR->id;
|
||||
$result = $mrModel->getReview($repoID, $MRID, $revision);
|
||||
if(!empty($result))
|
||||
{
|
||||
$first = reset($result);
|
||||
if(isset($first['bug']) or isset($first['task'])) $result = 'return normal';
|
||||
}
|
||||
r($result) && p() && e('return normal'); //使用正确的repoID, MRID
|
||||
|
||||
$revision = '123qwe';
|
||||
$result = $mrModel->getReview($repoID, $MRID, $revision);
|
||||
if(empty($result)) $result = 'return null';
|
||||
r($result) && p() && e('return null'); //使用正确的repoID, MRID, 错误的revision
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mrModel::saveBug();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的repoID, MRID >> return false
|
||||
使用正确的repoID, MRID。空的title。 >> return false
|
||||
使用正确的repoID, MRID。POST数据正确。 >> Test Bug Review
|
||||
|
||||
*/
|
||||
|
||||
$mrModel = $tester->loadModel('mr');
|
||||
|
||||
$_POST = array();
|
||||
$_POST['title'] = 'Test Bug Review';
|
||||
$_POST['commentText'] = 'Test Bug Review';
|
||||
$_POST['module'] = '1';
|
||||
$_POST['begin'] = '8';
|
||||
$_POST['end'] = '8';
|
||||
$_POST['product'] = '1';
|
||||
$_POST['assignedTo'] = '';
|
||||
|
||||
$repoID = 0;
|
||||
$MRID = 0;
|
||||
$v1 = 0;
|
||||
$v2 = '';
|
||||
$result = $mrModel->saveBug($repoID, $MRID, $v1, $v2);
|
||||
if($result['result'] == 'fail' and isset($result['message']['mr']) and isset($result['message']['repo'])) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的repoID, MRID
|
||||
|
||||
$_POST['title'] = '';
|
||||
$MR = $tester->dao->select('*')->from(TABLE_MR)->orderBy('id_desc')->limit(1)->fetch();
|
||||
$result = $mrModel->saveBug($MR->repoID, $MR->id, $v1, $v2);
|
||||
if($result['result'] == 'fail' and isset($result['message']['title'])) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用正确的repoID, MRID。空的title。
|
||||
|
||||
$_POST['title'] = 'Test Bug Review';
|
||||
$result = $mrModel->saveBug($MR->repoID, $MR->id, $v1, $v2);
|
||||
r($result) && p('title') && e('Test Bug Review'); //使用正确的repoID, MRID。POST数据正确。
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mrModel::saveTask();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
使用空的repoID, MRID >> return false
|
||||
使用正确的repoID, MRID。空的title。 >> return false
|
||||
使用正确的repoID, MRID。POST数据正确。 >> Test Task Review
|
||||
|
||||
*/
|
||||
|
||||
$mrModel = $tester->loadModel('mr');
|
||||
|
||||
$_POST = array();
|
||||
$_POST['title'] = 'Test Task Review';
|
||||
$_POST['commentText'] = 'Test Task Review';
|
||||
$_POST['taskModule'] = '1';
|
||||
$_POST['taskExecution'] = '1';
|
||||
$_POST['begin'] = '8';
|
||||
$_POST['end'] = '8';
|
||||
$_POST['taskAssignedTo'] = '';
|
||||
$_POST['entry'] = '';
|
||||
|
||||
$repoID = 0;
|
||||
$MRID = 0;
|
||||
$v1 = 0;
|
||||
$v2 = '';
|
||||
$result = $mrModel->saveTask($repoID, $MRID, $v1, $v2);
|
||||
if($result['result'] == 'fail' and isset($result['message']['mr']) and isset($result['message']['repo'])) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用空的repoID, MRID
|
||||
|
||||
$_POST['title'] = '';
|
||||
$MR = $tester->dao->select('*')->from(TABLE_MR)->orderBy('id_desc')->limit(1)->fetch();
|
||||
$result = $mrModel->saveTask($MR->repoID, $MR->id, $v1, $v2);
|
||||
if($result['result'] == 'fail' and isset($result['message']['name'])) $result = 'return false';
|
||||
r($result) && p() && e('return false'); //使用正确的repoID, MRID。空的title。
|
||||
|
||||
$_POST['title'] = 'Test Task Review';
|
||||
$result = $mrModel->saveTask($MR->repoID, $MR->id, $v1, $v2);
|
||||
r($result) && p('title') && e('Test Task Review'); //使用正确的repoID, MRID。POST数据正确。
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -201,11 +201,18 @@
|
||||
<glyph unicode="" glyph-name="side-right" d="M148.028 802.13v0c-80.406 0-145.588-65.182-145.588-145.588 0 0 0 0 0 0v-727.942c0-80.406 65.182-145.588 145.588-145.588 0 0 0 0 0 0h727.942c80.406 0 145.588 65.182 145.588 145.588 0 0 0 0 0 0v727.942c0 80.406-65.182 145.588-145.588 145.588 0 0 0 0 0 0h-727.942zM75.234 729.335h873.53v-873.53h-873.53v873.53zM584.793 656.541h291.177v-727.942h-291.177z" />
|
||||
<glyph unicode="" glyph-name="side-left" d="M875.972 802.13v0c80.406 0 145.588-65.182 145.588-145.588 0 0 0 0 0 0v-727.942c0-80.406-65.182-145.588-145.588-145.588 0 0 0 0 0 0h-727.942c-80.406 0-145.588 65.182-145.588 145.588 0 0 0 0 0 0v727.942c0 80.406 65.182 145.588 145.588 145.588 0 0 0 0 0 0h727.942zM948.766 729.335h-873.53v-873.53h873.53v873.53zM439.207 656.541h-291.177v-727.942h291.177z" />
|
||||
<glyph unicode="" glyph-name="list-box" horiz-adv-x="951" d="M0.002 804.571v-1024zM18.288 804.571v-1024zM36.574 804.571v-1024zM54.859 804.571v-1024zM73.145 804.571v-1024zM91.431 804.571v-1024zM109.717 804.571v-1024zM128.002 804.571v-1024zM146.288 804.571v-1024zM164.574 804.571v-1024zM182.859 804.571v-1024zM201.145 804.571v-1024zM219.431 804.571v-1024zM237.717 804.571v-1024zM256.002 804.571v-1024zM274.288 804.571v-1024zM292.574 804.571v-1024zM310.859 804.571v-1024zM329.145 804.571v-1024zM347.431 804.571v-1024zM365.717 804.571v-1024zM384.002 804.571v-1024zM402.288 804.571v-1024zM420.574 804.571v-1024zM438.859 804.571v-1024zM457.145 804.571v-1024zM475.431 804.571v-1024zM493.717 804.571v-1024zM512.002 804.571v-1024zM530.288 804.571v-1024zM548.574 804.571v-1024zM566.859 804.571v-1024zM585.145 804.571v-1024zM603.431 804.571v-1024zM621.717 804.571v-1024zM640.002 804.571v-1024zM658.288 804.571v-1024zM676.574 804.571v-1024zM694.859 804.571v-1024zM713.145 804.571v-1024zM731.431 804.571v-1024zM749.717 804.571v-1024zM768.002 804.571v-1024zM786.288 804.571v-1024zM804.574 804.571v-1024zM822.859 804.571v-1024zM841.145 804.571v-1024zM859.431 804.571v-1024zM877.717 804.571v-1024zM896.002 804.571v-1024zM914.288 804.571v-1024zM932.574 804.571v-1024zM-36.569 786.285h1024zM-36.569 768h1024zM-36.569 749.714h1024zM-36.569 731.428h1024zM-36.569 713.142h1024zM-36.569 694.857h1024zM-36.569 676.571h1024zM-36.569 658.285h1024zM-36.569 640h1024zM-36.569 621.714h1024zM-36.569 603.428h1024zM-36.569 585.142h1024zM-36.569 566.857h1024zM-36.569 548.571h1024zM-36.569 530.285h1024zM-36.569 512h1024zM-36.569 493.714h1024zM-36.569 475.428h1024zM-36.569 457.142h1024zM-36.569 438.857h1024zM-36.569 420.571h1024zM-36.569 402.285h1024zM-36.569 384h1024zM-36.569 365.714h1024zM-36.569 347.428h1024zM-36.569 329.142h1024zM-36.569 310.857h1024zM-36.569 292.571h1024zM-36.569 274.285h1024zM-36.569 256h1024zM-36.569 237.714h1024zM-36.569 219.428h1024zM-36.569 201.142h1024zM-36.569 182.857h1024zM-36.569 164.571h1024zM-36.569 146.285h1024zM-36.569 128h1024zM-36.569 109.714h1024zM-36.569 91.428h1024zM-36.569 73.142h1024zM-36.569 54.857h1024zM-36.569 36.571h1024zM-36.569 18.285h1024zM-36.569 0h1024zM-36.569-18.286h1024zM-36.569-36.572h1024zM-36.569-54.858h1024zM-36.569-73.143h1024zM-36.569-91.429h1024zM-36.569-109.715h1024zM-36.569-128h1024zM-36.569-146.286h1024zM-36.569-164.572h1024zM-36.569-182.858h1024zM-36.569-201.143h1024zM0.002 658.285c0 60.594 49.12 109.714 109.714 109.714h731.429c60.594 0 109.714-49.12 109.714-109.714v-731.429c0-60.594-49.12-109.714-109.714-109.714h-731.429c-60.594 0-109.714 49.12-109.714 109.714v731.429zM109.717 694.857c-20.199 0-36.571-16.375-36.571-36.571v-731.429c0-20.199 16.375-36.571 36.571-36.571h731.429c20.199 0 36.571 16.373 36.571 36.571v731.429c0 20.199-16.373 36.571-36.571 36.571h-731.429zM182.859 512c0 20.199 16.375 36.571 36.571 36.571s36.304-16.375 36.304-36.571c0-20.199-16.105-36.571-36.304-36.571s-36.571 16.375-36.571 36.571zM330.359 512c0 20.199 14.475 36.571 34.674 36.571h366.4c20.199 0 36.571-16.375 36.571-36.571s-16.373-36.571-36.571-36.571h-366.4c-20.199 0-34.674 16.375-34.674 36.571zM182.859 292.571c0 20.199 16.375 36.571 36.571 36.571s36.304-16.375 36.304-36.571c0-20.199-16.105-36.571-36.304-36.571s-36.571 16.375-36.571 36.571zM330.288 292.571c0 20.199 14.475 36.571 34.674 36.571h366.4c20.199 0 36.571-16.375 36.571-36.571s-16.373-36.571-36.571-36.571h-366.4c-20.199 0-34.674 16.375-34.674 36.571zM182.859 73.142c0 20.199 16.375 36.571 36.571 36.571s36.304-16.375 36.304-36.571c0-20.199-16.105-36.571-36.304-36.571s-36.571 16.375-36.571 36.571zM330.288 73.142c0 20.199 14.475 36.571 34.674 36.571h366.4c20.199 0 36.571-16.375 36.571-36.571s-16.373-36.571-36.571-36.571h-366.4c-20.199 0-34.674 16.375-34.674 36.571z" />
|
||||
<<<<<<< HEAD
|
||||
<glyph unicode="" glyph-name="chat-solid" horiz-adv-x="1117" d="M558.545-15.892l-245.011-190.547c-24.363-18.923-59.452-14.511-78.373 9.852-7.606 9.796-11.737 21.841-11.743 34.244v146.451h-111.709c-61.696 0-111.709 50.013-111.709 111.709v595.799c0 61.696 50.013 111.709 111.709 111.709h893.673c61.696 0 111.709-50.013 111.709-111.709v-595.799c0-61.696-50.013-111.709-111.709-111.709h-446.836zM781.964 337.891c30.848 0 55.855 25.007 55.855 55.855s-25.007 55.855-55.855 55.855c-30.848 0-55.855-25.007-55.855-55.855s25.007-55.855 55.855-55.855zM558.545 337.891c30.848 0 55.855 25.007 55.855 55.855s-25.007 55.855-55.855 55.855c-30.848 0-55.855-25.007-55.855-55.855s25.007-55.855 55.855-55.855zM335.125 337.891c30.848 0 55.855 25.007 55.855 55.855s-25.007 55.855-55.855 55.855c-30.848 0-55.855-25.007-55.855-55.855s25.007-55.855 55.855-55.855z" />
|
||||
<glyph unicode="" glyph-name="minuse-solid-circle" d="M874.017 653.078c-96.701 96.231-225.225 149.232-361.97 149.232s-265.317-53.001-362.025-149.227c-96.711-96.228-150.021-224.308-150.021-360.505s53.285-264.249 150.018-360.513c96.733-96.265 225.235-149.227 361.995-149.227 136.756 0 265.307 52.942 361.968 149.227s150.018 224.357 150.018 360.551c0 136.198-53.205 264.206-149.984 360.469l0.002-0.002zM256.001 255.974c-20.198 0-36.571 16.373-36.571 36.571s16.373 36.571 36.571 36.571h512c20.198 0 36.571-16.373 36.571-36.571s-16.373-36.571-36.571-36.571h-512z" />
|
||||
=======
|
||||
>>>>>>> sugon
|
||||
<glyph unicode="" glyph-name="diff" d="M730.378 622.413c60.304 0 109.189-48.886 109.189-109.189v0-586.892c0-60.304-48.886-109.189-109.189-109.189v0h-582.343c-60.304 0-109.189 48.886-109.189 109.189v0 586.892c0 60.304 48.886 109.189 109.189 109.189v0zM730.378 549.62h-582.343c-20.101 0-36.396-16.295-36.396-36.396v0-586.892c0-20.101 16.295-36.396 36.396-36.396v0h582.343c20.101 0 36.396 16.295 36.396 36.396v0 586.892c0 20.101-16.295 36.396-36.396 36.396v0zM875.965 767.998c59.701 0 108.21-47.654 109.175-106.803l0.014-1.796v-619.92c0-47.284-30.383-87.51-72.792-102.42l-0.001 722.34c0 19.793-15.972 35.875-35.794 36.195l-0.602 0.005h-582.343c-1.83 0-3.628-0.135-5.385-0.394l-97.73-0.001c14.73 41.961 54.617 72.185 101.687 72.785l1.428 0.010h582.343zM585.93 40.070c20.101 0 36.396-16.295 36.396-36.396 0-19.901-15.972-36.071-35.794-36.391l-0.602-0.005h-293.447c-20.101 0-36.396 16.295-36.396 36.396 0 19.901 15.972 36.071 35.794 36.391l0.602 0.005h293.447zM439.207 476.827c19.901 0 36.071-15.972 36.391-35.794l0.005-0.602v-109.189h110.327c20.101 0 36.396-16.295 36.396-36.396 0-19.901-15.972-36.071-35.794-36.391l-0.602-0.005h-110.327v-111.464c0-20.101-16.295-36.396-36.396-36.396-19.901 0-36.071 15.972-36.391 35.794l-0.005 0.602v111.464h-110.327c-20.101 0-36.396 16.295-36.396 36.396 0 19.901 15.972 36.071 35.794 36.391l0.602 0.005h110.327v109.189c0 20.101 16.295 36.396 36.396 36.396z" />
|
||||
<glyph unicode="" glyph-name="card-archive" d="M108.872 302.842h488.889c51.699 0 89.797 27.204 101.593 73.486 0.903 4.516 2.709 10.893 4.516 18.118v0c4.038 18.065 8.897 35.938 14.561 53.562h188.625c19.98 0 36.292-16.368 36.292-36.292v-2.765l-13.546-170.507c0-19.98 16.254-36.292 36.235-36.292s36.292 16.368 36.292 36.292v0.903l13.602 173.274c0 59.827-48.991 108.818-108.874 108.818h-20.883v174.176c0 56.215-45.322 101.593-101.593 101.593h-554.134c-56.215 0-101.593-45.378-101.593-101.593v-320.188h-19.923c-59.94 0-108.931-48.991-108.931-111.583l36.292-332.887c0-59.827 48.991-108.874 108.818-108.874h527.946c18.927 1.526 33.526 17.303 33.582 36.292v0c-0.056 18.989-14.655 34.765-33.582 36.291h-527.946c-19.923 0-36.235 16.368-36.235 39.001l-36.292 332.887c0 19.98 16.311 36.292 36.292 36.292v0zM201.378 695.612c0 16.368 13.547 29.913 29.914 29.913h554.247c16.368 0 29.913-13.546 29.913-29.913v-175.078h-117.961c-0.847 0-1.75-0.903-2.652-0.903v0c-4.102-0.022-8.148-0.947-11.852-2.709-0.847 0-0.847-0.903-1.75-0.903v0c-3.647-1.582-7.019-3.735-9.99-6.378-19.076-18.118-28.108-54.408-39.001-99.731-1.806-6.378-2.709-11.852-3.669-16.368-1.806-6.321-4.516-19.021-30.816-19.021h-396.383v321.091zM902.428 111.733l110.68-102.496c14.277-13.934 14.553-36.804 0.619-51.080-0.204-0.209-0.41-0.415-0.619-0.619v0c-6.669-6.881-15.817-10.804-25.399-10.893v0c-9.582 0.090-18.728 4.013-25.399 10.893l-47.184 48.087v-181.4c0-19.98-16.311-36.292-36.292-36.292v0c-19.996 0.093-36.173 16.296-36.235 36.292v180.497l-47.184-48.087c-6.566-7.030-15.779-10.982-25.399-10.893v0c-9.582 0.090-18.728 4.013-25.399 10.893v0c-14.277 13.934-14.553 36.804-0.619 51.080 0.204 0.209 0.41 0.415 0.619 0.619l109.72 101.593c6.898 6.424 15.974 9.99 25.399 9.99 8.184 0 16.368-2.709 22.689-8.184v0z" />
|
||||
<glyph unicode="" glyph-name="col-archive" d="M960 718.247h-896.002c-35.3 0-64-29.266-64-65.489v-769.489c0-9.004 7.199-16.371 15.999-16.371h992.002c8.8 0 15.999 7.367 15.999 16.371v769.489c0 36.223-28.699 65.489-64 65.489zM479.999-63.524c0-2.252-1.799-4.092-3.999-4.092h-408.001c-2.2 0-3.999 1.843-3.999 4.092v581.21c0 2.252 1.799 4.092 3.999 4.092h408.001c2.2 0 3.999-1.843 3.999-4.092v-581.21zM960-63.524c0-2.252-1.799-4.092-3.999-4.092h-408.001c-2.2 0-3.999 1.843-3.999 4.092v581.21c0 2.252 1.799 4.092 3.999 4.092h408.001c2.2 0 3.999-1.843 3.999-4.092v-581.21z" />
|
||||
<glyph unicode="" glyph-name="zone" d="M512 804.571c282.77 0 512-229.23 512-512v0l-0.263-16.57c-8.747-275.101-234.511-495.43-511.737-495.43-282.77 0-512 229.23-512 512v0l0.263 16.57c8.747 275.101 234.511 495.43 511.737 495.43zM529.153 680.946c-8.432 16.921-32.68 16.921-41.053-0.116-26.69-54.020-72.628-147.291-97.981-197.764-3.838-7.559-12.502-16.398-20.119-17.677-37.797-6.513-149.442-22.911-214.685-32.563-18.433-2.733-26.051-25.12-13.2-38.553 49.833-52.101 100.248-104.784 151.012-157.118 8.722-9.013 11.688-16.689 9.362-29.714-12.909-71.93-25.004-144.035-37.739-219.221-3.198-18.724 16.398-33.029 33.203-24.19 53.264 28.026 144.558 76.115 193.112 102.34 12.502 6.745 22.038 7.327 34.947 0.291 48.787-26.516 140.197-74.605 193.635-102.458 16.863-8.78 36.401 5.64 33.145 24.364-10.874 62.394-21.341 122.403-31.866 182.878-9.188 0-16.165 0.233-23.143-0.058-114.030-4.826-218-8.606-332.030-12.851-7.792-0.291-19.015 0.407-24.83 12.153-4.012 8.141-5.931 15.933-2.21 24.946 2.152 5.117 8.664 7.734 14.072 11.048 73.093 44.717 146.36 89.317 219.512 133.917 6.047 3.663 12.037 7.559 22.911 14.363v0l-303.885 40.472c0.349 5.524 0.233 3.314 0.581 8.839v0h394.191c1.396 0 2.849-0.058 4.245-0.058 15.7-0.058 22.678-9.943 19.48-23.376-1.686-7.152-8.897-12.851-14.944-17.212-68.79-49.892-137.929-99.435-206.952-149.094-1.178-0.843-2.33-1.719-3.525-2.664l-13.803-11.35c85.362-7.152 165.549-13.898 247.248-20.759-0.523 8.083 0.465 14.13-1.454 19.015-8.199 20.992 2.617 33.668 16.805 47.217 19.252 18.357 54.491 53.23 88.954 87.612l59.616 59.738c13.258 13.374 5.699 36.052-12.909 38.843-72.977 10.874-144.907 21.631-216.953 31.691-13.083 1.861-19.538 7.21-25.004 18.608-24.655 51.171-70.825 144.558-97.748 198.462z" />
|
||||
<glyph unicode="" glyph-name="col-add-right" d="M146.285 804.57v0c-80.791 0-146.285-65.494-146.285-146.285 0 0 0 0 0 0v-731.429c0-80.791 65.494-146.285 146.285-146.285 0 0 0 0 0 0h731.429c80.791 0 146.285 65.494 146.285 146.285 0 0 0 0 0 0v731.429c0 80.791-65.494 146.285-146.285 146.285 0 0 0 0 0 0h-731.429zM73.143 731.426h877.714v-877.714h-877.714v877.714zM585.143 658.284h292.572v-731.429h-292.572z" />
|
||||
<glyph unicode="" glyph-name="col-add-left" d="M877.715 804.571v0c80.791 0 146.285-65.494 146.285-146.285 0 0 0 0 0 0v-731.429c0-80.791-65.494-146.285-146.285-146.285 0 0 0 0 0 0h-731.429c-80.791 0-146.285 65.494-146.285 146.285 0 0 0 0 0 0v731.429c0 80.791 65.494 146.285 146.285 146.285 0 0 0 0 0 0h731.429zM950.857 731.427h-877.714v-877.714h877.714v877.714zM438.857 658.285h-292.572v-731.429h292.572z" />
|
||||
<glyph unicode="" glyph-name="col-split" d="M228.514 363.712h159.528v-127.192h-159.528v-153.062l-228.514 211.268 228.514 213.423v-144.438zM797.643 508.15v-146.594h-159.529v-127.192h159.529v-153.062l226.358 213.423-226.358 213.424zM513.079 695.704h-77.608v-806.266h157.373v806.266h-79.764z" />
|
||||
<glyph unicode="" glyph-name="tag" d="M109.391 187.54c-24.169 24.294-36.234 56.049-36.234 87.682-0.042 31.673 12.022 63.511 36.234 87.888l356.115 356.115c7.504 7.462 17.868 12.106 29.31 12.106h414.57c22.885 0 41.457-18.573 41.457-41.457v-414.57c0-10.613-4.062-21.226-12.147-29.351l-356.198-355.784c-24.294-24.253-56.215-36.399-87.971-36.358s-63.677 12.188-87.888 36.441zM168.011 246.159l297.246-297.246c8.127-8.127 18.656-12.188 29.31-12.188s21.226 4.022 29.31 12.106l344.052 343.679v355.907h-355.95l-343.969-343.969c-7.96-8.001-11.981-18.53-11.981-29.185 0-10.613 4.022-21.101 11.981-29.102zM702.101 441.132c-22.885 0-41.457 18.573-41.457 41.457s18.573 41.457 41.457 41.457 41.457-18.573 41.457-41.457-18.573-41.457-41.457-41.457z" />
|
||||
<glyph unicode="" glyph-name="tag-lock" d="M36.235 187.517c-24.17 24.3-36.235 56.061-36.235 87.702-0.041 31.68 12.023 63.525 36.235 87.908l356.127 356.194c7.504 7.465 17.868 12.108 29.311 12.108h414.584c22.885 0 41.458-18.578 41.458-41.465v-414.662c0-10.615-4.062-21.23-12.147-29.357l-356.212-355.862c-24.296-24.259-56.217-36.408-87.973-36.367s-63.68 12.19-87.891 36.449l-297.256 297.353zM94.856 246.149l297.256-297.312c8.128-8.13 18.657-12.19 29.311-12.19s21.226 4.024 29.311 12.108l344.065 343.757v355.986h-355.963l-343.98-344.045c-7.961-8.002-11.982-18.534-11.982-29.191 0-10.615 4.023-21.106 11.982-29.108v-0.005zM628.965 441.164c-22.885 0-41.458 18.578-41.458 41.465s18.574 41.465 41.458 41.465c22.883 0 41.458-18.578 41.458-41.465s-18.574-41.465-41.458-41.465zM956.343-11.429v48c0 26.512-10.999 50.528-28.714 67.888s-42.263 28.112-69.343 28.112c-27.080 0-51.611-10.768-69.343-28.112s-28.714-41.376-28.714-67.888v-48h-16.343c-13.532 0-25.822-5.392-34.663-14.064s-14.365-20.688-14.365-33.936v-112c0-13.248 5.508-25.28 14.365-33.936s21.131-14.064 34.663-14.064h228.8c13.532 0 25.822 5.392 34.663 14.064s14.365 20.688 14.365 33.936v112c0 13.248-5.508 25.28-14.365 33.936s-21.131 14.064-34.663 14.064h-16.343zM793.143-13.715v47.020c0 17.319 7.28 32.961 19.087 44.325s28.060 18.369 46.056 18.369c17.996 0 34.249-7.006 46.056-18.369s19.087-27.005 19.087-44.325v-47.020h-130.286z" />
|
||||
<glyph unicode="" glyph-name="branch-lock" d="M847.771-11.429v48c0 26.512-10.999 50.528-28.714 67.888s-42.263 28.112-69.343 28.112c-27.080 0-51.611-10.768-69.343-28.112s-28.714-41.376-28.714-67.888v-48h-16.343c-13.532 0-25.822-5.392-34.663-14.064s-14.365-20.688-14.365-33.936v-112c0-13.248 5.508-25.28 14.365-33.936s21.131-14.064 34.663-14.064h228.8c13.532 0 25.822 5.392 34.663 14.064s14.365 20.688 14.365 33.936v112c0 13.248-5.508 25.28-14.365 33.936s-21.131 14.064-34.663 14.064h-16.343zM684.571-13.715v47.020c0 17.319 7.28 32.961 19.087 44.325s28.060 18.369 46.056 18.369c17.996 0 34.249-7.006 46.056-18.369s19.087-27.005 19.087-44.325v-47.020h-130.286zM275.428-36.572c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857c0-30.286 24.571-54.857 54.857-54.857s54.857 24.571 54.857 54.857zM275.428 621.714c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857c0-30.286 24.571-54.857 54.857-54.857s54.857 24.571 54.857 54.857zM641.142 548.571c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857c0-30.286 24.571-54.857 54.857-54.857s54.857 24.571 54.857 54.857zM695.999 548.571c0-40.571-22.286-76-54.857-94.857-1.714-206.286-148-252-245.143-282.857-90.857-28.571-120.571-42.286-120.571-97.714v-14.857c32.571-18.857 54.857-54.286 54.857-94.857 0-60.571-49.143-109.714-109.714-109.714s-109.714 49.143-109.714 109.714c0 40.571 22.286 76 54.857 94.857v468.571c-32.571 18.857-54.857 54.286-54.857 94.857 0 60.571 49.143 109.714 109.714 109.714s109.714-49.143 109.714-109.714c0-40.571-22.286-76-54.857-94.857v-284c29.143 14.286 60 24 88 32.571 106.286 33.714 166.857 58.857 168 178.286-32.571 18.857-54.857 54.286-54.857 94.857 0 60.571 49.143 109.714 109.714 109.714s109.714-49.143 109.714-109.714z" />
|
||||
<glyph unicode="" glyph-name="file, file-empty" horiz-adv-x="878" d="M838.857 587.428c21.143-21.143 38.857-63.429 38.857-93.714v-658.286c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h512c30.286 0 72.571-17.714 93.714-38.857zM585.143 726.857v-214.857h214.857c-3.429 9.714-8.571 19.429-12.571 23.429l-178.857 178.857c-4 4-13.714 9.143-23.429 12.571zM804.571-146.286v585.143h-237.714c-30.286 0-54.857 24.571-54.857 54.857v237.714h-438.857v-877.714h731.429z" />
|
||||
<glyph unicode="" glyph-name="book" d="M948.764 510.653c13.529-19.482 17.318-44.918 9.741-69.81l-148.822-490.3c-13.529-45.999-61.152-81.716-107.693-81.716h-499.501c-55.199 0-114.186 43.835-134.21 100.116-8.658 24.352-8.658 48.165-1.083 68.728 1.083 10.823 3.248 21.647 3.789 34.635 0.541 8.658-4.329 15.694-3.248 22.188 2.165 12.988 13.529 22.188 22.188 36.799 16.235 27.058 34.635 70.893 40.587 99.033 2.706 10.281-2.706 22.188 0 31.388 2.706 10.281 12.988 17.859 18.401 27.6 14.612 24.894 33.554 73.058 36.259 98.493 1.083 11.364-4.329 23.811-1.083 32.471 3.789 12.447 15.694 17.859 23.811 28.682 12.988 17.859 34.635 69.269 37.881 97.952 1.083 9.199-4.329 18.401-2.706 28.14 2.165 10.281 15.153 21.106 23.811 33.554 22.728 33.554 27.058 107.693 95.787 88.211l-0.541-1.623c9.199 2.165 18.401 4.871 27.6 4.871h411.831c25.434 0 48.165-11.364 61.694-30.306 14.070-19.482 17.318-44.918 9.741-70.352l-148.281-490.3c-25.434-83.34-39.505-101.74-108.235-101.74h-470.277c-7.035 0-15.694-1.623-20.565-8.117-4.329-6.495-4.871-11.364-0.541-23.269 10.823-31.388 48.165-37.881 77.93-37.881h499.501c20.024 0 43.293 11.364 49.247 30.846l162.352 534.135c3.248 10.281 3.248 21.106 2.706 30.846 12.447-4.871 23.811-12.447 31.929-23.269zM372.959 509.57c-3.248-9.741 2.165-17.318 11.905-17.318h329.032c9.199 0 19.482 7.576 22.728 17.318l11.364 34.635c3.248 9.741-2.165 17.318-11.905 17.318h-329.032c-9.199 0-19.482-7.576-22.728-17.318zM328.043 371.031c-3.248-9.741 2.165-17.318 11.905-17.318h329.032c9.199 0 19.482 7.576 22.728 17.318l11.364 34.635c3.248 9.741-2.165 17.318-11.905 17.318h-329.032c-9.199 0-19.482-7.576-22.728-17.318z" />
|
||||
<glyph unicode="" glyph-name="share" d="M960.285 412.526c0-8.506-3.502-16.511-9.505-22.514l-256.163-256.163c-6.003-6.003-14.008-9.505-22.514-9.505-17.512 0-32.020 14.509-32.020 32.020v128.082h-112.072c-215.638 0-357.227-41.527-357.227-280.178 0-20.513 1.001-41.025 2.501-61.54 0.5-8.005 2.501-17.011 2.501-25.015 0-9.505-6.003-17.512-16.010-17.512-7.004 0-10.506 3.502-14.008 8.506-7.505 10.506-13.009 26.518-18.511 38.025-28.517 64.041-63.54 155.598-63.54 225.643 0 56.036 5.504 113.572 26.518 166.606 69.545 172.609 273.673 201.628 437.778 201.628h112.072v128.082c0 17.512 14.509 32.020 32.020 32.020 8.506 0 16.511-3.502 22.514-9.505l256.163-256.163c6.003-6.003 9.505-14.008 9.505-22.514z" />
|
||||
@@ -223,6 +230,7 @@
|
||||
<glyph unicode="" glyph-name="sort-up" d="M821.728 404.932c0-21.173-17.543-38.715-38.715-38.715h-542.026c-21.173 0-38.715 17.543-38.715 38.715 0 10.284 4.237 19.966 11.492 27.221l271.013 271.013c7.263 7.263 16.937 11.492 27.221 11.492s19.966-4.237 27.221-11.492l271.013-271.013c7.263-7.263 11.492-16.937 11.492-27.221z" />
|
||||
<glyph unicode="" glyph-name="file-text" horiz-adv-x="878" d="M838.857 587.428c21.143-21.143 38.857-63.429 38.857-93.714v-658.286c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h512c30.286 0 72.571-17.714 93.714-38.857zM585.143 726.857v-214.857h214.857c-3.429 9.714-8.571 19.429-12.571 23.429l-178.857 178.857c-4 4-13.714 9.143-23.429 12.571zM804.571-146.286v585.143h-237.714c-30.286 0-54.857 24.571-54.857 54.857v237.714h-438.857v-877.714h731.429zM219.429 347.428c0 10.286 8 18.286 18.286 18.286h402.286c10.286 0 18.286-8 18.286-18.286v-36.571c0-10.286-8-18.286-18.286-18.286h-402.286c-10.286 0-18.286 8-18.286 18.286v36.571zM640 219.428c10.286 0 18.286-8 18.286-18.286v-36.571c0-10.286-8-18.286-18.286-18.286h-402.286c-10.286 0-18.286 8-18.286 18.286v36.571c0 10.286 8 18.286 18.286 18.286h402.286zM640 73.142c10.286 0 18.286-8 18.286-18.286v-36.571c0-10.286-8-18.286-18.286-18.286h-402.286c-10.286 0-18.286 8-18.286 18.286v36.571c0 10.286 8 18.286 18.286 18.286h402.286z" />
|
||||
<glyph unicode="" glyph-name="angle-double-right" d="M568.435 284.446c0-4.56-2.281-9.69-5.7-13.112l-265.638-265.638c-3.421-3.421-8.55-5.7-13.112-5.7s-9.69 2.281-13.112 5.7l-28.502 28.502c-3.421 3.421-5.7 8.55-5.7 13.112s2.281 9.69 5.7 13.112l224.023 224.023-224.023 224.023c-3.421 3.421-5.7 8.55-5.7 13.112s2.281 9.69 5.7 13.112l28.502 28.502c3.421 3.421 8.55 5.7 13.112 5.7s9.69-2.281 13.112-5.7l265.638-265.638c3.421-3.421 5.7-8.55 5.7-13.112zM787.329 284.446c0-4.56-2.281-9.69-5.7-13.112l-265.638-265.638c-3.421-3.421-8.55-5.7-13.112-5.7s-9.69 2.281-13.112 5.7l-28.502 28.502c-3.421 3.421-5.7 8.55-5.7 13.112s2.281 9.69 5.7 13.112l224.023 224.023-224.023 224.023c-3.421 3.421-5.7 8.55-5.7 13.112s2.281 9.69 5.7 13.112l28.502 28.502c3.421 3.421 8.55 5.7 13.112 5.7s9.69-2.281 13.112-5.7l265.638-265.638c3.421-3.421 5.7-8.55 5.7-13.112z" />
|
||||
<glyph unicode="" glyph-name="code-fork" d="M383.999-36.572c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857 24.571-54.857 54.857-54.857 54.857 24.571 54.857 54.857zM383.999 621.714c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857 24.571-54.857 54.857-54.857 54.857 24.571 54.857 54.857zM749.714 548.571c0 30.286-24.571 54.857-54.857 54.857s-54.857-24.571-54.857-54.857 24.571-54.857 54.857-54.857 54.857 24.571 54.857 54.857zM804.571 548.571c0-40.571-22.286-76-54.857-94.857-1.714-206.286-148-252-245.143-282.857-90.857-28.571-120.571-42.286-120.571-97.714v-14.857c32.571-18.857 54.857-54.286 54.857-94.857 0-60.571-49.143-109.714-109.714-109.714s-109.714 49.143-109.714 109.714c0 40.571 22.286 76 54.857 94.857v468.571c-32.571 18.857-54.857 54.286-54.857 94.857 0 60.571 49.143 109.714 109.714 109.714s109.714-49.143 109.714-109.714c0-40.571-22.286-76-54.857-94.857v-284c29.143 14.286 60 24 88 32.571 106.286 33.714 166.857 58.857 168 178.286-32.571 18.857-54.857 54.286-54.857 94.857 0 60.571 49.143 109.714 109.714 109.714s109.714-49.143 109.714-109.714z" />
|
||||
<glyph unicode="" glyph-name="file-alt" horiz-adv-x="878" d="M585.143 512v269.714c8-5.143 14.857-10.286 20.571-16l233.143-233.143c5.714-5.714 10.857-12.571 16-20.571h-269.714zM512 493.714c0-30.286 24.571-54.857 54.857-54.857h310.857v-603.429c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h457.143v-310.857z" />
|
||||
<glyph unicode="" glyph-name="file-text-alt" horiz-adv-x="878" d="M838.857 532.571c5.714-5.714 10.857-12.571 16-20.571h-269.714v269.714c8-5.143 14.857-10.286 20.571-16zM566.857 438.857h310.857v-603.429c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h457.143v-310.857c0-30.286 24.571-54.857 54.857-54.857zM658.286 18.285v36.571c0 10.286-8 18.286-18.286 18.286h-402.286c-10.286 0-18.286-8-18.286-18.286v-36.571c0-10.286 8-18.286 18.286-18.286h402.286c10.286 0 18.286 8 18.286 18.286zM658.286 164.571v36.571c0 10.286-8 18.286-18.286 18.286h-402.286c-10.286 0-18.286-8-18.286-18.286v-36.571c0-10.286 8-18.286 18.286-18.286h402.286c10.286 0 18.286 8 18.286 18.286zM658.286 310.857v36.571c0 10.286-8 18.286-18.286 18.286h-402.286c-10.286 0-18.286-8-18.286-18.286v-36.571c0-10.286 8-18.286 18.286-18.286h402.286c10.286 0 18.286 8 18.286 18.286z" />
|
||||
<glyph unicode="" glyph-name="file-pdf" horiz-adv-x="878" d="M838.857 587.428c21.143-21.143 38.857-63.429 38.857-93.714v-658.286c0-30.286-24.571-54.857-54.857-54.857h-768c-30.286 0-54.857 24.571-54.857 54.857v914.286c0 30.286 24.571 54.857 54.857 54.857h512c30.286 0 72.571-17.714 93.714-38.857zM585.143 726.857v-214.857h214.857c-3.429 9.714-8.571 19.429-12.571 23.429l-178.857 178.857c-4 4-13.714 9.143-23.429 12.571zM804.571-146.286v585.143h-237.714c-30.286 0-54.857 24.571-54.857 54.857v237.714h-438.857v-877.714h731.429zM510.857 192.571c14.286-11.429 30.286-21.714 48-32 24 2.857 46.286 4 66.857 4 38.286 0 86.857-4.571 101.143-28 4-5.714 7.429-16 1.143-29.714-0.571-0.571-1.143-1.714-1.714-2.286v-0.571c-1.714-10.286-10.286-21.714-40.571-21.714-36.571 0-92 16.571-140 41.714-79.429-8.571-162.857-26.286-224-47.429-58.857-100.571-104-149.714-138.286-149.714-5.714 0-10.857 1.143-16 4l-13.714 6.857c-1.714 0.571-2.286 1.714-3.429 2.857-2.857 2.857-5.143 9.143-3.429 20.571 5.714 26.286 36.571 70.286 107.429 107.429 4.571 2.857 10.286 1.143 13.143-3.429 0.571-0.571 1.143-1.714 1.143-2.286 17.714 29.143 38.286 66.286 61.143 112.571 25.714 51.429 45.714 101.714 59.429 149.714-18.286 62.286-24 126.286-13.714 164 4 14.286 12.571 22.857 24 22.857h12.571c8.571 0 15.429-2.857 20-8.571 6.857-8 8.571-20.571 5.143-38.857-0.571-1.714-1.143-3.429-2.286-4.571 0.571-1.714 0.571-2.857 0.571-4.571v-17.143c-0.571-36-1.143-70.286-8-109.714 20-60 49.714-108.571 83.429-136zM181.714-42.286c17.143 8 41.714 32.571 78.286 90.286-42.857-33.143-69.714-70.857-78.286-90.286zM409.143 483.428c-5.714-16-5.714-43.429-1.143-75.429 1.714 9.143 2.857 17.714 4 25.143 1.143 9.714 2.857 17.714 4 24.571 0.571 1.714 1.143 2.857 2.286 4.571-0.571 0.571-0.571 1.714-1.143 2.857-0.571 10.286-4 16.571-7.429 20.571 0-1.143-0.571-1.714-0.571-2.286zM338.286 105.714c50.286 20 106.286 36 162.286 46.286-5.714 4.571-11.429 8.571-16.571 13.143-28 24.571-53.143 58.857-72.571 100.571-10.857-34.857-26.857-72-47.429-112.571-8.571-16-17.143-32-25.714-47.429zM707.429 114.857c-2.857 2.857-17.714 13.714-80 13.714 28-10.286 53.714-16 70.857-16 5.143 0 8 0 10.286 0.571 0 0.571-0.571 1.143-1.143 1.714z" />
|
||||
|
||||
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 223 KiB |
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user