From 44923ebf64ff34aee837b4b0ec84b3e2a836d828 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sun, 8 Dec 2013 01:13:12 -0600 Subject: [PATCH] universe ui restyling --- app/views/universes/edit.html.erb | 6 ++- app/views/universes/index.html.erb | 67 +++++++++++++++--------------- app/views/universes/new.html.erb | 11 +++-- app/views/universes/show.html.erb | 58 ++++++++++++++------------ 4 files changed, 73 insertions(+), 69 deletions(-) diff --git a/app/views/universes/edit.html.erb b/app/views/universes/edit.html.erb index 1c3ab6df..4647d579 100644 --- a/app/views/universes/edit.html.erb +++ b/app/views/universes/edit.html.erb @@ -1,4 +1,6 @@ <%- model_class = @universe.class -%> -<%= render :partial => 'tabs' %> -<%= render :partial => 'edit_form' %> +
+ <%= render :partial => 'tabs' %> + <%= render :partial => 'edit_form' %> +
\ No newline at end of file diff --git a/app/views/universes/index.html.erb b/app/views/universes/index.html.erb index 26f81c2b..08507c0d 100644 --- a/app/views/universes/index.html.erb +++ b/app/views/universes/index.html.erb @@ -1,41 +1,40 @@ <%- model_class = Universe.new.class -%> -

<%=t '.title', :default => model_class.model_name.human.pluralize %>

<% if @universes.length > 0 %> - - - - - - - - - - <% @universes.each do |universe| %> +
+

Your universes

+
<%= model_class.human_attribute_name(:name) %><%= model_class.human_attribute_name(:description) %><%=t '.actions', :default => t("helpers.actions") %>
+ - - - + + + - <% end %> - -
<%= simple_format link_to universe.name, universe_path(universe) %><%= simple_format truncate(universe.description, :length => 256) %> - <%= link_to t('.view', :default => t("helpers.links.view")), - universe_path(universe), :class => 'btn btn-mini' %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - universe_edit_path(universe), :class => 'btn btn-mini' %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - universe_path(universe), - :method => :delete, - :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), - :class => 'btn btn-mini btn-danger' %> - <%= model_class.human_attribute_name(:name) %><%= model_class.human_attribute_name(:description) %><%=t '.actions', :default => t("helpers.actions") %>
+ + + <% @universes.each do |universe| %> + + <%= simple_format link_to universe.name, universe_path(universe) %> + <%= simple_format truncate(universe.description, :length => 256) %> + + <%= link_to t('.view', :default => t("helpers.links.view")), universe_path(universe), :class => 'btn' %> + <%= link_to t('.edit', :default => t("helpers.links.edit")), universe_edit_path(universe), :class => 'btn' %> + <%= link_to t('.destroy', :default => t("helpers.links.destroy")), universe_path(universe), :method => :delete, :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), :class => 'btn btn-danger' %> + + + <% end %> + + + <% end %> -
-

What is a universe?

-

- Literally, a universe. The universe your character exists in. The universe their friends, family, and foes exist in. The universe that contains their hometown, their country, their planet – everything that exists in their world. Sticking it all in a universe keeps it separate from other universes that other stories might be happening in. -

- - <%= link_to 'New universe', universe_create_path, :class => 'btn btn-primary' %> +
+

What is a universe?

+
+

+ Literally, a universe. The universe your character exists in. The universe their friends, family, and foes exist in. The universe that contains their hometown, their country, their planet – everything that exists in their world. Sticking it all in a universe keeps it separate from other universes that other stories might be happening in. +

+ + <%= link_to 'New universe', universe_create_path, :class => 'btn btn-primary' %> +
+
diff --git a/app/views/universes/new.html.erb b/app/views/universes/new.html.erb index 0aef07d4..f82e6685 100644 --- a/app/views/universes/new.html.erb +++ b/app/views/universes/new.html.erb @@ -1,6 +1,5 @@ -<%- model_class = @universe.class -%> -

<%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human, - :default => "New #{model_class.model_name.human}") %>

- -<%= render :partial => 'tabs' %> -<%= render :partial => 'form' %> +
+

New universe

+ <%= render :partial => 'tabs' %> + <%= render :partial => 'form' %> +
\ No newline at end of file diff --git a/app/views/universes/show.html.erb b/app/views/universes/show.html.erb index 09d8e25f..b034970a 100644 --- a/app/views/universes/show.html.erb +++ b/app/views/universes/show.html.erb @@ -1,37 +1,41 @@ <%- model_class = @universe.class -%> -<%= render :partial => 'tabs' %> +
+ <%= render :partial => 'tabs' %> - + -
- <%= link_to t('.back', :default => t("helpers.links.back")), - universe_list_path, :class => 'btn' %> - <%= link_to t('.edit', :default => t("helpers.links.edit")), - universe_edit_path(@universe), :class => 'btn' %> - <%= link_to t('.destroy', :default => t("helpers.links.destroy")), - universe_path(@universe), - :method => 'delete', - :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), - :class => 'btn btn-danger' %> +
+ <%= link_to t('.back', :default => t("helpers.links.back")), + universe_list_path, :class => 'btn' %> + <%= link_to t('.edit', :default => t("helpers.links.edit")), + universe_edit_path(@universe), :class => 'btn' %> + <%= link_to t('.destroy', :default => t("helpers.links.destroy")), + universe_path(@universe), + :method => 'delete', + :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')), + :class => 'btn btn-danger' %> +
<% u = User.find(session[:user]) if session[:user] %> <% if session[:user] and u.content_count == 1 and u.universes.length == 1 %> -
-

Congratulations, you created your first universe! So... what next?

-

- Now that you know the basics of how to create, edit, and view your content, you're free to create anything you want! Personally I typically start with characters, but I know some people enjoy starting with a good map full of locations. Or if magic is more your thing, all power to you! -

-

- Your universe is empty but ready to be filled with stuff now. You'll find everything you could think to fill it with within the Plan menu at the top of the page! -

-

- Good luck! -

+
+

Congratulations, you created your first universe! So... what next?

+
+

+ Now that you know the basics of how to create, edit, and view your content, you're free to create anything you want! Personally I typically start with characters, but I know some people enjoy starting with a good map full of locations. Or if magic is more your thing, all power to you! +

+

+ Your universe is empty but ready to be filled with stuff now. You'll find everything you could think to fill it with within the Plan menu at the top of the page! +

+

+ Good luck! +

+
<% end %> \ No newline at end of file