redmine-workflow-engine/app/views/issue_workflows/show.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

99 lines
3.4 KiB
Plaintext

<div class="box" style="margin-bottom: 20px;">
<h3 style="margin-top: 0;">워크플로우 진행 상태</h3>
<p>
<strong>워크플로우:</strong> <%= @workflow_state.custom_workflow.name %>
<% if @workflow_state.custom_workflow.description.present? %>
<br/><small style="color: #666;"><%= @workflow_state.custom_workflow.description %></small>
<% end %>
</p>
<div style="display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 15px 0;">
<% @steps.each_with_index do |step, idx| %>
<% is_current = @current_step && @current_step.id == step.id %>
<% is_completed = @current_step && step.position < @current_step.position %>
<div style="
padding: 8px 15px;
border-radius: 4px;
font-size: 13px;
<% if is_current %>
background: #007bff;
color: white;
font-weight: bold;
<% elsif is_completed %>
background: #28a745;
color: white;
<% else %>
background: #e9ecef;
color: #666;
<% end %>
">
<%= step.name %>
<% if step.is_start %>
<span style="font-size: 10px;">(시작)</span>
<% end %>
<% if step.is_end %>
<span style="font-size: 10px;">(종료)</span>
<% end %>
</div>
<% if idx < @steps.length - 1 %>
<span style="color: #999; font-size: 18px;">&rarr;</span>
<% end %>
<% end %>
</div>
<% if @current_step %>
<p>
<strong>현재 단계:</strong> <%= @current_step.name %>
</p>
<% if @current_step.workflow_step_assignees.any? %>
<p>
<strong>담당자:</strong>
<% @current_step.workflow_step_assignees.each do |assignee| %>
<span style="display: inline-block; background: #e9ecef; padding: 2px 8px; border-radius: 3px; margin: 2px; font-size: 12px;">
<%= assignee.assignee_name %>
</span>
<% end %>
</p>
<% end %>
<div style="margin-top: 15px;">
<% unless @current_step.is_end %>
<% if @workflow_state.can_proceed?(User.current) %>
<%= link_to '다음 단계로 &rarr;'.html_safe,
issue_workflow_next_step_path(@issue),
method: :post,
class: 'button button-positive',
data: { confirm: '다음 단계로 진행하시겠습니까?' } %>
<% else %>
<span class="button" style="opacity: 0.5; cursor: not-allowed;">다음 단계로 &rarr; (권한 없음)</span>
<% end %>
<% end %>
<% unless @current_step.is_start %>
<% if @workflow_state.can_go_back?(User.current) %>
<%= link_to '&larr; 이전 단계로'.html_safe,
issue_workflow_prev_step_path(@issue),
method: :post,
class: 'button',
data: { confirm: '이전 단계로 되돌리시겠습니까?' } %>
<% end %>
<% end %>
</div>
<% else %>
<p class="nodata">워크플로우 단계가 설정되지 않았습니다.</p>
<% end %>
<% if @workflow_state.started_at %>
<p style="margin-top: 15px; font-size: 11px; color: #999;">
시작일: <%= @workflow_state.started_at.strftime('%Y-%m-%d %H:%M') %>
<% if @workflow_state.completed_at %>
| 완료일: <%= @workflow_state.completed_at.strftime('%Y-%m-%d %H:%M') %>
<% end %>
</p>
<% end %>
</div>