diff --git a/app/views/jobs/_form.html.erb b/app/views/jobs/_form.html.erb index ba87b6f..bb2a46f 100644 --- a/app/views/jobs/_form.html.erb +++ b/app/views/jobs/_form.html.erb @@ -1,5 +1,5 @@ -
- <%= form_with model: @job, id: "job_form" do |f| %> +<%= form_with model: @job, id: "job_form" do |f| %> +

<%= f.label :name %> <%= f.text_field :name %> @@ -32,6 +32,7 @@ <%= f.number_field :budget %>

- <%= f.submit %> - <% end %> -
+
+ <%= f.submit %> + <%= link_to "Cancel", job_path(@job, project_id: @project.id) %> +<% end %> diff --git a/app/views/jobs/edit.html.erb b/app/views/jobs/edit.html.erb index 4216fd3..a07e61d 100644 --- a/app/views/jobs/edit.html.erb +++ b/app/views/jobs/edit.html.erb @@ -3,4 +3,3 @@ <%= render "form" %> -<%= link_to "Delete job", job_path(@job), data: { confirm: "Are you sure?" }, method: :delete %> diff --git a/app/views/jobs/show.html.erb b/app/views/jobs/show.html.erb index 93f2765..02490ad 100644 --- a/app/views/jobs/show.html.erb +++ b/app/views/jobs/show.html.erb @@ -1,17 +1,41 @@ <% html_title @job.name %> -

<%= link_to @job.name, @job %>

-

<%= @job.description %>

-
-
Starts on:
-
<%= @job.starts_on %>
-
Ends on:
-
<%= @job.ends_on %>
-
Total time logged:
-
<%= @job.total_time_logged %>
- <% TimeEntryActivity.all.each do |activity| %> -
Total time logged for <%= activity.name %>
-
<%= @job.total_time_logged_for(activity) %>
+
+ <%= 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 %> -
- -<%= link_to 'Edit job', edit_job_path(@job, project_id: @project.id) %> + +

Job #<%= @job.id %>

+
+

<%= @job.name %>

+

<%= @job.description %>

+
+
+
+
+
Starts on:
+
<%= format_date(@job.starts_on) %>
+
Ends on:
+
<%= format_date(@job.starts_on) %>
+
External project ID:
+
<%= @job.external_project_id %>
+
+
+
+

Time logged:

+
+
Total:
+
+ <%= l_hours_short(@job.total_time_logged) %> / <%= l_hours_short(@job.budget) %> + +
+ <% TimeEntryActivity.all.each do |activity| %> +
<%= activity.name %>:
+
<%= l_hours_short(@job.total_time_logged_for(activity)) %>
+ <% end %> +
+
+
+
+