Skip to content

Commit

Permalink
Merge pull request #2897 from Leantime/wiki-fixes
Browse files Browse the repository at this point in the history
Wiki fixes
  • Loading branch information
marcelfolaron authored Jan 15, 2025
2 parents 8cb0b19 + 36407b2 commit 8a980da
Show file tree
Hide file tree
Showing 13 changed files with 727 additions and 219 deletions.
1 change: 1 addition & 0 deletions app/Domain/Ideas/Controllers/AdvancedBoards.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private function prepareViewData($currentCanvasId, $allCanvas = null)
if ($allCanvas === null) {
$allCanvas = $this->ideaRepo->getAllCanvas(session('currentProject'));
}

$this->tpl->assign('currentCanvas', $currentCanvasId);
$this->tpl->assign('users', $this->projectService->getUsersAssignedToProject(session('currentProject')));
$this->tpl->assign('allCanvas', $allCanvas);
Expand Down
30 changes: 17 additions & 13 deletions app/Domain/Ideas/Templates/advancedBoards.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
//get canvas title
foreach ($allCanvas as $canvasRow) {
if ($canvasRow->title == $currentCanvas) {
if ($canvasRow->id == $currentCanvas) {
$canvasTitle = $canvasRow->title;
break;
}
}
@endphp
@endphp

<div class="pageheader">
<div class="pageheader">
<div class="pageicon"><i class="far fa-lightbulb"></i></div>
<div class="pagetitle">
<h5><?php $tpl->e(session('currentProjectClient') . ' // ' . session('currentProjectName')); ?></h5>
Expand Down Expand Up @@ -67,7 +67,7 @@ class="delete">

@foreach ($allCanvas as $canvasRow)
<x-global::actions.dropdown.item
href="{{ BASE_URL }}/ideas/showBoards/{{ $canvasRow->title }}">
href="{{ BASE_URL }}/ideas/showBoards/{{ $canvasRow->id }}">
{{ $canvasRow->title }}
</x-global::actions.dropdown.item>
@endforeach
Expand Down Expand Up @@ -131,13 +131,13 @@ class="active">
<div id="sortableIdeaKanban" class="sortableTicketList">
<div class="row-fluid">
@foreach ($canvasLabels as $key => $statusRow)
<div class="column" style="width:{{ $size }}%;">
<h4 class="widgettitle title-primary">
<div class="column">
<h4 class="flex justify-between items-center widgettitle title-primary py-[10px] px-[15px]">
{{ $statusRow['name'] }}
@if ($login::userIsAtLeast($roles::$manager))
<a href="#/setting/editBoxLabel?module=idealabels&label={{ $key }}"
class="editHeadline"><i class="fas fa-edit"></i></a>
@endif
{{ $statusRow['name'] }}
</h4>
<div class="contentInner status_{{ $key }}">
@foreach ($canvasItems as $row)
Expand Down Expand Up @@ -243,22 +243,26 @@ class="editHeadline"><i class="fas fa-edit"></i></a>
</div>
</div>

<script type="text/javascript">
<script type="module">
import "@mix('/js/Domain/Ideas/Js/ideasController.js')"
import "@mix('/js/Domain/Canvas/Js/canvasController.js')"
import "@mix('/js/Domain/Auth/Js/AuthController.js')"
jQuery(document).ready(function() {
leantime.ideasController.initBoardControlModal();
leantime.ideasController.setKanbanHeights();
ideasController.initBoardControlModal();
ideasController.setKanbanHeights();
@if ($login::userIsAtLeast($roles::$editor))
var ideaStatusList = [
@foreach ($canvasLabels as $key => $statusRow)
'{{ $key }}',
@endforeach
];
leantime.ideasController.initIdeaKanban(ideaStatusList);
leantime.canvasController.initUserDropdown('ideas');
ideasController.initIdeaKanban(ideaStatusList);
canvasController.initUserDropdown('ideas');
@else
leantime.authController.makeInputReadonly(".maincontentinner");
authController.makeInputReadonly(".maincontentinner");
@endif
});
Expand Down
594 changes: 398 additions & 196 deletions app/Domain/Wiki/Templates/partials/articleDialog.blade.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/Domain/Wiki/Templates/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function createTreeView($array, $currentParent, int $currLevel = 0, int $prevLev
echo"<br /><h3>" . $tpl->__("headlines.no_articles_yet") . "</h3>";
echo "" . $tpl->__("text.create_new_content") . "<br /><br />
<a href='#/wiki/articleDialog/' class='inlineEdit btn btn-primary'><i class='fa fa-plus'></i> " . $tpl->__("link.create_article") . "</a><br/><br/>";
<a href='#/wiki/articleDialog/' class='inlineEdit btn btn-sm btn-primary'><i class='fa fa-plus'></i> " . $tpl->__("link.create_article") . "</a><br/><br/>";
echo"</div>";
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</div>
@else
<!-- Regular Dropdown Menu -->
<ul tabindex="0" class="{{ $menuClass }}" {{ $selectable ? 'data-selectable-item' : '' }}>
<ul tabindex="0" class="{{ $menuClass }} z-50" {{ $selectable ? 'data-selectable-item' : '' }}>
{!! $menu !!}
</ul>
@endif
Expand Down
18 changes: 18 additions & 0 deletions app/Views/Templates/components/forms/emoji-picker.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div>
<emoji-picker></emoji-picker>
<textarea id="emoji-input" rows="3" class="form-control mt-2"></textarea>
</div>

<script type="module">
// import '@nolanlawson/emoji-picker-element';
document.addEventListener('DOMContentLoaded', function () {
const emojiPicker = document.querySelector('emoji-picker');
const inputField = document.querySelector('#emoji-input');
emojiPicker.addEventListener('emoji-click', (event) => {
const emoji = event.detail.unicode;
inputField.value += emoji;
});
});
</script>
Loading

0 comments on commit 8a980da

Please sign in to comment.