redmine-workflow-engine/app/views/workflow_dashboard/project.html.erb
ioresponse e67fb92189 Initial commit: Redmine Workflow Engine Plugin
Features:
- Custom workflow creation per project/tracker
- Step-by-step workflow definition
- Assignees per step (user, role group, department)
- Next/Previous step navigation
- Reject to first step
- Skip step (admin only)
- Step deadline settings
- Workflow dashboard
- Group member selection when proceeding

🤖 Generated with Claude Code
2025-12-23 00:16:43 +09:00

100 lines
4.2 KiB
Plaintext

<h2>워크플로우 현황: <%= @project.name %></h2>
<p>
<%= link_to '&larr; 대시보드로'.html_safe, workflow_dashboard_path, class: 'icon icon-back' %>
</p>
<!-- 단계별 현황 -->
<div class="box">
<h3 style="margin-top: 0;">단계별 이슈 현황</h3>
<% if @steps_summary.any? %>
<div style="display: flex; flex-wrap: wrap; gap: 15px;">
<% @steps_summary.each do |step_name, states| %>
<div style="flex: 1; min-width: 250px; border: 1px solid #ddd; border-radius: 8px; padding: 15px; background: #fafafa;">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;">
<strong style="font-size: 14px;"><%= step_name %></strong>
<span style="background: #007bff; color: white; padding: 2px 10px; border-radius: 12px; font-size: 12px;">
<%= states.count %>건
</span>
</div>
<div style="max-height: 200px; overflow-y: auto;">
<% states.each do |state| %>
<div style="background: white; padding: 8px; margin-bottom: 5px; border-radius: 4px; border-left: 3px solid #007bff;">
<div>
<%= link_to "##{state.issue.id}", issue_path(state.issue), style: 'font-weight: bold;' %>
<%= truncate(state.issue.subject, length: 30) %>
</div>
<div style="font-size: 11px; color: #666; margin-top: 3px;">
담당: <%= state.issue.assigned_to&.name || '-' %>
<% if state.current_step&.due_days.present? %>
<%
step_started_at = state.updated_at
due_date = step_started_at + state.current_step.due_days.days
remaining = ((due_date - Time.current) / 1.day).to_i
%>
<% if remaining < 0 %>
| <span style="color: #dc3545; font-weight: bold;">지연 <%= remaining.abs %>일</span>
<% elsif remaining == 0 %>
| <span style="color: #f57c00; font-weight: bold;">오늘 마감</span>
<% else %>
| 남은 기한: <%= remaining %>일
<% end %>
<% end %>
</div>
</div>
<% end %>
</div>
</div>
<% end %>
</div>
<% else %>
<p class="nodata">진행 중인 워크플로우 이슈가 없습니다.</p>
<% end %>
</div>
<!-- 전체 이슈 목록 -->
<div class="box" style="margin-top: 20px;">
<h3 style="margin-top: 0;">전체 워크플로우 이슈</h3>
<% if @workflow_states.any? %>
<table class="list">
<thead>
<tr>
<th style="width: 60px;">#</th>
<th>제목</th>
<th style="width: 120px;">워크플로우</th>
<th style="width: 100px;">현재 단계</th>
<th style="width: 100px;">담당자</th>
<th style="width: 80px;">상태</th>
<th style="width: 100px;">갱신일</th>
</tr>
</thead>
<tbody>
<% @workflow_states.each do |state| %>
<tr class="<%= state.completed_at ? 'even' : '' %>">
<td><%= link_to "##{state.issue.id}", issue_path(state.issue) %></td>
<td><%= link_to state.issue.subject, issue_path(state.issue) %></td>
<td><%= state.custom_workflow&.name %></td>
<td>
<% if state.completed_at %>
<span style="background: #28a745; color: white; padding: 2px 6px; border-radius: 3px; font-size: 11px;">완료</span>
<% else %>
<span style="background: #007bff; color: white; padding: 2px 6px; border-radius: 3px; font-size: 11px;">
<%= state.current_step&.name %>
</span>
<% end %>
</td>
<td><%= state.issue.assigned_to&.name || '-' %></td>
<td><%= state.issue.status&.name %></td>
<td><%= format_time(state.updated_at) %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata">워크플로우 이슈가 없습니다.</p>
<% end %>
</div>