diff --git a/app/views/characters/_list.html.erb b/app/views/characters/_list.html.erb index c83dbe31..b28343ea 100644 --- a/app/views/characters/_list.html.erb +++ b/app/views/characters/_list.html.erb @@ -1,48 +1,37 @@ -<% @cardcounter = 0 %> <% @characters.each do |character| %> - - <% if @cardcounter % 4 == 0 %> -
- <% end %> - -
-

- - <%= simple_format link_to character.name, character_path(character) %> -

-
-

- - <% if character.role.length > 0 %> - <%= character.role %><% if character.age.length > 0 %>, <%= character.age %><% end %> +

+
+

+ <%= simple_format link_to character.name, character_path(character) %> +

+
+

+ + <% if character.role.length > 0 %> + <%= character.role %><% if character.age.length > 0 %>, <%= character.age %><% end %> + <% end %> + +

+

+ Lorem ipsum one-line description here lel +

+
+
+

+ <% if session[:user] and session[:user] == character.user.id %> + <%= link_to t('.view', :default => t("helpers.links.view")), + character_path(character), :class => 'btn btn-sm' %> + <%= link_to t('.edit', :default => t("helpers.links.edit")), + character_edit_path(character), :class => 'btn btn-sm' %> + <%= link_to t('.destroy', :default => t("helpers.links.destroy")), + character_path(character), + :method => :delete, + :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), + :class => 'btn btn-danger btn-sm' %> <% end %> - -

-

- Lorem ipsum one-line description here lel -

-
-
-

- <% if session[:user] and session[:user] == character.user.id %> - <%= link_to t('.view', :default => t("helpers.links.view")), - character_path(character), :class => 'btn btn-sm' %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - character_edit_path(character), :class => 'btn btn-sm' %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - character_path(character), - :method => :delete, - :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), - :class => 'btn btn-danger btn-sm' %> - <% end %> - -

+ +

+
- - <% if @cardcounter % 3 == 0 %> - <% end %> - -<% @cardcounter += 1 %> <% end %> -
diff --git a/app/views/characters/edit.html.erb b/app/views/characters/edit.html.erb index 96939b5b..ad5e7eb5 100644 --- a/app/views/characters/edit.html.erb +++ b/app/views/characters/edit.html.erb @@ -2,5 +2,7 @@
<%= render :partial => 'tabs' %> - <%= render :partial => 'edit_form' %> -
\ No newline at end of file +
+ <%= render :partial => 'edit_form' %> +
+
diff --git a/app/views/characters/index.html.erb b/app/views/characters/index.html.erb index 37127236..0a3e9f4f 100644 --- a/app/views/characters/index.html.erb +++ b/app/views/characters/index.html.erb @@ -1,26 +1,30 @@ -<% if @characters.length > 0 %> -
-

- Your characters - <% if Universe.where(user_id: session[:user]).length > 0 %> - from <%= universe_filter %> - <% end %> -

+
-
- -<%= render 'list' %> - -<% end %> - -
-

Planning characters

-
-

- Consistency is sometimes hard to keep, and having a reference of everything about your character for yourself can help you down the line, especially if you're writing a series. -

- <%= link_to 'New character', character_create_path, :class => 'btn btn-primary' %> +
+
+

+ Your characters + <% if Universe.where(user_id: session[:user]).length > 0 %> + from <%= universe_filter %> + <% end %> +

+
-
-
+ <%= render 'list' %> + +
+
+

Planning characters

+
+

+ Consistency is sometimes hard to keep, and having a reference of everything about your character for yourself can help you down the line, especially if you're writing a series. +

+
+
+ <%= link_to 'New character', character_create_path, :class => 'btn btn-primary' %> +
+
+
+ +
diff --git a/app/views/characters/show.html.erb b/app/views/characters/show.html.erb index 4a496113..bf2bf286 100644 --- a/app/views/characters/show.html.erb +++ b/app/views/characters/show.html.erb @@ -1,8 +1,14 @@ <%- model_class = @character.class -%>
+

+ <%= @character.name %> +

+ <%= render :partial => 'tabs' %> +
+ + +
+ +
<% if session[:user] and session[:user] == @character.user.id %>
@@ -81,4 +91,6 @@
<% end %> +
+
diff --git a/app/views/universes/show.html.erb b/app/views/universes/show.html.erb index 72dd8976..2a1473df 100644 --- a/app/views/universes/show.html.erb +++ b/app/views/universes/show.html.erb @@ -29,6 +29,9 @@ + +
+
<% if session[:user] and session[:user] == @universe.user.id %>