Commit 9ad360c1 authored by Liam's avatar Liam Committed by Cecilia Vela Gurovic

Bug #1808096: "Edit file" panel doesn't go across entire width anymore

behatnotneeded

Change-Id: I6cf06c55e6cee7cd8e2738d4e9554a8f2ff4120c
parent 2a5964e7
......@@ -231,6 +231,20 @@ function pieform_element_filebrowser(Pieform $form, $element) {
}
}
}
$colspan = 4;
if (!$config['showtags'] && !$config['editmeta']) {
$colspan++;
}
if (!$config['select']) {
$colspan++;
}
if (($config['showtags'] && $config['editmeta']) || $config['select']) {
$colspan++;
}
if ($config['edit']) {
$colspan++;
}
$smarty->assign('colspan', $colspan);
return $smarty->fetch('artefact:file:form/filebrowser.tpl');
}
......@@ -352,6 +366,20 @@ function pieform_element_filebrowser_build_filelist($form, $element, $folder, $h
}
}
$colspan = 4;
if (!$showtags && !$editmeta) {
$colspan++;
}
if (!$selectable) {
$colspan++;
}
if (($showtags && $editmeta) || $selectable) {
$colspan++;
}
if ($editable) {
$colspan++;
}
$smarty->assign('downloadfolderaszip', $addzipdownloadlink);
$smarty->assign('edit', -1);
$smarty->assign('highlight', $highlight);
......@@ -364,7 +392,7 @@ function pieform_element_filebrowser_build_filelist($form, $element, $folder, $h
$smarty->assign('filelist', $filedata);
$smarty->assign('querybase', $querybase);
$smarty->assign('prefix', $prefix);
$smarty->assign('colspan', $colspan);
$params = 'folder=' . ($folder === null ? 0 : $folder);
if ($group !== null) {
$params .= '&group=' . $group;
......
<tr id="{$prefix}_edit_row"{if !$fileinfo} class="text-regular hidden editrow no-hover"{/if}>
<td colspan="6" class="fileedittablewrap form-condensed">
<td colspan="{$colspan}" class="fileedittablewrap form-condensed">
<div class="fileedittable">
<h4 id="{$prefix}_edit_heading" class="edit-heading">
{if $fileinfo}{if $fileinfo->artefacttype == 'folder'}{str tag=editfolder section=artefact.file}{else}{str tag=editfile section=artefact.file}{/if}{/if}
......
......@@ -169,7 +169,7 @@
</h3>
<div id="{$prefix}_filelist_container">
{include file="artefact:file:form/filelist.tpl" prefix=$prefix filelist=$filelist folderdownload=$folderdownload folderparams=$folderparams editable=$config.edit selectable=$config.select highlight=$highlight edit=$edit querybase=$querybase groupinfo=$groupinfo owner=$tabs.owner ownerid=$tabs.ownerid selectfolders=$config.selectfolders showtags=$config.showtags editmeta=$config.editmeta}
{include file="artefact:file:form/filelist.tpl" prefix=$prefix filelist=$filelist folderdownload=$folderdownload folderparams=$folderparams editable=$config.edit selectable=$config.select highlight=$highlight edit=$edit querybase=$querybase groupinfo=$groupinfo owner=$tabs.owner ownerid=$tabs.ownerid selectfolders=$config.selectfolders showtags=$config.showtags editmeta=$config.editmeta colspan=$colspan}
</div>
</div>
......
......@@ -21,6 +21,9 @@
{if ($showtags && $editmeta) || $selectable}
<th class="right nowrap"></th>
{/if}
{if $editable}
<th></th>
{/if}
</tr>
</thead>
......@@ -69,7 +72,6 @@
{/if}
{/if}
</td>
<td class="filename">
{if $file->artefacttype == 'folder'}
<a href="{$querybase|safe}folder={$file->id}{if $owner}&owner={$owner}{if $ownerid}&ownerid={$ownerid}{/if}{/if}" id="changefolder:{$file->id}" class="inner-link changefolder">
......@@ -174,7 +176,7 @@
{/if}
</tr>
{if $edit == $file->id}
{include file="artefact:file:form/editfile.tpl" prefix=$prefix fileinfo=$file groupinfo=$groupinfo}
{include file="artefact:file:form/editfile.tpl" prefix=$prefix fileinfo=$file groupinfo=$groupinfo colspan=$colspan}
{/if}
{/foreach}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment