Restyle views

This increases consistency with the rest of Redmine.
This commit is contained in:
Trevor Vallender 2023-11-22 19:44:28 +00:00
parent afcb4c3ccc
commit 9294216abc
3 changed files with 45 additions and 21 deletions

View File

@ -1,5 +1,5 @@
<div class="box tabular">
<%= form_with model: @job, id: "job_form" do |f| %>
<%= form_with model: @job, id: "job_form" do |f| %>
<div class="box tabular">
<p>
<%= f.label :name %>
<%= f.text_field :name %>
@ -32,6 +32,7 @@
<%= f.number_field :budget %>
</p>
<%= f.submit %>
<% end %>
</div>
</div>
<%= f.submit %>
<%= link_to "Cancel", job_path(@job, project_id: @project.id) %>
<% end %>

View File

@ -3,4 +3,3 @@
<%= render "form" %>
<%= link_to "Delete job", job_path(@job), data: { confirm: "Are you sure?" }, method: :delete %>

View File

@ -1,17 +1,41 @@
<% html_title @job.name %>
<h3><%= link_to @job.name, @job %></h3>
<p><%= @job.description %></p>
<dl>
<dt>Starts on:</dt>
<dd><%= @job.starts_on %></dd>
<dt>Ends on:</dt>
<dd><%= @job.ends_on %></dd>
<dt>Total time logged:</dt>
<dd><%= @job.total_time_logged %></dd>
<% TimeEntryActivity.all.each do |activity| %>
<dt>Total time logged for <%= activity.name %></dt>
<dd><%= @job.total_time_logged_for(activity) %></dd>
<div class="contextual">
<%= link_to 'Edit', edit_job_path(project_id: @project.id), class: "icon icon-edit edit-job" %>
<%= actions_dropdown do %>
<%= copy_object_url_link(job_url(@job, project_id: @project.id, only_path: false)) %>
<%= link_to "Delete job", job_path(@job), data: { confirm: "Are you sure you want to delete this job?" }, method: :delete, class: 'icon icon-del' %>
<% end %>
</dl>
<%= link_to 'Edit job', edit_job_path(@job, project_id: @project.id) %>
</div>
<h2>Job #<%= @job.id %></h2>
<div class="issue">
<div class="subject"><h3><%= @job.name %></h3></div>
<p><%= @job.description %></p>
<div class="attributes">
<div class="splitcontent">
<div class="splitcontentleft">
<div class="status attribute">
<div class="label">Starts on:</div>
<div class="value"><%= format_date(@job.starts_on) %></div>
<div class="label">Ends on:</div>
<div class="value"><%= format_date(@job.starts_on) %></div>
<div class="label">External project ID:</div>
<div class="value"><%= @job.external_project_id %></div>
</div>
</div>
<div class="splitcontentright">
<h3>Time logged:</h3>
<div class="status attribute">
<div class="label">Total:</div>
<div class="value">
<%= l_hours_short(@job.total_time_logged) %> / <%= l_hours_short(@job.budget) %>
<progress max="<%= @job.budget %>" value="<%= @job.total_time_logged %>"></progress>
</div>
<% TimeEntryActivity.all.each do |activity| %>
<div class="label"><%= activity.name %>:</div>
<div class="value"><%= l_hours_short(@job.total_time_logged_for(activity)) %></div>
<% end %>
</div>
</div>
</div>
</div>
</div>