Files
dbx-main/app/modules/project/templates/project/_side.html
T
king 542e7fb7d1 feat(project): 용어 "업무" 통일·섹션 담당자 바로 지정·세부 업무 협업자·반응 알림
- 화면·메시지·알림 제목·도움말의 "작업" → "업무"(조사 포함). 큰 알림 팝업·PC 알림 소스는 예전 "작업 배정:" 접두어도 뗀다
- 보드·목록 섹션 제목 오른쪽 담당자 아이콘을 눌러 기본 담당자를 그 자리에서 지정
- 섹션을 접으면 제목 보통 굵기, 펼치면 다시 굵게
- 업무 창 세부 업무 줄 담당자 오른쪽에 협업자 지정(subtasks[].followers, list_followers_of)
- 댓글 이모티콘 반응을 켜면 댓글 쓴 사람에게 어떤 이모티콘인지 수신함 알림(type=reaction)
- 왼쪽 전체 보기의 기본 보기는 대시보드
- 대시보드 업무 목록 패널에서 연 업무 창은 패널 왼쪽에 열림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:27:38 +09:00

160 lines
10 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.
{# ── 프로젝트 모듈 좌측 사이드바 (공용) ──────────────────────────────
수신함·내 업무·휴지통·프로젝트 화면이 함께 쓴다 — 어느 화면이든 프로젝트
목록은 똑같다(Pro user 이상: 드래그 순서 변경·✎ 수정·× 삭제·우클릭 메뉴).
변수:
mention_unread 미확인 @태그 개수 (수신함 배지)
my_open_total 진행 중인 내 업무 개수 (내 업무 배지)
nav_projects 프로젝트 목록(평면)
current_pid 지금 보고 있는 프로젝트 id (내 업무/수신함 화면이면 0)
side_active 'inbox' | 'mytasks' | 'trash' | 'goals' | '' — 개인 메뉴 활성 표시
goal_years "목표" 아래 연도 목록(router._goal_years_nav — 올해는 항상 포함)
goal_year_active 목표 화면에서 보고 있는 연도
pj_pro Pro user 이상 — 프로젝트 생성·수정·순서·전체 보기·휴지통·전체 멤버·연도 추가
pj_admin Admin 이상 — 남이 만든 프로젝트도 삭제(그 밖은 만든 사람만)
목록 동작은 project.js 의 initSideTree(첫 화면을 같은 마크업으로 다시 그림),
새 프로젝트/수정 모달은 각 화면이 include 하는 project/_side_modals.html. #}
{# 날짜 팝업(openDatePopover)이 공휴일을 빨강으로 칠할 때 쓰는 표 — 이 사이드바는
프로젝트 관리의 모든 화면에 들어가므로 여기서 한 번 넘긴다(main.py 의 Jinja 전역). #}
<script>window.PJ_HOLIDAYS = {{ (pj_kr_holidays or {}) | tojson }};</script>
{# 모든 프로젝트 화면에서 같은 회의록 트리를 사용한다. #}
<link rel="stylesheet" href="/static/project-goal-nav.css?v=20261004e" />
<script src="/static/project-goal-nav.js?v=20261004d" defer></script>
<aside class="pj-side" data-is-pro="{{ 'true' if pj_pro else 'false' }}" data-is-padmin="{{ 'true' if pj_admin else 'false' }}"
data-is-super="{{ 'true' if user.is_super_admin else 'false' }}"
data-me="{{ user.email }}">
<!-- 전체 검색 — 제목·설명·댓글, 내가 볼 수 있는 모든 프로젝트(세부 업무 포함).
결과를 누르면 그 업무 팝업(/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>
{# 전체 보기(2026-10-08, Pro user 이상 — 멤버인 프로젝트 범위) — 예전 프로젝트 화면 오른쪽 위 "전체 프로젝트" 토글. 지금 프로젝트(없으면 목록 첫 프로젝트)
화면을 ?scope=all 로 연다 — 볼 수 있는 모든 프로젝트의 작업. 프로젝트 화면에서는 project.js 가 새로고침 없이 바꾼다. #}
{% if pj_pro %}
{% set _all_pid = current_pid or ((nav_projects | rejectattr("status", "equalto", "completed") | list | first or {}).id or 0) %}
{% if _all_pid %}
<a class="pj-side-navlink" id="pj-side-allview" href="/project/p/{{ _all_pid }}?scope=all">
<span class="material-symbols-outlined pj-side-navic">apps</span>
<span class="pj-side-navtext">전체 보기</span>
</a>
{% endif %}
{% endif %}
<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>
{# 휴지통 — Pro user 이상만 보이고(화면·복구 API 도 같음), 지운 업무를 3개월 보관. #}
{% if pj_pro %}
<a class="pj-side-navlink {% if side_active == 'trash' %}is-active{% endif %}" href="/project/trash">
<span class="material-symbols-outlined pj-side-navic">delete</span>
<span class="pj-side-navtext">휴지통</span>
</a>
{% endif %}
{# 목표 — 누르면 바로 아래에 연도가 펼쳐지고, 연도를 누르면 오른쪽에 그해 전체 목표
(/project/goals/{연도}). 펼침 상태는 localStorage(pj_goal_open), 목표 화면에서는 항상 펼침.
연도 추가는 Pro user 이상(마이그레이션 013). #}
{% set goal_open = side_active == 'goals' %}
<div class="pj-side-goal{% if goal_open %} is-open{% endif %}" id="pj-side-goal"
data-force-open="{{ 'true' if goal_open else 'false' }}">
<button type="button" class="pj-side-navlink pj-side-goal-toggle" id="pj-side-goal-toggle"
aria-expanded="{{ 'true' if goal_open else 'false' }}">
<span class="material-symbols-outlined pj-side-navic">flag</span>
<span class="pj-side-navtext">목표</span>
<span class="material-symbols-outlined pj-side-goal-caret">expand_more</span>
</button>
<div class="pj-side-goal-years" id="pj-side-goal-years"{% if not goal_open %} hidden{% endif %}>
{% for y in (goal_years or []) %}
<div class="pj-side-goal-branch" data-goal-year="{{ y }}">
{# 화살표는 하위 월을 접고 펼치고, 연도 글자는 기존 목표 화면을 연다. #}
<div class="pj-side-goal-year-row">
<button type="button" class="pj-side-goal-year-toggle" aria-expanded="true"
aria-controls="pj-side-meeting-months-{{ y }}" aria-label="{{ y }}년 하위 월 접기" title="하위 월 접기">
<span class="material-symbols-outlined" aria-hidden="true">chevron_right</span>
</button>
<a class="pj-side-goal-year{% if side_active == 'goals' and y == goal_year_active %} is-active{% endif %}"
href="/project/goals/{{ y }}">{{ y }}년</a>
</div>
<div class="pj-side-meeting-months" id="pj-side-meeting-months-{{ y }}" data-current-week="{{ week if goal_month is defined else '' }}"></div>
</div>
{% endfor %}
{% if pj_pro %}
<button type="button" class="pj-side-goal-add" id="pj-goal-year-add"
data-next="{{ ((goal_years or [0]) | max) + 1 }}">+ 연도 추가</button>
{% endif %}
</div>
</div>
</nav>
<div class="pj-side-block pj-tree-block">
<div class="pj-side-head">
<span>프로젝트</span>
{% if pj_pro %}
<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 }}"{% if pj_pro %} draggable="true"{% endif %}
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 '' }}" data-icon="{{ p.icon or '' }}">
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
{% if pj_pro %}<span class="pj-tree-handle" title="드래그로 순서 변경">⣿</span>{% endif %}
<a class="pj-tree-link" href="/project/p/{{ p.id }}"{% if pj_pro %} draggable="false"{% endif %}>
<span class="pj-tree-avatar{% if p.icon %} has-icon{% endif %}" style="background: {{ p.color }}">{% if p.icon %}{% set _a = p.icon.startswith("asana:") %}<span class="material-symbols-outlined pj-proj-ic{% if _a %} pj-ic-asana{% endif %}">{{ p.icon[6:] if _a else p.icon }}</span>{% else %}{{ p.name[0] | upper }}{% endif %}</span>
<span class="pj-tree-name">{{ p.name }}</span>
</a>
{% if pj_pro %}
<span class="pj-tree-acts">
<button type="button" class="pj-icon-btn pj-tree-edit" 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' }}" 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>
<!-- 전체 멤버 — 등록된 전체 직원(프로젝트 권한 보유자). Pro user 이상
(/api/all-users 는 @태그 후보로 누구나 부른다). 아이콘 클릭 시 그 사람이 담당자인 업무를
팝업으로 보여준다(프로젝트/세션/마감일). 수신함·내 업무·프로젝트 화면
모두에서 보인다 — 팝업 마크업은 _member_tasks_modal.html. -->
{% if pj_pro %}
<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>