diff --git a/module/doc/ui/edit.html.php b/module/doc/ui/edit.html.php
index 669a33cb61..30ca46dfc9 100644
--- a/module/doc/ui/edit.html.php
+++ b/module/doc/ui/edit.html.php
@@ -98,6 +98,7 @@ $doc->type == 'text' ? form
on::change('#product', "loadObjectModules"),
on::change('#project', "loadObjectModules"),
on::change('#execution', "loadObjectModules"),
+ $type == 'execution' ? formHidden('project', $doc->project) : null,
(strpos('product|project|execution', $type) !== false) ? formGroup
(
set::width('1/2'),
diff --git a/module/doc/ui/view.html.php b/module/doc/ui/view.html.php
index e08d5bedc4..d2c75f23a3 100644
--- a/module/doc/ui/view.html.php
+++ b/module/doc/ui/view.html.php
@@ -14,35 +14,38 @@ include($this->app->getModuleRoot() . 'ai/ui/promptmenu.html.php');
jsVar('docID', $docID);
-featureBar
-(
- li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)),
-);
-
-if($libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php';
-include 'lefttree.html.php';
-
-toolbar
-(
- $canExport ? item(set(array
+if(!isInModal())
+{
+ featureBar
(
- 'id' => $exportMethod,
- 'icon' => 'export',
- 'target' => '_self',
- 'class' => 'ghost export',
- 'text' => $lang->export,
- 'url' => createLink('doc', $exportMethod, "libID={$libID}&moduleID={$moduleID}&docID={$doc->id}")
- ))) : null,
- common::hasPriv('doc', 'createLib') ? item(set(array
+ li(backBtn(setClass('ghost'), set::icon('back'), $lang->goback)),
+ );
+
+ if($libID && common::hasPriv('doc', 'create')) include 'createbutton.html.php';
+ include 'lefttree.html.php';
+
+ toolbar
(
- 'icon' => 'plus',
- 'class' => 'btn secondary',
- 'text' => $lang->doc->createLib,
- 'url' => createLink('doc', 'createLib', "type={$type}&objectID={$objectID}"),
- 'data-toggle' => 'modal'
- ))) : null,
- $libID && common::hasPriv('doc', 'create') ? $createButton : null
-);
+ $canExport ? item(set(array
+ (
+ 'id' => $exportMethod,
+ 'icon' => 'export',
+ 'target' => '_self',
+ 'class' => 'ghost export',
+ 'text' => $lang->export,
+ 'url' => createLink('doc', $exportMethod, "libID={$libID}&moduleID={$moduleID}&docID={$doc->id}")
+ ))) : null,
+ common::hasPriv('doc', 'createLib') ? item(set(array
+ (
+ 'icon' => 'plus',
+ 'class' => 'btn secondary',
+ 'text' => $lang->doc->createLib,
+ 'url' => createLink('doc', 'createLib', "type={$type}&objectID={$objectID}"),
+ 'data-toggle' => 'modal'
+ ))) : null,
+ $libID && common::hasPriv('doc', 'create') ? $createButton : null
+ );
+}
$versionList = array();
for($itemVersion = $doc->version; $itemVersion > 0; $itemVersion--)
@@ -184,8 +187,7 @@ $contentDom = div
set::url(createLink('doc', 'edit', "docID=$doc->id")),
$doc->type != 'text' ? setData('toggle', 'modal') : null,
setClass('btn ghost'),
- icon('edit'),
- setData('app', $app->tab)
+ icon('edit')
) : null,
common::hasPriv('doc', 'delete') && !$doc->deleted ? btn
(