Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request Team254#10 from morops/part_buttons
Browse files Browse the repository at this point in the history
Added new part/assem to parts overview
  • Loading branch information
morops authored Dec 27, 2017
2 parents 16c3ec4 + 5e1f885 commit b696ca1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion views/part.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
<%= erb :header %>

<div class="container">
<% if @part.type == "assembly" && @user.can_edit? %>
<% if @part.type == "part" && @user.can_edit? %>
<div class="pull-right" style="margin-top: 15px;">
<a href="/projects/<%= @part.project.id %>/new_part?type=part" class="btn btn-success btn-small">
<i class="icon-white icon-cog"></i> New Part
</a>
<a href="/projects/<%= @part.project.id %>/new_part?type=assembly" class="btn btn-success btn-small">
<i class="icon-white icon-th"></i> New Assembly
</a>
</div>
<% elsif @part.type == "assembly" && @user.can_edit? %>
<div class="pull-right" style="margin-top: 15px;">
<a href="/projects/<%= @part.project_id %>/new_part?type=part&parent_part_id=<%= @part.id %>"
class="btn btn-success btn-small"><i class="icon-white icon-cog"></i> New Part</a>
Expand Down

0 comments on commit b696ca1

Please sign in to comment.