intro box for adding magic

This commit is contained in:
Andrew Brown 2013-01-22 18:52:02 -06:00
parent c10ac9c54a
commit bb5c36d65f
3 changed files with 16 additions and 5 deletions

View File

@ -9,8 +9,7 @@
<div class="control-group">
<%= f.label :type_of_magic, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :type_of, :class => 'text_field' %>
<div class="help-inline">Spell, Ability, Enchantment, etc</div>
<%= f.text_field :type_of, :class => 'text_field', :value => (params[:type_of] || "").capitalize %>
</div>
</div>
</div>

View File

@ -29,6 +29,17 @@
</tbody>
</table>
<%= link_to t('.new', :default => t("helpers.links.new")),
magic_create_path,
:class => 'btn btn-primary' %>
<div class="well" style="margin-top: 20px;">
<h4>Planning magic</h4>
<p>
Magic, the most wonderous thing! How does it work?
</p>
<%= link_to 'New magic', magic_create_path, :class => 'btn btn-primary' %>
<%= link_to 'New spell', magic_create_type_path(:spell), :class => 'btn' %>
<%= link_to 'New enchantment', magic_create_type_path(:enchantment), :class => 'btn' %>
<%= link_to 'New curse', magic_create_type_path(:curse), :class => 'btn' %>
<%= link_to 'New potion', magic_create_type_path(:potion), :class => 'btn' %>
</div>

View File

@ -70,6 +70,7 @@ PlanCharacters::Application.routes.draw do
get '/magic/from/:universe', :to => 'magic#index', :as => :magic_by_universe
get '/magic/new', :to => 'magic#new', :as => :magic_create
post '/magic/new', :to => 'magic#create', :as => :magic_create_process
get '/magic/new/:type_of', :to => 'magic#new', :as => :magic_create_type
get '/magic/:id', :to => 'magic#show', :as => :magic
get '/magic/:id/edit', :to => 'magic#edit', :as => :magic_edit
put '/magic/:id', :to => 'magic#update', :as => :magic_edit_process