* finish task #7074.
This commit is contained in:
@@ -40,6 +40,14 @@ $(function()
|
||||
}
|
||||
setTimeout($.resetToolbarPosition, 50);
|
||||
});
|
||||
|
||||
if(!canDeleteFile)
|
||||
{
|
||||
$('.detail-content .files-list li').each(function()
|
||||
{
|
||||
$(this).find('a[onclick^=deleteFile]').remove();
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
function deleteFile(fileID)
|
||||
|
||||
@@ -118,7 +118,7 @@ js::set('docID', $doc->id);
|
||||
<img onload="setImageSize(this, 0)" src="<?php echo $this->createLink('file', 'read', "fileID={$file->id}");?>" alt="<?php echo $file->title?>">
|
||||
</a>
|
||||
<span class='right-icon'>
|
||||
<?php if(common::hasPriv('file', 'delete')) echo html::a('###', "<i class='icon icon-trash'></i>", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?>
|
||||
<?php if(common::hasPriv('doc', 'deleteFile')) echo html::a('###', "<i class='icon icon-trash'></i>", '', "class='btn-icon' title=\"{$lang->doc->deleteFile}\" onclick='deleteFile($file->id)'");?>
|
||||
</span>
|
||||
</div>
|
||||
<?php unset($doc->files[$file->id]);?>
|
||||
@@ -213,5 +213,6 @@ js::set('docID', $doc->id);
|
||||
<div id="mainActions" class='main-actions'>
|
||||
<?php common::printPreAndNext($preAndNext);?>
|
||||
</div>
|
||||
<?php js::set('canDeleteFile', common::hasPriv('doc', 'deleteFile'));?>
|
||||
<?php include '../../common/view/syntaxhighlighter.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -629,6 +629,8 @@ class repoModel extends model
|
||||
->orderBy('time')
|
||||
->limit(1)
|
||||
->fetch();
|
||||
if(empty($lastBranchLog)) return false;
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->andWhere('time')->lt($lastBranchLog->time)->query();
|
||||
while($log = $stmt->fetch())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user