diff --git a/app/views/characters/_list.html.erb b/app/views/characters/_list.html.erb
index 2175e2b8..1139dc08 100644
--- a/app/views/characters/_list.html.erb
+++ b/app/views/characters/_list.html.erb
@@ -4,7 +4,7 @@
Name |
Role |
Universe |
- <% if session[:user] and session[:user] == @characters.first.user.id %>
+ <% if session[:user] %>
<%=t '.actions', :default => t("helpers.actions") %> |
<% end %>
@@ -15,9 +15,8 @@
<%= simple_format link_to character.name, character_path(character) %> |
<%= simple_format character.role %> |
<%= character.universe ? character.universe.name : "" %> |
-
- <% if session[:user] and session[:user] == @characters.first.user.id %>
-
+ |
+ <% if session[:user] and session[:user] == character.user.id %>
<%= link_to t('.view', :default => t("helpers.links.view")),
character_path(character), :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
@@ -27,8 +26,8 @@
:method => :delete,
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
- |
- <% end %>
+ <% end %>
+
<% end %>
diff --git a/app/views/equipment/_list.html.erb b/app/views/equipment/_list.html.erb
new file mode 100644
index 00000000..a9a96c6f
--- /dev/null
+++ b/app/views/equipment/_list.html.erb
@@ -0,0 +1,35 @@
+
+
+
+ | Name |
+ Type |
+ Description |
+ <% if session[:user] %>
+ <%=t '.actions', :default => t("helpers.actions") %> |
+ <% end %>
+
+
+
+ <% @equipment.each do |equipment| %>
+
+ | <%= simple_format link_to equipment.name, equipment_path(equipment) %> |
+ <%= simple_format equipment.equip_type %> |
+ <%= simple_format equipment.description %> |
+
+ <% if session[:user] and session[:user] == equipment.user.id %>
+ <%= link_to t('.view', :default => t("helpers.links.view")),
+ equipment_path(equipment), :class => 'btn' %>
+ <%= link_to t('.edit', :default => t("helpers.links.edit")),
+ equipment_edit_path(equipment), :class => 'btn' %>
+ <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
+ equipment_path(equipment),
+ :method => :delete,
+ :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
+ :class => 'btn btn-danger' %>
+ <% end %>
+ |
+
+ <% end %>
+
+
+
diff --git a/app/views/equipment/index.html.erb b/app/views/equipment/index.html.erb
index 8f5d6d10..4b0ac5d9 100644
--- a/app/views/equipment/index.html.erb
+++ b/app/views/equipment/index.html.erb
@@ -6,6 +6,9 @@
from <%= universe_filter %>
<% end %>
+
+ <%= render 'list' %>
+
diff --git a/app/views/universes/show.html.erb b/app/views/universes/show.html.erb
index 38f3ea54..5c52c918 100644
--- a/app/views/universes/show.html.erb
+++ b/app/views/universes/show.html.erb
@@ -66,7 +66,8 @@
<%= render 'characters/list' %>
- Eq
+ <% @equipment = @universe.equipment %>
+ <%= render 'equipment/list' %>
Lang