OSDN Git Service

implement(in progress): WorkTime plug-in extension. refs #1362 (http://www.r-labs...
[quickedit/quick_view.git] / app / views / quick_view_worktime_issues / quick_view_worktime_tooltip.html.erb
index ae67556..562ac0d 100644 (file)
@@ -6,28 +6,63 @@
   extend IssuesHelper
   extend AttachmentsHelper
   extend CustomFieldsHelper
-#  extend RepositoriesHelper
-#  extend JournalsHelper
 
   issue = @issue
   project = @issue.project
 %>
-     <div>
+      <div>
+        <%= avatar(@issue.author, :size => "50") %>
         <div class="subject">
-        <%= render_issue_subject_with_tree(issue) %>
+          <%= render_issue_subject_with_tree(issue) %>
         </div>
-        <hr>
+      </div>
+        <hr style="clear: both;">
         <table class="quick_view_tooltip_attributes">
-          <tr><th class="status"><%=l(:field_status) %></th><td class="status" ><%= h(issue.status.name)%></td></tr>
-          <tr><th class="priority"><%=l(:field_priority) %></th><td class="priority"><%= h(issue.priority.name)%></td></tr>
-          <tr><th class="fixed-version"><%=l(:field_fixed_version) %></th><td class="fixed-version"><%= issue.fixed_version ? link_to_version(issue.fixed_version) : "-" %></td></tr>
-          <tr><th class="assigned-to"><%=l(:field_assigned_to) %></th><td class="assigned_to"><%= avatar(issue.assigned_to, :size => "14").to_s.html_safe + (issue.assigned_to ? link_to_user(issue.assigned_to) : "-") %></td></tr>
-          <tr><th class="start-date"><%=l(:field_start_date) %></th><td class="start-date"><%= format_date(issue.start_date)%></td></tr>
-          <tr><th class="due-date"><%=l(:field_due_date) %></th><td class="due-date"><%= format_date(issue.due_date)%></td></tr>
+          <tr>
+            <th class="status"><%=l(:field_status) %></th>
+            <td class="status" ><%= h(issue.status.name)%></td>
+          </tr>
+          <tr>
+            <th class="priority"><%=l(:field_priority) %></th>
+            <td class="priority"><%= h(issue.priority.name)%></td>
+          </tr>
+          <% unless issue.disabled_core_fields.include?('category_id') %>
+          <tr>
+            <th class="category"><%=l(:field_category) %></th>
+            <td class="category"><%= h(issue.category ? issue.category.name : "-") %></td>
+          </tr>
+          <% end %>
+          <% unless issue.disabled_core_fields.include?('fixed_version_id') %>
+          <tr>
+            <th class="fixed-version"><%=l(:field_fixed_version) %></th>
+            <td class="fixed-version"><%= issue.fixed_version ? link_to_version(issue.fixed_version) : "-" %></td>
+          </tr>
+          <% end %>
+          <% unless issue.disabled_core_fields.include?('assigned_to_id') %>
+          <tr>
+            <th class="assigned-to"><%=l(:field_assigned_to) %></th>
+            <td class="assigned_to"><%= avatar(issue.assigned_to, :size => "14").to_s.html_safe + (issue.assigned_to ? link_to_user(issue.assigned_to) : "-") %></td>
+          </tr>
+          <% end %>
+          <% unless issue.disabled_core_fields.include?('start_date') %>
+          <tr>
+            <th class="start-date"><%=l(:field_start_date) %></th>
+            <td class="start-date"><%= format_date(issue.start_date)%></td>
+          </tr>
+          <% end %>
+          <% unless issue.disabled_core_fields.include?('due_date') %>
+          <tr>
+            <th class="due-date"><%=l(:field_due_date) %></th>
+            <td class="due-date"><%= format_date(issue.due_date)%></td>
+          </tr>
+          <% end %>
           <% unless issue.disabled_core_fields.include?('estimated_hours') %>
-          <%  unless issue.estimated_hours.nil? %>
-          <tr><th class="estimated-hours"><%=l(:field_estimated_hours) %></th><td class="estimated-hours"><%= format_date(issue.estimated_hours)%></td></tr>
-          <%  end %>
+          <%   unless issue.estimated_hours.nil? %>
+          <tr>
+            <th class="estimated-hours"><%=l(:field_estimated_hours) %></th>
+            <td class="estimated-hours"><%= format_date(issue.estimated_hours)%></td>
+          </tr>
+          <%   end %>
           <% end%>
           <% if User.current.allowed_to?(:view_time_entries, project) %>
           <tr>
@@ -46,4 +81,3 @@
         <% if issue.created_on != issue.updated_on %>
         <%= l(:label_updated_time, time_tag(issue.updated_on)).html_safe %>.
         <% end %>
-     </div>