Files
dbx-main/app/modules/project/templates/project/_side.html
T
king 86db89a220 feat(project): 좌측 전체 멤버 관리자 전용 + 수신함·내 업무 화면에도 표시
멤버 업무 팝업을 initProject 밖 공용 initMemberTasks 로 분리하고 마크업은
_member_tasks_modal.html 로 빼 세 화면이 include. 프로젝트 화면 밖에선
업무 더블클릭 시 그 업무의 프로젝트 화면(?task=)으로 이동.
/api/all-users 는 @태그 후보에도 쓰여 서버 제한 없이 화면에서만 숨김.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 21:24:38 +09:00

95 lines
5.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{# ── 프로젝트 모듈 좌측 사이드바 (공용) ──────────────────────────────
내 업무 화면(mytasks.html)과 프로젝트 화면(project.html)이 함께 쓴다.
변수:
mention_unread 미확인 @태그 개수 (수신함 배지)
my_open_total 진행 중인 내 업무 개수 (내 업무 배지)
nav_projects 프로젝트 목록(평면)
current_pid 지금 보고 있는 프로젝트 id (내 업무/수신함 화면이면 0)
side_active 'inbox' | 'mytasks' | '' — 개인 메뉴 활성 표시
is_admin 프로젝트 생성/수정/삭제 권한
프로젝트 수정/삭제(✎/×) 버튼은 그 동작을 배선하는 initProject 가 도는
프로젝트 화면에서만 그린다(current_pid 로 판별). #}
<aside class="pj-side">
<!-- 전체 검색 — 제목·설명·댓글, 내가 볼 수 있는 모든 프로젝트(하위 업무 포함).
결과를 누르면 그 업무 팝업(/project/t/{id})으로. 어디서든 "/" 키로 포커스. -->
<div class="pj-side-search">
<span class="material-symbols-outlined pj-side-search-ic">search</span>
<input type="search" id="pj-global-search" placeholder="전체 검색 ( / )" autocomplete="off" aria-label="업무 전체 검색" />
<div class="pj-search-results" id="pj-search-results" hidden></div>
</div>
<!-- 아사나처럼 맨 위에 개인 메뉴(수신함 / 내 업무). 내 업무는 접었다 펴는
패널이 아니라 오른쪽 화면 전체에 목록을 띄우는 별도 페이지다. -->
<nav class="pj-side-nav">
<a class="pj-side-navlink {% if side_active == 'inbox' %}is-active{% endif %}" href="/project/inbox">
<span class="material-symbols-outlined pj-side-navic">inbox</span>
<span class="pj-side-navtext">수신함</span>
<span class="pj-side-navbadge" id="pj-mention-badge"
{% if not mention_unread %}hidden{% endif %}>{{ mention_unread }}</span>
</a>
<a class="pj-side-navlink {% if side_active == 'mytasks' %}is-active{% endif %}" href="/project/">
<span class="material-symbols-outlined pj-side-navic">checklist</span>
<span class="pj-side-navtext">내 업무</span>
<span class="pj-side-navbadge pj-side-navbadge-open" id="pj-myopen-badge"
{% if not my_open_total %}hidden{% endif %}>{{ my_open_total }}</span>
</a>
</nav>
<div class="pj-side-block">
<div class="pj-side-head">
<span>프로젝트</span>
{# 새 프로젝트 모달(#pj-modal-project)을 갖고 그 동작을 배선하는
화면에서만 보인다 — 수신함에는 그 모달이 없다. #}
{% if is_admin and side_active != 'inbox' %}
<button type="button" class="pj-icon-btn" id="pj-new-project-side" title="새 프로젝트">+</button>
{% endif %}
</div>
{% macro nav_li(p) %}
<li class="pj-tree-li" data-id="{{ p.id }}"
data-name="{{ p.name }}" data-desc="{{ p.description or '' }}"
data-start="{{ p.start_date or '' }}" data-due="{{ p.due_date or '' }}"
data-color="{{ p.color }}" data-status="{{ p.status or 'active' }}"
data-creator="{{ p.created_by or '' }}">
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
<a class="pj-tree-link" href="/project/p/{{ p.id }}">
<span class="pj-tree-avatar" style="background: {{ p.color }}">{{ p.name[0] | upper }}</span>
<span class="pj-tree-name">{{ p.name }}</span>
</a>
{% if is_admin and current_pid %}
<span class="pj-tree-acts">
<button type="button" class="pj-icon-btn pj-tree-edit" title="프로젝트 수정">✎</button>
<button type="button" class="pj-icon-btn pj-tree-del" data-id="{{ p.id }}" data-name="{{ p.name }}" data-creator="{{ p.created_by }}" title="프로젝트 삭제">×</button>
</span>
{% endif %}
</div>
</li>
{% endmacro %}
{% set nav_active = nav_projects | rejectattr("status", "equalto", "completed") | list %}
{% set nav_done = nav_projects | selectattr("status", "equalto", "completed") | list %}
{% if nav_active %}
<ul class="pj-tree" id="pj-tree-root">
{% for p in nav_active %}{{ nav_li(p) }}{% endfor %}
</ul>
{% else %}
<div class="pj-empty-sm">프로젝트 없음</div>
{% endif %}
{% if nav_done %}
<div class="pj-side-head pj-side-head-done"><span>완료 프로젝트</span></div>
<ul class="pj-tree" id="pj-tree-root-done">
{% for p in nav_done %}{{ nav_li(p) }}{% endfor %}
</ul>
{% endif %}
</div>
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). 관리자 전용
(/api/all-users 도 관리자만). 아이콘 클릭 시 그 사람이 담당자인 업무를
팝업으로 보여준다(프로젝트/세션/마감일). 수신함·내 업무·프로젝트 화면
모두에서 보인다 — 팝업 마크업은 _member_tasks_modal.html. -->
{% if is_admin %}
<div class="pj-side-block">
<div class="pj-side-head"><span>전체 멤버</span></div>
<div class="pj-allmembers-grid" id="pj-allmembers-grid">불러오는 중…</div>
</div>
{% endif %}
</aside>