open same details page from board view; make assignee button more obvious
This commit is contained in:
@@ -21,62 +21,82 @@ templ Dashboard(props DashboardProps) {
|
||||
}
|
||||
|
||||
templ DashboardContent(props DashboardProps) {
|
||||
<div class="flex flex-row mx-auto">
|
||||
<div class="w-full flex flex-col border-r border-base-200 overflow-auto">
|
||||
<div class="flex p-2 border-b border-base-200 justify-between items-center gap-2">
|
||||
<div class="w-full">
|
||||
@components.SearchForm(components.SearchFormProps{
|
||||
RootURL: props.BaseURL,
|
||||
SearchQuery: props.QueryParam,
|
||||
Target: "#issue-list-container",
|
||||
})
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
hx-get="/issues/create"
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
New Issue
|
||||
</button>
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex flex-col border-b border-base-200">
|
||||
<div class="flex p-2 border-b border-base-200 items-center gap-2">
|
||||
@components.SearchForm(components.SearchFormProps{
|
||||
RootURL: props.BaseURL,
|
||||
SearchQuery: props.QueryParam,
|
||||
Target: "#issue-list-container",
|
||||
})
|
||||
</div>
|
||||
<div id="issue-list-container" class="p-2">
|
||||
@DashboardIssueList(props.Issues, props.SelectedIssue.ID)
|
||||
<div class="flex p-2 justify-between items-center gap-2">
|
||||
<div class="flex gap-2">
|
||||
<div class="join">
|
||||
<button class="btn btn-sm join-item btn-active btn-primary">List</button>
|
||||
<button
|
||||
class="btn btn-sm join-item"
|
||||
hx-get="/?board=true"
|
||||
hx-target="main"
|
||||
hx-swap="innerHTML"
|
||||
hx-push-url="true"
|
||||
>Board</button>
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-primary btn-sm"
|
||||
hx-get="/issues/create"
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
New Issue
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-error btn-sm btn-outline"
|
||||
hx-delete={ "/issues/" + props.SelectedIssue.ID }
|
||||
hx-confirm="Are you sure you want to delete this issue? This action cannot be undone."
|
||||
hx-target="body"
|
||||
>
|
||||
Delete issue
|
||||
</button>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
if props.SelectedIssue != nil {
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-sm"
|
||||
hx-get={ "/issues/" + props.SelectedIssue.ID + "/edit" }
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm"
|
||||
hx-get={ "/issues/" + props.SelectedIssue.ID }
|
||||
hx-target="main"
|
||||
hx-swap="innerHTML"
|
||||
hx-push-url="true"
|
||||
>Details</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full p-2 max-[770px]:hidden">
|
||||
if props.SelectedIssue != nil {
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary btn-sm"
|
||||
hx-get={ "/issues/" + props.SelectedIssue.ID + "/edit" }
|
||||
hx-target="#modal-container"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-error btn-sm btn-outline"
|
||||
hx-delete={ "/issues/" + props.SelectedIssue.ID }
|
||||
hx-confirm="Are you sure you want to delete this issue? This action cannot be undone."
|
||||
hx-target="body"
|
||||
>
|
||||
Delete issue
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm fixed right-3"
|
||||
hx-get={ "/issues/" + props.SelectedIssue.ID }
|
||||
hx-target="main"
|
||||
hx-swap="innerHTML"
|
||||
hx-push-url="true"
|
||||
>Details</button>
|
||||
<div id="issue-detail-container">
|
||||
@components.IssueDetail(components.IssueDetailProps{
|
||||
Issue: props.SelectedIssue,
|
||||
})
|
||||
<div class="flex flex-row flex-1 overflow-hidden">
|
||||
<div class="w-full flex flex-col border-r border-base-200 overflow-auto">
|
||||
<div id="issue-list-container" class="p-2">
|
||||
@DashboardIssueList(props.Issues, props.SelectedIssue.ID)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-full p-2 overflow-auto max-[770px]:hidden">
|
||||
if props.SelectedIssue != nil {
|
||||
<div id="issue-detail-container">
|
||||
@components.IssueDetail(components.IssueDetailProps{
|
||||
Issue: props.SelectedIssue,
|
||||
})
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user