feat(project): 좌측 프로젝트 목록을 모든 화면에서 동일하게(순서변경·수정·삭제)
수신함·내 업무·휴지통 화면의 프로젝트 목록에도 프로젝트 화면과 같은 드래그 순서 변경(⣿)·✎ 수정·× 삭제·우클릭 메뉴를 붙인다. - 트리 동작을 initProject 에서 공용 initSideTree 로 분리 - 새 프로젝트/수정 모달을 _side_modals.html 로 모아 네 화면이 include - 수신함·휴지통에도 color_palette 전달, 정적 파일 버전 20260925a Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{# ── 프로젝트 모듈 좌측 사이드바 (공용) ──────────────────────────────
|
||||
내 업무 화면(mytasks.html)과 프로젝트 화면(project.html)이 함께 쓴다.
|
||||
수신함·내 업무·휴지통·프로젝트 화면이 함께 쓴다 — 어느 화면이든 프로젝트
|
||||
목록은 똑같다(관리자: 드래그 순서 변경·✎ 수정·× 삭제·우클릭 메뉴).
|
||||
|
||||
변수:
|
||||
mention_unread 미확인 @태그 개수 (수신함 배지)
|
||||
@@ -8,9 +9,11 @@
|
||||
current_pid 지금 보고 있는 프로젝트 id (내 업무/수신함 화면이면 0)
|
||||
side_active 'inbox' | 'mytasks' | 'trash' | '' — 개인 메뉴 활성 표시
|
||||
is_admin 프로젝트 생성/수정/삭제 권한
|
||||
프로젝트 수정/삭제(✎/×) 버튼은 그 동작을 배선하는 initProject 가 도는
|
||||
프로젝트 화면에서만 그린다(current_pid 로 판별). #}
|
||||
<aside class="pj-side">
|
||||
목록 동작은 project.js 의 initSideTree(첫 화면을 같은 마크업으로 다시 그림),
|
||||
새 프로젝트/수정 모달은 각 화면이 include 하는 project/_side_modals.html. #}
|
||||
<aside class="pj-side" data-is-admin="{{ 'true' if is_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">
|
||||
@@ -42,29 +45,31 @@
|
||||
{% endif %}
|
||||
</nav>
|
||||
|
||||
<div class="pj-side-block">
|
||||
<div class="pj-side-block pj-tree-block">
|
||||
<div class="pj-side-head">
|
||||
<span>프로젝트</span>
|
||||
{# 새 프로젝트 모달(#pj-modal-project)을 갖고 그 동작을 배선하는
|
||||
화면에서만 보인다 — 수신함에는 그 모달이 없다. #}
|
||||
{% if is_admin and side_active != 'inbox' %}
|
||||
{% if is_admin %}
|
||||
<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 }}"
|
||||
<li class="pj-tree-li" data-id="{{ p.id }}"{% if is_admin %} 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 '' }}">
|
||||
<div class="pj-tree-row {% if p.id == current_pid %}is-active{% endif %}">
|
||||
<a class="pj-tree-link" href="/project/p/{{ p.id }}">
|
||||
{% if is_admin %}<span class="pj-tree-handle" title="드래그로 순서 변경">⣿</span>{% endif %}
|
||||
<a class="pj-tree-link" href="/project/p/{{ p.id }}"{% if is_admin %} draggable="false"{% endif %}>
|
||||
<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 %}
|
||||
{% if is_admin %}
|
||||
<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-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 %}
|
||||
|
||||
Reference in New Issue
Block a user