mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
universe ui restyling
This commit is contained in:
parent
397c9d9384
commit
44923ebf64
@ -1,4 +1,6 @@
|
||||
<%- model_class = @universe.class -%>
|
||||
|
||||
<%= render :partial => 'tabs' %>
|
||||
<%= render :partial => 'edit_form' %>
|
||||
<div class="card">
|
||||
<%= render :partial => 'tabs' %>
|
||||
<%= render :partial => 'edit_form' %>
|
||||
</div>
|
||||
@ -1,41 +1,40 @@
|
||||
<%- model_class = Universe.new.class -%>
|
||||
<h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
|
||||
<% if @universes.length > 0 %>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= model_class.human_attribute_name(:name) %></th>
|
||||
<th><%= model_class.human_attribute_name(:description) %></th>
|
||||
<th><%=t '.actions', :default => t("helpers.actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @universes.each do |universe| %>
|
||||
<div class="card">
|
||||
<h3 class="card-heading simple">Your universes</h3>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 260px;"><%= simple_format link_to universe.name, universe_path(universe) %></td>
|
||||
<td><%= simple_format truncate(universe.description, :length => 256) %></td>
|
||||
<td style="width: 130px;">
|
||||
<%= 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' %>
|
||||
</td>
|
||||
<th><%= model_class.human_attribute_name(:name) %></th>
|
||||
<th><%= model_class.human_attribute_name(:description) %></th>
|
||||
<th><%=t '.actions', :default => t("helpers.actions") %></th>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @universes.each do |universe| %>
|
||||
<tr>
|
||||
<td style="width: 160px;"><%= simple_format link_to universe.name, universe_path(universe) %></td>
|
||||
<td><%= simple_format truncate(universe.description, :length => 256) %></td>
|
||||
<td style="width: 180px;">
|
||||
<%= 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' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="well" style="margin-top: 20px;">
|
||||
<h4>What is a universe?</h4>
|
||||
<p>
|
||||
Literally, <em>a universe</em>. 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.
|
||||
</p>
|
||||
|
||||
<%= link_to 'New universe', universe_create_path, :class => 'btn btn-primary' %>
|
||||
<div class="card" style="margin-top: 20px;">
|
||||
<h3 class="card-heading simple">What is a universe?</h3>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
Literally, <em>a universe</em>. 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.
|
||||
</p>
|
||||
|
||||
<%= link_to 'New universe', universe_create_path, :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<div class="card-comments"></div>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
<%- model_class = @universe.class -%>
|
||||
<h2><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
|
||||
:default => "New #{model_class.model_name.human}") %></h2>
|
||||
|
||||
<%= render :partial => 'tabs' %>
|
||||
<%= render :partial => 'form' %>
|
||||
<div class="card">
|
||||
<h3 class="card-heading simple">New universe</h3>
|
||||
<%= render :partial => 'tabs' %>
|
||||
<%= render :partial => 'form' %>
|
||||
</div>
|
||||
@ -1,37 +1,41 @@
|
||||
<%- model_class = @universe.class -%>
|
||||
|
||||
<%= render :partial => 'tabs' %>
|
||||
<div class="card">
|
||||
<%= render :partial => 'tabs' %>
|
||||
|
||||
<dl class="dl-horizontal hidden section general_section">
|
||||
<%= print_property("Name", @universe.name, "") %>
|
||||
<%= print_property("Description", @universe.description, "") %>
|
||||
<%= print_property("History", @universe.history, "") %>
|
||||
</dl>
|
||||
<dl class="dl-horizontal hidden section general_section">
|
||||
<%= print_property("Name", @universe.name, "") %>
|
||||
<%= print_property("Description", @universe.description, "") %>
|
||||
<%= print_property("History", @universe.history, "") %>
|
||||
</dl>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= 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' %>
|
||||
<div class="form-actions">
|
||||
<%= 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' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% u = User.find(session[:user]) if session[:user] %>
|
||||
<% if session[:user] and u.content_count == 1 and u.universes.length == 1 %>
|
||||
<div class="well">
|
||||
<h4>Congratulations, you created your first universe! So... what next?</h4>
|
||||
<p>
|
||||
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 <a href="/plan/characters">characters</a>, but I know some people enjoy starting with a good map full of <a href="/plan/locations">locations</a>. Or if <a href="/plan/magic">magic</a> is more your thing, all power to you!
|
||||
</p>
|
||||
<p>
|
||||
Your universe is empty but ready to be filled with <em>stuff</em> now. You'll find everything you could think to fill it with within the <strong>Plan</strong> menu at the top of the page!
|
||||
</p>
|
||||
<p>
|
||||
<strong>Good luck!</strong>
|
||||
</p>
|
||||
<div class="card">
|
||||
<h3 class="card-heading simple">Congratulations, you created your first universe! So... what next?</h3>
|
||||
<div class="card-body">
|
||||
<p>
|
||||
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 <a href="/plan/characters">characters</a>, but I know some people enjoy starting with a good map full of <a href="/plan/locations">locations</a>. Or if <a href="/plan/magic">magic</a> is more your thing, all power to you!
|
||||
</p>
|
||||
<p>
|
||||
Your universe is empty but ready to be filled with <em>stuff</em> now. You'll find everything you could think to fill it with within the <strong>Plan</strong> menu at the top of the page!
|
||||
</p>
|
||||
<p>
|
||||
<strong>Good luck!</strong>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
Loading…
Reference in New Issue
Block a user