Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -1368,7 +1368,7 @@ class productModel extends model
|
||||
if(empty($products)) return array();
|
||||
|
||||
$productKeys = array_keys($products);
|
||||
if($orderBy == 'program_asc')
|
||||
if($orderBy == 'program_asc' and $this->config->systemMode == 'new')
|
||||
{
|
||||
$products = $this->dao->select('t1.id as id, t1.*')->from(TABLE_PRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="productTableList">
|
||||
<?php $lineNames = array();?>
|
||||
<?php foreach($productStructure as $programID => $program):?>
|
||||
<?php
|
||||
$trAttrs = "data-id='program.$programID' data-parent='0' data-nested='true'";
|
||||
@@ -86,7 +87,8 @@
|
||||
<?php endif;?>
|
||||
|
||||
<?php foreach($program as $lineID => $line):?>
|
||||
<?php if(isset($line['lineName'])):?>
|
||||
<?php if(isset($line['lineName']) and !in_array($line['lineName'], $lineNames)):?>
|
||||
<?php $lineNames[] = $line['lineName'];?>
|
||||
<?php
|
||||
if($this->config->systemMode == 'new' and $programID)
|
||||
{
|
||||
|
||||
@@ -345,6 +345,7 @@ class repo extends control
|
||||
public function browse($repoID = 0, $branchID = '', $objectID = 0, $path = '', $revision = 'HEAD', $refresh = 0)
|
||||
{
|
||||
$repoID = $this->repo->saveState($repoID, $objectID);
|
||||
if($branchID) $branchID = base64_decode($branchID);
|
||||
|
||||
/* Get path and refresh. */
|
||||
if($this->get->repoPath) $path = $this->get->repoPath;
|
||||
@@ -1145,6 +1146,7 @@ class repo extends control
|
||||
{
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$branches = $this->repo->getBranches($repo);
|
||||
if($branchID) $branchID = base64_decode($branchID);
|
||||
|
||||
$branchesHtml = "<div class='table-row'><div class='table-col col-left'><div class='list-group' style='margin-bottom: 0;'>";
|
||||
foreach($branches as $id => $branchName)
|
||||
|
||||
@@ -104,7 +104,7 @@ class repoModel extends model
|
||||
|
||||
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
|
||||
|
||||
$dropMenuLink = helper::createLink('repo', 'ajaxGetBranchDropMenu', "repID=$repoID&branchID=$branchID&objectID=$objectID");
|
||||
$dropMenuLink = helper::createLink('repo', 'ajaxGetBranchDropMenu', "repID=$repoID&branchID=" . base64_encode($branchID) . "&objectID=$objectID");
|
||||
$output .= "<div class='btn-group'><button id='currentBranch' data-toggle='dropdown' type='button' class='btn btn-limit'>{$branchName} <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div>";
|
||||
|
||||
@@ -31,14 +31,15 @@ css::import($jsRoot . 'misc/highlight/styles/github.css');
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo " <span class='label label-info'>" . $revisionName . '</span>';
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<?php
|
||||
foreach($branches as $id => $branchName)
|
||||
{
|
||||
echo "<li>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$id&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
$base64BranchID = base64_encode($id);
|
||||
echo "<li>" . html::a($this->createLink('repo', 'browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $branchName, '', "title='{$branchName}' class='text-ellipsis' data-app='{$app->openApp}'") . "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@@ -38,14 +39,15 @@
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths= explode('/', $path);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
?>
|
||||
@@ -54,7 +56,7 @@
|
||||
</div>
|
||||
<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=$branchID&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->openApp}");?>
|
||||
<?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->openApp}");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
@@ -80,7 +82,7 @@
|
||||
<td>
|
||||
<?php
|
||||
$infoPath = trim($path . '/' . $info->name, '/');
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($infoPath));
|
||||
$link = $info->kind == 'dir' ? $this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($infoPath)) : $this->repo->createLink('view', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($infoPath));
|
||||
echo html::a($link, $info->name, '', "title='{$info->name}' data-app={$app->openApp}");
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -29,13 +29,14 @@
|
||||
<div class="page-title">
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
$paths = explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
if(strpos($repo->SCM, 'Subversion') === false)
|
||||
|
||||
@@ -19,7 +19,7 @@ $typeInfo = $type == 'file' ? '&type=file' : '';
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<?php $browseLink = $app->session->revisionList != false ? $app->session->revisionList : $this->repo->createLink('browse', "repoID={$repoID}&branchID=$branchID&objectID=$objectID{$preDir}");?>
|
||||
<?php $browseLink = $app->session->revisionList != false ? $app->session->revisionList : $this->repo->createLink('browse', "repoID={$repoID}&branchID=" . base64_encode($branchID) . "&objectID=$objectID{$preDir}");?>
|
||||
<?php echo html::a($browseLink, "<i class='icon icon-back'></i>" . $lang->goback, '', "class='btn btn-link'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
|
||||
@@ -25,14 +25,15 @@ $version = " <span class=\"label label-info\">$revisionName</span>";
|
||||
<div class="page-title">
|
||||
<strong>
|
||||
<?php
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$base64BranchID = base64_encode($branchID);
|
||||
echo html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID"), $repo->name, '', "data-app='{$app->openApp}'");
|
||||
$paths= explode('/', $entry);
|
||||
$fileName = array_pop($paths);
|
||||
$postPath = '';
|
||||
foreach($paths as $pathName)
|
||||
{
|
||||
$postPath .= $pathName . '/';
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$branchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
echo '/' . ' ' . html::a($this->repo->createLink('browse', "repoID=$repoID&branchID=$base64BranchID&objectID=$objectID&path=" . $this->repo->encodePath($postPath)), trim($pathName, '/'), '', "data-app='{$app->openApp}'");
|
||||
}
|
||||
echo '/' . ' ' . $fileName;
|
||||
echo $version;
|
||||
|
||||
Reference in New Issue
Block a user