feat(project): add font options and selected goal text formatting

Restore the board header add button to the task side panel while keeping footer quick entry. Add safe, persisted goal text formatting and self-hosted Project font preferences with shared help updates and regression coverage.
This commit is contained in:
2026-10-02 17:28:54 +09:00
parent 035cb83d6f
commit 20232baf06
39 changed files with 756 additions and 54 deletions
@@ -1,7 +1,7 @@
{% extends "erp_base.html" %}
{% block head_extra %}
<link rel="stylesheet" href="/static/project.css?v=20261002f" />
<link rel="stylesheet" href="/static/project.css?v=20261002g" />
<link rel="stylesheet" href="/static/vendor/material-symbols/material-symbols.css" />
{% endblock %}
@@ -37,6 +37,15 @@
{% endif %}
</div>
{% if is_admin and goals_enabled and board %}
<div class="pj-goal-format" id="pj-goal-format" role="toolbar" aria-label="선택한 글자 서식">
<span>글자를 드래그해 선택한 뒤 서식을 변경하세요.</span>
<label>색상 <input type="color" value="#1e1f21" data-goal-format="color" aria-label="글자 색상" disabled></label>
<label>굵기 <select data-goal-format="bold" aria-label="글자 굵기" disabled><option value="400">보통</option><option value="700">굵게</option></select></label>
<label>크기 <select data-goal-format="size" aria-label="글자 크기" disabled>{% for size in (10, 12, 14, 16, 18, 20, 24, 28, 32) %}<option value="{{ size }}"{% if size == 14 %} selected{% endif %}>{{ size }}px</option>{% endfor %}</select></label>
<button type="button" class="pj-btn" data-goal-format="reset" disabled>서식 초기화</button>
</div>
{% endif %}
<div class="pj-view pj-goal-pane" id="pj-goal-pane">
{% if not goals_enabled %}
<div class="pj-empty">연간 목표가 아직 준비되지 않았습니다(DB 마이그레이션 013 필요).</div>
@@ -166,10 +175,11 @@
{% if c.kind in ('month', 'quarter') %}data-h="{{ c.h }}" {% endif %}data-month="{{ c.m }}" data-span="{{ c.span }}" data-rspan="{{ c.rspan }}"
{%- if c.span > 1 %} colspan="{{ c.span }}" style="--span: {{ c.span }}"{% endif %}{% if c.rspan > 1 %} rowspan="{{ c.rspan }}"{% endif %}>
{%- if editable -%}
<textarea class="pj-goal-text" rows="1" data-row="{{ row.id }}" data-month="{{ c.m }}"
placeholder="{{ '연간 목표' if c.m == 0 else ((c.h ~ '분기 목표') if c.kind == 'quarter' else '') }}">{{ row.cells.get(c.m, '') }}</textarea>
<div class="pj-goal-text" contenteditable="true" role="textbox" aria-multiline="true" aria-label="목표 내용"
data-row="{{ row.id }}" data-month="{{ c.m }}"
data-placeholder="{{ '연간 목표' if c.m == 0 else ((c.h ~ '분기 목표') if c.kind == 'quarter' else '') }}">{{ c.html|safe }}</div>
{%- else -%}
<div class="pj-goal-text-ro">{{ row.cells.get(c.m, '') }}</div>
<div class="pj-goal-text-ro">{{ c.html|safe }}</div>
{%- endif -%}
</td>
{% endfor %}
@@ -181,7 +191,7 @@
{% if is_admin %}
<div class="pj-goal-foot">
<button type="button" class="pj-btn" id="pj-goal-area-add">+ 업무 영역 추가</button>
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
<span class="pj-goal-note">칸을 고치면 바로 저장됩니다. 글자를 드래그해 선택하면 표 위에서 색상·굵기·크기를 바꾸거나 서식을 초기화할 수 있습니다. 숫자 칸을 비우면 지워집니다. 구역·항목 칸을 우클릭하거나 칸의 ⋮ 버튼(키보드 Tab·Enter, 터치)을 누르면 색·순서·줄 추가·삭제 메뉴가 나옵니다.
{%- if board.halves %} 칸을 마우스로 끌어 여러 칸을 고른 뒤 우클릭 → 셀 병합, 병합된 칸은 우클릭 → 병합 해제(글은 왼쪽 위 칸에 남음).{% endif %}
월 이름을 누르면 그 달 주간 회의록이 열립니다.</span>
</div>
@@ -196,5 +206,6 @@
{% include "project/_side_modals.html" %}
{% include "project/_member_tasks_modal.html" %}
<script src="/static/project.js?v=20261002f" defer></script>
<script src="/static/project-goal-text.js?v=20261002g" defer></script>
<script src="/static/project.js?v=20261002g" defer></script>
{% endblock %}