Merge pull request #364 from drusepth/fix-bootplus

Bootstrap 3! DEAR GOD IT WORKS
This commit is contained in:
Andrew Brown 2014-08-02 00:02:52 -05:00
commit 47ef47812d
138 changed files with 7132 additions and 23504 deletions

View File

@ -18,14 +18,14 @@ gem 'rmagick'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'less-rails'
gem 'less-rails-fontawesome'
#gem 'less-rails-fontawesome'
gem 'coffee-rails', '~> 3.2.1'
#gem 'bootplus-rails'
#gem 'twitter-bootstrap-rails'
gem 'bootplus-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', :platform => :ruby
gem 'therubyracer', '~> 0.12.1', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end

View File

@ -34,7 +34,6 @@ GEM
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bootplus-rails (1.0.0)
bson (1.6.0)
bson_ext (1.6.0)
bson (= 1.6.0)
@ -49,7 +48,7 @@ GEM
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
coffee-script-source (1.6.3)
commonjs (0.2.7)
database_cleaner (1.2.0)
erubis (2.7.0)
@ -74,8 +73,6 @@ GEM
less-rails (2.4.2)
actionpack (>= 3.1)
less (~> 2.4.0)
less-rails-fontawesome (0.8.0)
less-rails (~> 2.4.2)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
@ -162,19 +159,17 @@ PLATFORMS
DEPENDENCIES
aws-sdk (~> 1.3.4)
bootplus-rails
bson_ext (= 1.6.0)
coffee-rails (~> 3.2.1)
database_cleaner
factory_girl_rails
jquery-rails
less-rails
less-rails-fontawesome
mongo (= 1.6.0)
mongoid
mongoid-paperclip
rails (= 3.2.13)
rmagick
sass-rails (~> 3.2.3)
therubyracer
therubyracer (~> 0.12.1)
uglifier (>= 1.0.3)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View File

@ -12,5 +12,4 @@
//
//= require jquery
//= require jquery_ujs
//= require bootplus/bootstrap
//= require_tree .

View File

@ -1,4 +0,0 @@
jQuery ->
$("a[rel=popover]").popover()
$(".tooltip").tooltip()
$("a[rel=tooltip]").tooltip()

View File

@ -2,7 +2,7 @@ $(document).ready ->
# Character name generator
$('.character_name_generator').click ->
target = $(this).parent().find '.text_field'
target = $(this).closest('.row').find('input[type=text]')
$.ajax
dataType: 'text'
url: '/generate/character/name'
@ -12,7 +12,7 @@ $(document).ready ->
# Character age generator
$('.character_age_generator').click ->
target = $(this).parent().find '.text_field'
target = $(this).closest('.row').find('input[type=text]')
$.ajax
dataType: 'text'
url: '/generate/character/age'
@ -22,7 +22,7 @@ $(document).ready ->
# Location name generator
$('.location_name_generator').click ->
target = $(this).parent().find '.text_field'
target = $(this).closest('.row').find('input[type=text]')
$.ajax
dataType: 'text'
url: '/generate/location/name'

View File

@ -1,4 +1,4 @@
$(document).ready ->
$('.dropdown-picker li a').click ->
val = $(this).text()
$(this).closest('.controls').find('input').val(val)
$(this).closest('.row').find('input[type=text]').val(val)

View File

@ -1,15 +1,16 @@
$(document).ready ->
# Define function to close all open tabs then open a specific one
show_tab = (tab_name) ->
$('.' + tab_name + '_section').closest('.card').find('.card-heading').text(tab_name)
$('.tab').removeClass 'active'
$('#show_' + tab_name).parent().addClass 'active'
$('.section').hide()
$('.' + tab_name + '_section').css('visibility', 'visible').hide().fadeIn 'fast'
$('.' + tab_name + '_section').removeClass('hidden').hide().fadeIn 'fast'
# Define function to show content tabs
show_content_tab = (tab_name) ->
$('.content-section').hide()
$('.' + tab_name + '_section').css('visibility', 'visible').hide().fadeIn 'fast'
$('.' + tab_name + '_section').removeClass('hidden').hide().fadeIn 'fast'
# Enable tab functionality on a whitelist of tab names
list_of_valid_tabs = [
@ -22,6 +23,9 @@ $(document).ready ->
$('#show_' + tab).click ->
show_tab tab
$('.expand-all').click ->
$('.section').removeClass('hidden').show()
# Enable content tab functionality for whitelisted content types
list_of_content_tabs = [
'characters', 'equipment', 'languages', 'locations', 'magic'

View File

@ -9,6 +9,5 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require bootplus_overrides
*= require_tree .
*/

View File

@ -1,9 +0,0 @@
@import 'bootplus/bootplus';
@import 'bootplus/responsive';
@import 'font-awesome/font-awesome';
// Set the correct sprite paths
@iconSpritePath: "glyphicons-halflings.png";
@iconWhiteSpritePath: "glyphicons-halflings-white.png";
body { margin-top: 60px; }

View File

@ -0,0 +1,53 @@
.card {
margin: 10px 0;
padding-top: 15px;
border: 1px solid #d8d8d8;
border-bottom-width: 2px;
border-top-width: 0;
background-color: #ffffff;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-box-sizing: border-box;
.card-heading {
text-transform: capitalize;
border-bottom: 1px solid #e5e5e5;
color: #777;
font-size: 20px;
font-weight: 300;
margin: 0 -15px;
padding: 0px 35px 10px 35px;
}
.card-image {
}
.card-body {
padding: 10px 20px;
font-family: Roboto, arial, sans-serif;
font-size: 13px;
line-height: 20px;
color: #444444;
h2 {
font-size: 29px;
small {
font-size: 16px;
}
}
}
.card-comments {
padding: 20px;
margin: 0;
background-color: #f8f8f8;
}
}

View File

@ -1,6 +0,0 @@
// Place all the styles related to the Characters controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.form-actions {
clear: both;
}

View File

@ -0,0 +1,21 @@
form {
.text_field {
padding: 0 8px;
border-top: 1px solid #c0c0c0;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
min-height: 29px;
background-color: #ffffff;
border: 1px solid #d9d9d9;
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
}
#placeholder_map_input {
width: 100%;
display: block;
}

View File

@ -1,3 +0,0 @@
// Place all the styles related to the Generator controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,12 @@
#landing-page-1 {
#content-types {
.card {
img {
height: 200px;
width: 100%;
}
min-height: 400px;
}
}
}

View File

@ -1,3 +0,0 @@
// Place all the styles related to the main controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,21 @@
.navbar-fixed-top {
border-bottom: 1px solid #d8d8d8 !important;
background-color: #ffffff;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-box-sizing: border-box;
& a {
color: #777777;
&:hover {
color: #000000;
}
}
}

View File

@ -1,3 +0,0 @@
// Place all the styles related to the Sessions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -0,0 +1,7 @@
.footer {
margin-top: 120px;
& p {
text-align: center;
}
}

View File

@ -0,0 +1,5 @@
.nav-stacked {
.active {
border-left: 3px solid #777;
}
}

View File

@ -0,0 +1,8 @@
body {
margin-top: 60px !important;
background: #e5e5e5 !important;
}
.section {
margin: 30px 0;
}

View File

@ -1,3 +0,0 @@
// Place all the styles related to the users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -1,14 +1,11 @@
class ApplicationController < ActionController::Base
protect_from_forgery
helper :html
helper :my_content
helper_method :nl2br
helper_method :character_picker
helper_method :equipment_picker
helper_method :language_picker
helper_method :location_picker
helper_method :universe_picker
helper_method :universe_filter
# View Helpers
@ -17,101 +14,6 @@ class ApplicationController < ActionController::Base
string.gsub("\n\r","<br>").gsub("\r", "").gsub("\n", "<br />").html_safe
end
def character_picker
characters = Character.where(user_id: session[:user])
return if characters.length == 0
html = '<span class="btn-group input-append help-inline">'
html << '<button class="btn dropdown-toggle" data-toggle="dropdown">'
html << '<i class="icon-user"></i> '
html << '<span class="caret"></span>'
html << '</button>'
html << '<ul class="dropdown-menu dropdown-picker">'
characters.each do |i|
html << '<li><a href="#">' + i.name + '</a></li>'
end
html << '</ul>'
html << '</span>'
return html.html_safe
end
def equipment_picker
equipment = Equipment.where(user_id: session[:user])
return if equipment.length == 0
html = '<span class="btn-group input-append help-inline">'
html << '<button class="btn dropdown-toggle" data-toggle="dropdown">'
html << '<i class="icon-shopping-cart"></i> '
html << '<span class="caret"></span>'
html << '</button>'
html << '<ul class="dropdown-menu dropdown-picker">'
equipment.each do |i|
html << '<li><a href="#">' + i.name + '</a></li>'
end
html << '</ul>'
html << '</span>'
return html.html_safe
end
def language_picker
languages = Language.where(user_id: session[:user])
return if languages.length == 0
html = '<span class="btn-group input-append help-inline">'
html << '<button class="btn dropdown-toggle" data-toggle="dropdown">'
html << '<i class="icon-comment"></i> '
html << '<span class="caret"></span>'
html << '</button>'
html << '<ul class="dropdown-menu dropdown-picker" id="universe-selector">'
languages.each do |i|
html << '<li><a href="#">' + i.name + '</a></li>'
end
html << '</ul>'
html << '</span>'
return html.html_safe
end
def location_picker
locations = Location.where(user_id: session[:user])
return if locations.length == 0
html = '<span class="btn-group input-append help-inline">'
html << '<button class="btn dropdown-toggle" data-toggle="dropdown">'
html << '<i class="icon-map-marker"></i> '
html << '<span class="caret"></span>'
html << '</button>'
html << '<ul class="dropdown-menu dropdown-picker">'
locations.each do |i|
html << '<li><a href="#">' + i.name + '</a></li>'
end
html << '</ul>'
html << '</span>'
return html.html_safe
end
def universe_picker
universes = Universe.where(user_id: session[:user])
return if universes.length == 0
html = '<span class="btn-group input-append help-inline">'
html << '<button class="btn dropdown-toggle" data-toggle="dropdown">'
html << '<i class="icon-globe"></i> '
html << '<span class="caret"></span>'
html << '</button>'
html << '<ul class="dropdown-menu dropdown-picker">'
universes.each do |i|
html << '<li><a href="#">' + i.name + '</a></li>'
end
html << '</ul>'
html << '</span>'
return html.html_safe
end
def universe_filter
universes = Universe.where(user_id: session[:user])
return if universes.length == 0

View File

@ -33,7 +33,7 @@ module ApplicationHelper
end
end
def print_property(title, value, type)
def print_property(title, value, type = "")
return unless value and value.length > 0
return [

View File

@ -0,0 +1,32 @@
module FormHelper
def generate_form_row_for(form_handler, field, label_override = nil, toolbox = {})
label = (label_override.nil? ? field : label_override.titleize)
[
'<div class="row">',
'<div class="col-xs-2" style="text-align: right;">',
form_handler.label(label, :class => 'control-label'),
'</div>',
'<div class="col-xs-9">',
form_handler.text_field(field, :class => 'form-control'),
'</div>',
'<div class="col-xs-1">',
toolbox.map { |config| toolbox_button_for(config) },
'</div>',
'</div>'
].join("\n").html_safe
end
def toolbox_button_for(config = {})
if config[:action].ends_with? '_picker'
picker_type = config[:action].split('_picker').first
picker_from_type picker_type
else
[
"<button type='button' class='btn btn-default #{config[:action]}'>",
"<span class='glyphicon glyphicon-#{config[:icon]}'></span>",
"</button>"
].join("\n").html_safe
end
end
end

View File

@ -0,0 +1,54 @@
module HtmlHelper
def picker_from_type(content_type)
case content_type
when 'character'
character_picker
when 'universe'
universe_picker
when 'equipment'
equipment_picker
when 'language'
language_picker
when 'location'
location_picker
end
end
def generate_picker_code_for(content_array, glyphicon_id)
return if content_array.length == 0
[
'<span class="dropdown-picker">',
'<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">',
'<span class="glyphicon glyphicon-'+glyphicon_id+'"></span>',
'<span class="caret"></span>',
'</button>',
'<ul class="dropdown-menu">',
content_array.map { |content|
'<li><a href="#">' + content.name + '</a></li>'
},
'</ul>',
'</span>'
].join("\n").html_safe
end
def character_picker
generate_picker_code_for(my_characters, 'user')
end
def universe_picker
generate_picker_code_for(my_universes, 'globe')
end
def equipment_picker
generate_picker_code_for(my_equipment, 'gift')
end
def language_picker
generate_picker_code_for(my_languages, 'comment')
end
def location_picker
generate_picker_code_for(my_locations, 'road')
end
end

View File

@ -0,0 +1,21 @@
module MyContentHelper
def my_characters
return Character.where(user_id: session[:user])
end
def my_universes
return Universe.where(user_id: session[:user])
end
def my_equipment
return Equipment.where(user_id: session[:user])
end
def my_languages
return Language.where(user_id: session[:user])
end
def my_locations
return Location.where(user_id: session[:user])
end
end

View File

@ -47,4 +47,9 @@ class Universe
Magic.where(universe_id: id)
end
def to_s
self.name
end
end

View File

@ -1,281 +0,0 @@
<%= form_for @character, :url => character_edit_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<a href="#" class="help-inline character_name_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label 'Role in story', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :role, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :gender, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :gender, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :age, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :age, :class => 'text_field' %>
<a href="#" class="help-inline character_age_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @character.universe ? @character.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
</div>
<div class="hidden section starter_section appearance_section">
<div class="control-group">
<%= f.label :height, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :height, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :weight, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :weight, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :race, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :race, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :haircolor, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :haircolor, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :hairstyle, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :hairstyle, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Facial hair', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :facialhair, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Eye color', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :eyecolor, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :skintone, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :skintone, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Body Type/Build', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :bodytype, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Identifying Marks', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :identmarks, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section social_section">
<div class="control-group">
<%= f.label 'Best Friend', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :bestfriend, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Religion', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :religion, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Politics', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :politics, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Prejudices', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :prejudices, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Occupation', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :occupation, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Pets', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :pets, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section behavior_section">
<div class="control-group">
<%= f.label 'Mannerisms', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :mannerisms, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Birthday', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :birthday, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Birthplace', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :birthplace, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Education', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :education, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Background', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :background, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section favorites_section">
<div class="control-group">
<%= f.label 'Color', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_color, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Food', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_food, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Possession', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_possession, :class => 'text_field' %>
<%= equipment_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Weapon', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_weapon, :class => 'text_field' %>
<%= equipment_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Animal', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_animal, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section relationships_section">
<div class="control-group">
<%= f.label 'Father', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :father, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Mother', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :mother, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Spouse', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :spouse, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Siblings', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :siblings, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Archenemy', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :archenemy, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 10, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
character_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,260 +1,58 @@
<%= form_for @character, :url => character_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<a href="#" class="help-inline character_name_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label 'Role in story', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :role, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :gender, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :gender, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :age, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :age, :class => 'text_field' %>
<a href="#" class="help-inline character_age_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @character.universe ? @character.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
<%= generate_form_row_for(f, :name, nil, [{:action => 'character_name_generator', :icon => 'random'}]) %>
<%= generate_form_row_for(f, :role, 'Role in story') %>
<%= generate_form_row_for(f, :gender) %>
<%= generate_form_row_for(f, :age, nil, [{:action => 'character_age_generator', :icon => 'random'}]) %>
<%= generate_form_row_for(f, :universe, nil, [{:action => 'universe_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section starter_section appearance_section">
<div class="control-group">
<%= f.label :height, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :height, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :weight, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :weight, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :race, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :race, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :haircolor, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :haircolor, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :hairstyle, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :hairstyle, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Facial hair', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :facialhair, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Eye color', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :eyecolor, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :skintone, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :skintone, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Body Type/Build', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :bodytype, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Identifying Marks', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :identmarks, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :height) %>
<%= generate_form_row_for(f, :weight) %>
<%= generate_form_row_for(f, :race) %>
<%= generate_form_row_for(f, :haircolor) %>
<%= generate_form_row_for(f, :hairstyle) %>
<%= generate_form_row_for(f, :facialhair) %>
<%= generate_form_row_for(f, :eyecolor, 'Eye color') %>
<%= generate_form_row_for(f, :skintone) %>
<%= generate_form_row_for(f, :bodytype) %>
<%= generate_form_row_for(f, :identmarks, 'Identifying marks') %>
</div>
<div class="hidden section social_section">
<div class="control-group">
<%= f.label 'Best Friend', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :bestfriend, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Religion', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :religion, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Politics', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :politics, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Prejudices', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :prejudices, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Occupation', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :occupation, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Pets', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :pets, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :bestfriend, 'Best friend', [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :religion) %>
<%= generate_form_row_for(f, :politics) %>
<%= generate_form_row_for(f, :prejudices) %>
<%= generate_form_row_for(f, :occupation) %>
<%= generate_form_row_for(f, :pets) %>
</div>
<div class="hidden section behavior_section">
<div class="control-group">
<%= f.label 'Mannerisms', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :mannerisms, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :mannerisms) %>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Birthday', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :birthday, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Birthplace', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :birthplace, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Education', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :education, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Background', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :background, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
<%= generate_form_row_for(f, :birthday) %>
<%= generate_form_row_for(f, :birthplace, nil, [{:action => 'location_picker', :icon => 'road'}]) %>
<%= generate_form_row_for(f, :education) %>
<%= generate_form_row_for(f, :background) %>
</div>
<div class="hidden section favorites_section">
<div class="control-group">
<%= f.label 'Color', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_color, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Food', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_food, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Possession', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_possession, :class => 'text_field' %>
<%= equipment_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Weapon', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_weapon, :class => 'text_field' %>
<%= equipment_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Animal', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :fave_animal, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :fave_color, 'Color') %>
<%= generate_form_row_for(f, :fave_food, 'Food') %>
<%= generate_form_row_for(f, :fave_possession, 'Possession', [{:action => 'equipment_picker', :icon => 'shopping-cart'}]) %>
<%= generate_form_row_for(f, :fave_weapon, 'Weapon', [{:action => 'equipment_picker', :icon => 'shopping-cart'}]) %>
<%= generate_form_row_for(f, :fave_animal, 'Animal') %>
</div>
<div class="hidden section relationships_section">
<div class="control-group">
<%= f.label 'Father', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :father, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Mother', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :mother, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Spouse', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :spouse, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Siblings', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :siblings, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Archenemy', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :archenemy, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<%= generate_form_row_for(f, :father, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :mother, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :spouse, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :siblings, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :archenemy, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
</div>
<div class="hidden section notes_section">
@ -270,11 +68,4 @@
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
character_list_path, :class => 'btn' %>
</div>
<% end %>
</div>

View File

@ -1,35 +1,31 @@
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Universe</th>
<% if session[:user] %>
<th><%=t '.actions', :default => t("helpers.actions") %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @characters.each do |character| %>
<tr>
<td style="width: 160px;"><%= simple_format link_to character.name, character_path(character) %></td>
<td><%= simple_format character.role %></td>
<td><%= character.universe ? character.universe.name : "" %></td>
<td style="width: 180px;">
<% @characters.each do |character| %>
<div class="col-md-3">
<div class="card">
<h1 class="card-heading">
<%= simple_format link_to character.name, character_path(character) %>
</h1>
<div class="card-body">
<p>
<strong>
<% if character.role.length > 0 %>
<%= character.role %><% if character.age.length > 0 %>, <%= character.age %><% end %>
<% end %>
</strong>
</p>
<p>
</p>
</div>
<div class="card-comments">
<p>
<% 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")),
character_edit_path(character), :class => 'btn' %>
<%= 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' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</p>
</div>
</div>
</div>
<% end %>

View File

@ -1,10 +1,14 @@
<ul class="nav nav-tabs">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "Appearance", "#", :id => "show_appearance" %></li>
<li class="tab"><%= link_to "Social", "#", :id => "show_social" %></li>
<li class="tab"><%= link_to "Behavior", "#", :id => "show_behavior" %></li>
<li class="tab"><%= link_to "History", "#", :id => "show_history" %></li>
<li class="tab"><%= link_to "Favorites", "#", :id => "show_favorites" %></li>
<li class="tab"><%= link_to "Relationships", "#", :id => "show_relationships" %></li>
<li class="tab"><%= link_to "Notes", "#", :id => "show_notes" %></li>
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#general", :id => "show_general" %></li>
<li class="tab"><%= link_to "Appearance", "#appearance", :id => "show_appearance" %></li>
<li class="tab"><%= link_to "Social", "#social", :id => "show_social" %></li>
<li class="tab"><%= link_to "Behavior", "#behavior", :id => "show_behavior" %></li>
<li class="tab"><%= link_to "History", "#history", :id => "show_history" %></li>
<li class="tab"><%= link_to "Favorites", "#favorites", :id => "show_favorites" %></li>
<li class="tab"><%= link_to "Relationships", "#relationships", :id => "show_relationships" %></li>
<li class="tab"><%= link_to "Notes", "#notes", :id => "show_notes" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,6 +1,37 @@
<%- model_class = @character.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete character forever', character_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @character.name %></h1>
<%= form_for @character,
:url => character_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', character_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,25 +1,30 @@
<% if @characters.length > 0 %>
<div class="card">
<h3 class="card-heading simple">
Your characters
<% if Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
<% end %>
</h3>
<div class="row">
<div class="col-md-12">
<div class="card" style="overflow: visible">
<h1 class="card-heading simple">
Your characters
<% if Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
<% end %>
</h1>
</div>
</div>
<%= render 'list' %>
</div>
<% end %>
<div class="card">
<h3 class="card-heading simple">Planning characters</h3>
<div class="card-body">
<p>
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.
</p>
<%= link_to 'New character', character_create_path, :class => 'btn btn-primary' %>
<div class="col-md-3">
<div class="card">
<h1 class="card-heading">Planning characters</h1>
<div class="card-body">
<p>
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.
</p>
</div>
<div class="card-comments">
<%= link_to 'New character', character_create_path, :class => 'btn btn-primary' %>
</div>
</div>
</div>
<div class="card-comments"></div>
</div>
</div>

View File

@ -1,5 +1,29 @@
<div class="card">
<h3 class="card-heading simple">New character</h3>
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h3 class="card-heading simple">New character</h3>
<%= render :partial => 'tabs' %>
</div>
</div>
<div class="col-md-9">
<div class="card">
<%= form_for @character,
:url => character_create_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', character_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,84 +1,99 @@
<%- model_class = @character.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @character.name, "") %>
<%= print_property("Role in story", @character.role, "") %>
<%= print_property("Gender", @character.gender, "") %>
<%= print_property("Age", @character.age, "") %>
<%= print_property("Universe", @character.universe ? @character.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Weight", @character.weight, "") %>
<%= print_property("Height", @character.height, "") %>
<%= print_property("Haircolor", @character.haircolor, "") %>
<%= print_property("Hairstyle", @character.hairstyle, "") %>
<%= print_property("Facial hair", @character.facialhair, "") %>
<%= print_property("Eyecolor", @character.eyecolor, "") %>
<%= print_property("Race", @character.race, "") %>
<%= print_property("Skintone", @character.skintone, "") %>
<%= print_property("Body type", @character.bodytype, "") %>
<%= print_property("Identifying marks", @character.identmarks, "") %>
</dl>
<dl class="dl-horizontal hidden section social_section">
<%= print_property("Best friend", @character.bestfriend, "character") %>
<%= print_property("Religion", @character.religion, "") %>
<%= print_property("Politics", @character.politics, "") %>
<%= print_property("Prejudices", @character.prejudices, "") %>
<%= print_property("Occupation", @character.occupation, "") %>
<%= print_property("Pets", @character.pets, "") %>
</dl>
<dl class="dl-horizontal hidden section behavior_section">
<%= print_property("Mannerisms", @character.mannerisms, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Birthday", @character.birthday, "") %>
<%= print_property("Birthplace", @character.birthplace, "location") %>
<%= print_property("Education", @character.education, "location") %>
<%= print_property("Background", @character.background, "") %>
</dl>
<dl class="dl-horizontal hidden section favorites_section">
<%= print_property("Color", @character.fave_color, "") %>
<%= print_property("Food", @character.fave_food, "equipment") %>
<%= print_property("Possession", @character.fave_possession, "equipment") %>
<%= print_property("Weapon", @character.fave_weapon, "equipment") %>
<%= print_property("Animal", @character.fave_animal, "character") %>
</dl>
<dl class="dl-horizontal hidden section relationships_section">
<%= print_property("Father", @character.father, "character") %>
<%= print_property("Mother", @character.mother, "character") %>
<%= print_property("Spouse", @character.spouse, "character") %>
<%= print_property("Siblings", @character.siblings, "character") %>
<%= print_property("Archenemy", @character.archenemy, "character") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @character.notes, "") %>
<% if session[:user] and session[:user] == @character.user.id %>
<%= print_property("Private notes", @character.private_notes, "") %>
<% end %>
</dl>
<% if session[:user] and session[:user] == @character.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
character_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
character_edit_path(@character), :class => 'btn' %>
<%= 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' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<% end %>
</div>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<%= @character.name %>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @character.name) %>
<%= print_property("Role in story", @character.role) %>
<%= print_property("Gender", @character.gender) %>
<%= print_property("Age", @character.age) %>
<%= print_property("Universe", @character.universe ? @character.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Weight", @character.weight) %>
<%= print_property("Height", @character.height) %>
<%= print_property("Haircolor", @character.haircolor) %>
<%= print_property("Hairstyle", @character.hairstyle) %>
<%= print_property("Facial hair", @character.facialhair) %>
<%= print_property("Eyecolor", @character.eyecolor) %>
<%= print_property("Race", @character.race) %>
<%= print_property("Skintone", @character.skintone) %>
<%= print_property("Body type", @character.bodytype) %>
<%= print_property("Identifying marks", @character.identmarks) %>
</dl>
<dl class="dl-horizontal hidden section social_section">
<%= print_property("Best friend", @character.bestfriend, "character") %>
<%= print_property("Religion", @character.religion) %>
<%= print_property("Politics", @character.politics) %>
<%= print_property("Prejudices", @character.prejudices) %>
<%= print_property("Occupation", @character.occupation) %>
<%= print_property("Pets", @character.pets) %>
</dl>
<dl class="dl-horizontal hidden section behavior_section">
<%= print_property("Mannerisms", @character.mannerisms) %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Birthday", @character.birthday) %>
<%= print_property("Birthplace", @character.birthplace, "location") %>
<%= print_property("Education", @character.education, "location") %>
<%= print_property("Background", @character.background) %>
</dl>
<dl class="dl-horizontal hidden section favorites_section">
<%= print_property("Color", @character.fave_color) %>
<%= print_property("Food", @character.fave_food, "equipment") %>
<%= print_property("Possession", @character.fave_possession, "equipment") %>
<%= print_property("Weapon", @character.fave_weapon, "equipment") %>
<%= print_property("Animal", @character.fave_animal, "character") %>
</dl>
<dl class="dl-horizontal hidden section relationships_section">
<%= print_property("Father", @character.father, "character") %>
<%= print_property("Mother", @character.mother, "character") %>
<%= print_property("Spouse", @character.spouse, "character") %>
<%= print_property("Siblings", @character.siblings, "character") %>
<%= print_property("Archenemy", @character.archenemy, "character") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @character.notes) %>
<% if session[:user] and session[:user] == @character.user.id %>
<%= print_property("Private notes", @character.private_notes) %>
<% end %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @character.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
character_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
character_edit_path(@character), :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -1,106 +0,0 @@
<%= form_for @equipment, :url => equipment_edit_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :equipment_type, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :equip_type, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Description', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_field', :rows => 3, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @equipment.universe ? @equipment.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
</div>
<div class="hidden section appearance_section">
<div class="control-group">
<%= f.label 'Weight', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :weight, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Original owner', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :original_owner, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Current owner', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :current_owner, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Made by', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :made_by, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Materials', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :materials, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Year made', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :year_made, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section abilities_section">
<div class="control-group">
<%= f.label 'Magic', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :magic, :class => 'text_field', :rows => 3 %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 10, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
equipment_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,86 +1,24 @@
<%= form_for @equipment, :url => equipment_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :equipment_type, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :equip_type, :class => 'text_field', :value => (params[:type_of] || "").capitalize %>
</div>
</div>
<div class="control-group">
<%= f.label 'Description', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_field', :rows => 3, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @equipment.universe ? @equipment.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
<%= generate_form_row_for(f, :name, nil) %>
<%= generate_form_row_for(f, :equip_type, 'Type') %>
<%= generate_form_row_for(f, :description, nil) %>
<%= generate_form_row_for(f, :universe, nil, [{:action => 'universe_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section appearance_section">
<div class="control-group">
<%= f.label 'Weight', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :weight, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :weight, nil) %>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Original owner', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :original_owner, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Current owner', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :current_owner, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Made by', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :made_by, :class => 'text_field' %>
<%= character_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Materials', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :materials, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Year made', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :year_made, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :original_owner, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :current_owner, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :made_by, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :materials, nil) %>
<%= generate_form_row_for(f, :year_made, nil) %>
</div>
<div class="hidden section abilities_section">
<div class="control-group">
<%= f.label 'Magic', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :magic, :class => 'text_field', :rows => 3 %>
</div>
</div>
<%= generate_form_row_for(f, :magic, nil) %>
</div>
<div class="hidden section notes_section">
@ -97,10 +35,3 @@
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
equipment_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -15,17 +15,12 @@
<td style="width: 160px;"><%= simple_format link_to equipment.name, equipment_path(equipment) %></td>
<td><%= simple_format equipment.equip_type %></td>
<td><%= simple_format equipment.description %></td>
<td style="width: 180px;">
<td style="width: 240px;">
<% 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 %>
</td>
</tr>

View File

@ -1,7 +1,11 @@
<ul class="nav nav-tabs">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "Appearance", "#", :id => "show_appearance" %></li>
<li class="tab"><%= link_to "History", "#", :id => "show_history" %></li>
<li class="tab"><%= link_to "Abilities", "#", :id => "show_abilities" %></li>
<li class="tab"><%= link_to "Notes", "#", :id => "show_notes" %></li>
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#general", :id => "show_general" %></li>
<li class="tab"><%= link_to "Appearance", "#appearance", :id => "show_appearance" %></li>
<li class="tab"><%= link_to "History", "#history", :id => "show_history" %></li>
<li class="tab"><%= link_to "Abilities", "#abilities", :id => "show_abilities" %></li>
<li class="tab"><%= link_to "Notes", "#notes", :id => "show_notes" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,5 +1,37 @@
<%- model_class = @equipment.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete this equipment forever', equipment_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @equipment.name %></h1>
<%= form_for @equipment,
:url => equipment_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', equipment_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -18,7 +18,6 @@
A legendary sword or decrepit family shield are capable of telling a story all on their own. Before including them in your literary masterpiece, you should flesh their history out and keep their stories straight.
</p>
<%= link_to 'New Equipment', equipment_create_path, :class => 'btn btn-primary' %>
<%= link_to 'New Weapon', equipment_create_type_path(:weapon), :class => 'btn' %>
<%= link_to 'New Armor', equipment_create_type_path(:armor), :class => 'btn' %>
</div>

View File

@ -1,8 +1,31 @@
<%- model_class = @equipment.class -%>
<h2><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
:default => "New #{model_class.model_name.human}") %></h2>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h3 class="card-heading simple">New equipment</h3>
<%= render :partial => 'tabs' %>
</div>
</div>
<div class="col-md-9">
<div class="card">
<%= form_for @equipment,
:url => equipment_create_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', equipment_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,50 +1,65 @@
<%- model_class = @equipment.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%- model_class = @character.class -%>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @equipment.name, "") %>
<%= print_property("Type", @equipment.equip_type, "") %>
<%= print_property("Description", @equipment.description, "") %>
<%= print_property("Universe", @equipment.universe ? @equipment.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Weight", @equipment.weight, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Original owner", @equipment.original_owner, "character") %>
<%= print_property("Current owner", @equipment.current_owner, "character") %>
<%= print_property("Made by", @equipment.made_by, "character") %>
<%= print_property("Materials used", @equipment.materials, "equipment") %>
<%= print_property("Year made", @equipment.year_made, "") %>
</dl>
<dl class="dl-horizontal hidden section abilities_section">
<%= print_property("Magical properties", @equipment.magic, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @equipment.notes, "") %>
<% if session[:user] and session[:user] == @equipment.user.id %>
<%= print_property("Private notes", @equipment.private_notes, "") %>
<% end %>
</dl>
<% if session[:user] and session[:user] == @equipment.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
equipment_list_path, :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' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<% end %>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<%= @equipment.name %>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @equipment.name, "") %>
<%= print_property("Type", @equipment.equip_type, "") %>
<%= print_property("Description", @equipment.description, "") %>
<%= print_property("Universe", @equipment.universe ? @equipment.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Weight", @equipment.weight, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Original owner", @equipment.original_owner, "character") %>
<%= print_property("Current owner", @equipment.current_owner, "character") %>
<%= print_property("Made by", @equipment.made_by, "character") %>
<%= print_property("Materials used", @equipment.materials, "equipment") %>
<%= print_property("Year made", @equipment.year_made, "") %>
</dl>
<dl class="dl-horizontal hidden section abilities_section">
<%= print_property("Magical properties", @equipment.magic, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @equipment.notes, "") %>
<% if session[:user] and session[:user] == @equipment.user.id %>
<%= print_property("Private notes", @equipment.private_notes, "") %>
<% end %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @equipment.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
equipment_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
equipment_edit_path(@equipment), :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -1,75 +0,0 @@
<%= form_for @language, :url => language_edit_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @language.universe ? @language.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
</div>
<div class="hidden section vocabulary_section">
<div class="control-group">
<%= f.label 'Words', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :words, :class => 'text_field', :rows => 6 %>
</div>
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Established year', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_year, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Established location', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_location, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section speakers_section">
<div class="control-group">
<%= f.label 'Fluent characters', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :characters, :class => 'text_field', :rows => 3 %>
</div>
</div>
<div class="control-group">
<%= f.label 'Speaking locations', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :locations, :class => 'text_field', :rows => 3 %>
</div>
</div>
</div>
<div class="hidden section more_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
language_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,19 +1,6 @@
<%= form_for @language, :url => language_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @language.universe ? @language.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
<%= generate_form_row_for(f, :name, nil) %>
<%= generate_form_row_for(f, :universe, nil, [{:action => 'universe_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section vocabulary_section">
@ -26,35 +13,13 @@
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Established year', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_year, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Established location', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_location, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :established_year, nil) %>
<%= generate_form_row_for(f, :established_location, 'Established in', [{:action => 'location_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section speakers_section">
<div class="control-group">
<%= f.label 'Fluent characters', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :characters, :class => 'text_field', :rows => 3 %>
</div>
</div>
<div class="control-group">
<%= f.label 'Speaking locations', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :locations, :class => 'text_field', :rows => 3 %>
</div>
</div>
<%= generate_form_row_for(f, :characters, nil, [{:action => 'character_picker', :icon => 'user'}]) %>
<%= generate_form_row_for(f, :locations, nil, [{:action => 'location_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section more_section">
@ -65,10 +30,3 @@
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
language_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -17,11 +17,6 @@
language_path(language), :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
language_edit_path(language), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
language_path(language),
:method => :delete,
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<% end %>
</td>
</tr>

View File

@ -1,7 +1,11 @@
<ul class="nav nav-tabs">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "Vocabulary", "#", :id => "show_vocabulary" %></li>
<li class="tab"><%= link_to "History", "#", :id => "show_history" %></li>
<li class="tab"><%= link_to "Speakers", "#", :id => "show_speakers" %></li>
<li class="tab"><%= link_to "More...", "#", :id => "show_more" %></li>
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#general", :id => "show_general" %></li>
<li class="tab"><%= link_to "Vocabulary", "#vocabulary", :id => "show_vocabulary" %></li>
<li class="tab"><%= link_to "History", "#history", :id => "show_history" %></li>
<li class="tab"><%= link_to "Speakers", "#speakers", :id => "show_speakers" %></li>
<li class="tab"><%= link_to "More...", "#more", :id => "show_more" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,6 +1,37 @@
<%- model_class = @language.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete this language forever', language_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @language.name %></h1>
<%= form_for @language,
:url => language_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', language_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -2,9 +2,9 @@
<% if @languages.length > 0 %>
<div class="card">
<h3 class="card-heading simple">
Your characters
<% if false or Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
Languages
<% if false and Universe.where(user_id: session[:user]).length > 0 %>
<small>spoken in <%= universe_filter %></small>
<% end %>
</h3>

View File

@ -1,10 +1,30 @@
<%- model_class = @language.class -%>
<h2><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
:default => "New #{model_class.model_name.human}") %></h2>
<div class="alert alert-info">Languages are <strong>not quite</strong> ready for testing. You will not lose any data you enter, but a lot will change very soon.</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h3 class="card-heading simple">New language</h3>
<%= render :partial => 'tabs' %>
</div>
</div>
<div class="col-md-9">
<div class="card">
<%= form_for @language,
:url => language_create_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', language_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
</div>

View File

@ -1,43 +1,58 @@
<%- model_class = @language.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @language.name, "") %>
<%= print_property("Universe", @language.universe ? @language.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section vocabulary_section">
<%= print_property("Words", @language.words, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Established year", @language.established_year, "") %>
<%= print_property("Established location", @language.established_location, "location") %>
</dl>
<dl class="dl-horizontal hidden section speakers_section">
<%= print_property("Fluent characters", @language.characters, "") %>
<%= print_property("Locations spoken", @language.locations, "") %>
</dl>
<dl class="dl-horizontal hidden section more_section">
<%= print_property("Notes", @language.notes, "") %>
</dl>
<% if session[:user] and session[:user] == @language.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
language_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
language_edit_path(@language), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
language_path(@language),
:method => 'delete',
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<% end %>
</div>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<%= @language.name %>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @language.name, "") %>
<%= print_property("Universe", @language.universe ? @language.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section vocabulary_section">
<%= print_property("Words", @language.words, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Established year", @language.established_year, "") %>
<%= print_property("Established location", @language.established_location, "location") %>
</dl>
<dl class="dl-horizontal hidden section speakers_section">
<%= print_property("Fluent characters", @language.characters, "") %>
<%= print_property("Locations spoken", @language.locations, "") %>
</dl>
<dl class="dl-horizontal hidden section more_section">
<%= print_property("Notes", @language.notes, "") %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @language.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
language_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
language_edit_path(@language), :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,2 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

View File

@ -0,0 +1,78 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse" original-title="">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/">Indent</a>
<div class="nav-collapse">
<ul class="nav">
<% if session[:user] %>
<li>
<a href="/"><i class="icon-music"></i></a>
</li>
<% end %>
<li><a href="/plan/characters">Characters</a></li>
<li><a href="/plan/equipment">Equipment</a></li>
<li><a href="/plan/languages">Languages</a></li>
<li><a href="/plan/locations">Locations</a></li>
<li><a href="/plan/magic">Magic</a></li>
<%
#<li><a href="/plan/plots"><i class="icon-road"></i> Plots</a></li>
%>
<li><a href="/plan/universes">Universes</a></li>
<%
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Write
# </a>
# <ul class="dropdown-menu">
# <li><a href="/write/lyrics"><i class="icon-music"></i> Lyrics</a></li>
# <li><a href="/write/novel"><i class="icon-book"></i> Novel</a></li>
# <li><a href="/write/nonfiction"><i class="icon-info-sign"></i> Nonfiction</a></li>
# <li><a href="/write/poetry"><i class="icon-align-left"></i> Poetry</a></li>
# <li><a href="/write/screenplay"><i class="icon-film"></i> Screenplay</a></li>
# <li><a href="/write/story"><i class="icon-bookmark"></i> Short Story</a></li>
# <li class="divider"></li>
# <li><a href="/my/content"><i class="icon-th"></i> My Content</a></li>
# </ul>
# </li>
#
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Revise
# </a>
# <ul class="dropdown-menu">
# <li><a href="/revise/checklists"><i class="icon-check"></i> Checklists</a></li>
# <li><a href="/revise/analytics"><i class="icon-signal"></i> Analytics</a></li>
# <li><a href="/revise/peer-critiques"><i class="icon-retweet"></i> Peer Critiques</a></li>
# <li><a href="/revise/professional-review"><i class="icon-star"></i> Professional Review</a></li>
# </ul>
# </li>
#
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Submit
# </a>
# <ul class="dropdown-menu">
# <li><a href="/submit/blog"><i class="icon-share-alt"></i> To Your Blog</a></li>
# <li><a href="/submit/print-publishers"><i class="icon-inbox"></i> To Print Publishers</a></li>
# <li><a href="/submit/online-publishers"><i class="icon-print"></i> To Online Publishers</a></li>
# <li class="divider"></li>
# <li><a href="/my/submissions"><i class="icon-envelope"></i> My Submissions</a></li>
# </ul>
# </li>
%>
</ul>
<div class="navbar-text pull-right">
<%= render 'layouts/login_box' %>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,20 +1,23 @@
<% if session[:user] %>
Logged in as
<a class="dropdown-toggle" data-toggle="dropdown" href="/account">
<%= User.find(session[:user]).name %>
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/my/content">My Content</a></li>
<li><a href="/account">Account Settings</a></li>
<li class="divider"></li>
<li><a href="/about/privacy">Privacy Policy</a></li>
<li class="divider"></li>
<li><a href="/logout">Log out</a></li>
</ul>
<% else %>
<ul class="nav">
<ul class="nav navbar-nav">
<% if session[:user] %>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-user"></span>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="/account">Logged in as <%= User.find(session[:user]).name %></a></li>
<li class="divider"></li>
<li><a href="/my/content">My Content</a></li>
<li><a href="/account">Account Settings</a></li>
<li class="divider"></li>
<li><a href="/about/privacy">Privacy Policy</a></li>
<li class="divider"></li>
<li><a href="/logout">Log out</a></li>
</ul>
</li>
<% else %>
<li><a href="/login">Login</a></li>
<li><a href="/register">Register</a></li>
</ul>
<% end %>
<li><a href="/register">Register</a></li>
<% end %>
</ul>

View File

@ -1,78 +1,29 @@
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse" original-title="">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/">Indent</a>
<div class="nav-collapse">
<ul class="nav">
<% if session[:user] %>
<li>
<a href="/"> Dashboard Icon</a>
</li>
<% end %>
<nav class="navbar navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Indent</a>
</div>
<li><a href="/plan/characters">Characters</a></li>
<li><a href="/plan/equipment">Equipment</a></li>
<li><a href="/plan/languages">Languages</a></li>
<li><a href="/plan/locations">Locations</a></li>
<li><a href="/plan/magic">Magic</a></li>
<%
#<li><a href="/plan/plots"><i class="icon-road"></i> Plots</a></li>
%>
<li><a href="/plan/universes">Universes</a></li>
<%
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Write
# </a>
# <ul class="dropdown-menu">
# <li><a href="/write/lyrics"><i class="icon-music"></i> Lyrics</a></li>
# <li><a href="/write/novel"><i class="icon-book"></i> Novel</a></li>
# <li><a href="/write/nonfiction"><i class="icon-info-sign"></i> Nonfiction</a></li>
# <li><a href="/write/poetry"><i class="icon-align-left"></i> Poetry</a></li>
# <li><a href="/write/screenplay"><i class="icon-film"></i> Screenplay</a></li>
# <li><a href="/write/story"><i class="icon-bookmark"></i> Short Story</a></li>
# <li class="divider"></li>
# <li><a href="/my/content"><i class="icon-th"></i> My Content</a></li>
# </ul>
# </li>
#
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Revise
# </a>
# <ul class="dropdown-menu">
# <li><a href="/revise/checklists"><i class="icon-check"></i> Checklists</a></li>
# <li><a href="/revise/analytics"><i class="icon-signal"></i> Analytics</a></li>
# <li><a href="/revise/peer-critiques"><i class="icon-retweet"></i> Peer Critiques</a></li>
# <li><a href="/revise/professional-review"><i class="icon-star"></i> Professional Review</a></li>
# </ul>
# </li>
#
# <li class="dropdown">
# <a href="#" class="dropdown-toggle" data-toggle="dropdown">
# <b class="caret"></b> Submit
# </a>
# <ul class="dropdown-menu">
# <li><a href="/submit/blog"><i class="icon-share-alt"></i> To Your Blog</a></li>
# <li><a href="/submit/print-publishers"><i class="icon-inbox"></i> To Print Publishers</a></li>
# <li><a href="/submit/online-publishers"><i class="icon-print"></i> To Online Publishers</a></li>
# <li class="divider"></li>
# <li><a href="/my/submissions"><i class="icon-envelope"></i> My Submissions</a></li>
# </ul>
# </li>
%>
</ul>
</div>
<div class="navbar-text pull-right">
<%= render 'layouts/login_box' %>
</div>
<div class="collapse navbar-collapse" id="navbar-container">
<ul class="nav navbar-nav">
<% if session[:user] %>
<li><a href="/"><span class="glyphicon glyphicon-home"></span></a></li>
<% end %>
<li><a href="/plan/characters">Characters</a></li>
<li class="active"><a href="/plan/equipment">Equipment</a></li>
<li><a href="/plan/languages">Languages</a></li>
<li><a href="/plan/locations">Locations</a></li>
<li><a href="/plan/magic">Magic</a></li>
<li><a href="/plan/universes">Universes</a></li>
</ul>
<div class="navbar-right">
<%= render 'layouts/login_box' %>
</div>
</div>
</div>
</nav>

View File

@ -1,15 +0,0 @@
<% if flash[:notice] %>
<div class="row">
<div class="span12 alert alert-notice">
<%= flash[:notice] %>
</div>
</div>
<% end %>
<% if flash[:alert] %>
<div class="row">
<div class="span12 alert alert-notice">
<%= flash[:alert] %>
</div>
</div>
<% end %>

View File

@ -1,34 +1,50 @@
<% if session[:user] %>
<% if flash[:notice] %>
<div class="card">
<div class="card-body">
<div class="alert alert-notice">
<%= flash[:notice] %>
</div>
</div>
</div>
<% end %>
<% else %>
<% if flash[:alert] %>
<div class="card">
<div class="card-body">
<div class="alert alert-notice">
<%= flash[:alert] %>
</div>
</div>
</div>
<% end %>
<% unless session[:user] %>
<div class="card">
<h3 class="card-heading simple">Get started instantly</h3>
<h1 class="card-heading">Get started instantly</h1>
<div class="card-body">
Nobody likes creating accounts just to try things out. You can get started making things immediately and create your account later if you want.
</div>
<div class="card-comments">
<div class="comments-collapse-toggle">
<a href="/anon-login">Get started</a>or
<a data-toggle="collapse" data-target="#c1-comments" href="#">
Learn more <i class="icon-angle-down"></i>
</a>
<p>
<a href="/anon-login">Get started</a> or
<a data-toggle="collapse" data-target="#c1-comments" href="#">
Learn more <i class="icon-angle-down"></i>
</a>
</p>
</div>
<div id="c1-comments" class="comments collapse">
<div class="media">
<div class="media-body">
<p>
If you jump right in to creating things, an account will be created for you. As you flesh out characters and worlds, your ideas will be safe and sound under this account, which does not ever expire unless you delete it yourself.
</p>
<p>
At any time, you can change the account's login information, so if you make some good progress you can just create an account and <em>tada!</em> all of your ideas are private to your new account, always there for you.
</p>
<p>
<a data-toggle="collapse" data-target="#c1-comments" href="#">
Collapse card <i class="icon-angle-up"></i>
</a>
</p>
</div>
</div>
<p>
If you jump right in to creating things, an account will be created for you. As you flesh out characters and worlds, your ideas will be safe and sound under this account, which does not ever expire unless you delete it yourself.
</p>
<p>
At any time, you can change the account's login information, so if you make some good progress you can just create an account and <em>tada!</em> all of your ideas are private to your new account, always there for you.
</p>
<p>
<a data-toggle="collapse" data-target="#c1-comments" href="#">
Collapse card <i class="icon-angle-up"></i>
</a>
</p>
</div>
</div>
</div>

View File

@ -7,28 +7,28 @@
<%= csrf_meta_tags %>
<%= render 'layouts/session_protection' %>
<%= render 'layouts/bootstrap_includes' %>
</head>
<body>
<%= render 'layouts/navbar' %>
<%= render 'layouts/anon_notice' %>
<%= render 'layouts/noscript_notice' %>
<div class="container">
<%= render 'layouts/notices' %>
<div class="container-fluid">
<div class="row">
<div class="span9">
<%= yield %>
<div class="col-md-9">
<%= yield %>
</div>
<div class="span3">
<div class="col-md-3">
<%= render 'layouts/sidebar' %>
</div>
</div>
</div>
<div class="container" style="margin-top:160px;">
<div class="container footer">
<div class="row">
<div class="span12">
<p style="text-align: center;">
<div class="col-md-12">
<p>
Indent &middot;
<a href="/about/attribution">Image Attribution</a> &middot;
<a href="/about/privacy">Privacy Policy</a> &middot;

View File

@ -1,160 +0,0 @@
<%= form_for @location, :url => location_edit_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<a href="#" class="help-inline location_name_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label :type_of_location, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :type_of, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :description, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @location.universe ? @location.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
</div>
<div class="hidden section map_section">
<div class="control-group">
<div>
<% if @location.map and @location.map.url(:original) != "/assets/placeholders/map.png" %>
<%= image_tag @location.map.url(:original) %>
<% else %>
<%= image_tag 'placeholders/map.png', id: 'placeholder_map_input' %>
<% end %>
</div>
<%= f.label 'New map?', :class => 'control-label' %>
<div class="controls">
<%= f.file_field :map, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section culture_section">
<div class="control-group">
<%= f.label 'Population', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :population, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Language', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :language, :class => 'text_field' %>
<%= language_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Currency', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :currency, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Motto', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :motto, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section cities_section">
<div class="control-group">
<%= f.label 'Capital', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :capital, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Largest city', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :largest_city, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Notable cities', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :notable_cities, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
</div>
<div class="hidden section geography_section">
<div class="control-group">
<%= f.label 'Area', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :area, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Crops', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :crops, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :located, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :located_at, :class => 'text_field' %>
</div>
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Year established', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_year, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Notable wars', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notable_wars, :class => 'text_field', :rows => 3 %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 10, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
location_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,33 +1,8 @@
<%= form_for @location, :url => location_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<a href="#" class="help-inline location_name_generator">
<i class="icon-refresh"></i> Randomize
</a>
</div>
</div>
<div class="control-group">
<%= f.label :type_of_location, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :type_of, :class => 'text_field', :value => (params[:type_of] || "").capitalize %>
</div>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :description, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @location.universe ? @location.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
<%= generate_form_row_for(f, :name, nil, [{:action => 'location_name_generator', :icon => 'random'}]) %>
<%= generate_form_row_for(f, :type_of, 'Location type') %>
<%= generate_form_row_for(f, :description, nil) %>
<%= generate_form_row_for(f, :universe, nil, [{:action => 'universe_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section map_section">
@ -41,94 +16,27 @@
</div>
<div class="hidden section culture_section">
<div class="control-group">
<%= f.label 'Population', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :population, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Language', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :language, :class => 'text_field' %>
<%= language_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Currency', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :currency, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Motto', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :motto, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :population) %>
<%= generate_form_row_for(f, :language) %>
<%= generate_form_row_for(f, :currency) %>
<%= generate_form_row_for(f, :motto) %>
</div>
<div class="hidden section cities_section">
<div class="control-group">
<%= f.label 'Capital', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :capital, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Largest city', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :largest_city, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<div class="control-group">
<%= f.label 'Notable cities', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :notable_cities, :class => 'text_field' %>
<%= location_picker %>
</div>
</div>
<%= generate_form_row_for(f, :capital, nil, [{:action => 'location_picker', :icon => 'road'}]) %>
<%= generate_form_row_for(f, :largest_city, nil, [{:action => 'location_picker', :icon => 'road'}]) %>
<%= generate_form_row_for(f, :notable_cities, nil, [{:action => 'location_picker', :icon => 'road'}]) %>
</div>
<div class="hidden section geography_section">
<div class="control-group">
<%= f.label 'Area', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :area, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Crops', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :crops, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :located, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :located_at, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :area) %>
<%= generate_form_row_for(f, :crops) %>
<%= generate_form_row_for(f, :located_at, 'Located') %>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Year established', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :established_year, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Notable wars', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notable_wars, :class => 'text_field', :rows => 3 %>
</div>
</div>
<%= generate_form_row_for(f, :established_year) %>
<%= generate_form_row_for(f, :notable_wars) %>
</div>
<div class="hidden section notes_section">
@ -145,10 +53,3 @@
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
location_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,35 +1,28 @@
<table class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<% if session[:user] %>
<th><%=t '.actions', :default => t("helpers.actions") %></th>
<% end %>
</tr>
</thead>
<tbody>
<% @locations.each do |location| %>
<tr>
<td style="width: 160px;"><%= simple_format link_to location.name, location_path(location) %></td>
<td><%= simple_format location.type_of %></td>
<td><%= simple_format truncate(location.description, :length => 256) %></td>
<td style="width: 180px;">
<% @locations.each do |location| %>
<div class="col-md-4">
<div class="card">
<h1 class="card-heading"><%= location.name %></h1>
<div class="card-body">
<% if location.map.url != '/assets/placeholders/map.png' %>
<a href="<%= location_path(location) %>">
<%= image_tag location.map.url, style: 'width: 100%' %>
</a>
<% end %>
<% if location.type_of and location.type_of.length > 0 %>
<div><strong><%= location.type_of %></strong></div>
<% end %>
<p>
<%= simple_format truncate(location.description, length: 256) %>
</p>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == location.user.id %>
<%= link_to t('.view', :default => t("helpers.links.view")),
location_path(location), :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
location_edit_path(location), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
location_path(location),
:method => :delete,
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</div>
</div>
</div>
<% end %>

View File

@ -1,4 +1,4 @@
<ul class="nav nav-tabs">
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "Map", "#", :id => "show_map" %></li>
<li class="tab"><%= link_to "Culture", "#", :id => "show_culture" %></li>
@ -6,4 +6,8 @@
<li class="tab"><%= link_to "Geography", "#", :id => "show_geography" %></li>
<li class="tab"><%= link_to "History", "#", :id => "show_history" %></li>
<li class="tab"><%= link_to "Notes", "#", :id => "show_notes" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,6 +1,37 @@
<%- model_class = @location.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete location forever', character_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @location.name %></h1>
<%= form_for @location,
:url => character_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', character_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,27 +1,36 @@
<%- model_class = Location.new.class -%>
<% if @locations.length > 0 %>
<div class="card">
<h3 class="card-heading simple">
Your locations
<% if false and Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
<% end %>
</h3>
<%= render 'list' %>
<div class="row">
<% if @locations.length > 0 %>
<div class="col-md-12">
<div class="card">
<h1 class="card-heading">
Your locations
<% if false and Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
<% end %>
</h1>
</div>
</div>
<%= render 'list' %>
<% end %>
<div class="card">
<h3 class="card-heading simple">Planning locations</h3>
<div class="card-body">
<p>
Worldbuilding should never be neglected; keep track of where your characters are, where they have been, and where they are going.
</p>
<%= link_to 'New location', location_create_path, :class => 'btn btn-primary' %>
<%= link_to 'New country', location_create_type_path(:country), :class => 'btn' %>
<%= link_to 'New city', location_create_type_path(:city), :class => 'btn' %>
<div class="col-md-4">
<div class="card">
<h1 class="card-heading simple">Planning locations</h1>
<div class="card-body">
<p>
Worldbuilding should never be neglected; keep track of where your characters are, where they have been, and where they are going.
</p>
</div>
<div class="card-comments">
<%= link_to 'New location', location_create_path, :class => 'btn btn-primary' %>
<%= link_to 'New country', location_create_type_path(:country), :class => 'btn' %>
<%= link_to 'New city', location_create_type_path(:city), :class => 'btn' %>
</div>
</div>
<div class="card-comments"></div>
</div>
</div>

View File

@ -1,8 +1,30 @@
<%- model_class = @location.class -%>
<h2><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
:default => "New #{model_class.model_name.human}") %></h2>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h3 class="card-heading simple">New location</h3>
<%= render :partial => 'tabs' %>
</div>
</div>
<div class="col-md-9">
<div class="card">
<%= form_for @location,
:url => location_create_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', location_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
</div>

View File

@ -1,67 +1,77 @@
<%- model_class = @location.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @location.name, "") %>
<%= print_property("Type of", @location.type_of, "") %>
<%= print_property("Description", @location.description, "") %>
<%= print_property("Universe", @location.universe ? @location.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section map_section">
<% if @location.map and @location.map.url(:original) %>
<%= image_tag @location.map.url(:original) %>
<% end %>
</dl>
<dl class="dl-horizontal hidden section culture_section">
<%= print_property("Population", @location.population, "") %>
<%= print_property("Language", @location.language, "language") %>
<%= print_property("Currency", @location.currency, "") %>
<%= print_property("Motto", @location.motto, "") %>
</dl>
<dl class="dl-horizontal hidden section cities_section">
<%= print_property("Capital", @location.capital, "location") %>
<%= print_property("Largest city", @location.largest_city, "location") %>
<%= print_property("Notable cities", @location.notable_cities, "location") %>
</dl>
<dl class="dl-horizontal hidden section geography_section">
<%= print_property("Area", @location.area, "") %>
<%= print_property("Crops", @location.crops, "equipment") %>
<%= print_property("Located", @location.located_at, "location") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Established in", @location.established_year, "") %>
<%= print_property("Notable wars", @location.notable_wars, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @location.notes, "") %>
<% if session[:user] and session[:user] == @location.user.id %>
<%= print_property("Private notes", @location.private_notes, "") %>
<% end %>
</dl>
<% if session[:user] and session[:user] == @location.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
location_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
location_edit_path(@location), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
location_path(@location),
:method => 'delete',
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<% end %>
</div>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<%= @location.name %>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @location.name, "") %>
<%= print_property("Type of", @location.type_of, "") %>
<%= print_property("Description", @location.description, "") %>
<%= print_property("Universe", @location.universe ? @location.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section map_section">
<% if @location.map and @location.map.url(:original) %>
<%= image_tag @location.map.url(:original) %>
<% end %>
</dl>
<dl class="dl-horizontal hidden section culture_section">
<%= print_property("Population", @location.population, "") %>
<%= print_property("Language", @location.language, "language") %>
<%= print_property("Currency", @location.currency, "") %>
<%= print_property("Motto", @location.motto, "") %>
</dl>
<dl class="dl-horizontal hidden section cities_section">
<%= print_property("Capital", @location.capital, "location") %>
<%= print_property("Largest city", @location.largest_city, "location") %>
<%= print_property("Notable cities", @location.notable_cities, "location") %>
</dl>
<dl class="dl-horizontal hidden section geography_section">
<%= print_property("Area", @location.area, "") %>
<%= print_property("Crops", @location.crops, "equipment") %>
<%= print_property("Located", @location.located_at, "location") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("Established in", @location.established_year, "") %>
<%= print_property("Notable wars", @location.notable_wars, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @location.notes, "") %>
<% if session[:user] and session[:user] == @location.user.id %>
<%= print_property("Private notes", @location.private_notes, "") %>
<% end %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @location.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
location_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
location_edit_path(@location), :class => 'btn' %>
</div>
<% end %>
</div>
<!--
<% if @location.map.url(:original) != '/assets/placeholders/map.png' %>
@ -70,3 +80,6 @@
</div>
<% end %>
-->
</div>
</div>
</div>

View File

@ -1,99 +1,29 @@
<%= form_for @magic, :url => magic_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label :type_of_magic, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :type_of, :class => 'text_field', :value => (params[:type_of] || "").capitalize %>
<span class="help-inline">For example: Spell, Ability, Enchantment, etc</span>
</div>
</div>
<div class="control-group">
<%= f.label :universe, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :universe, :class => 'text_field', :value => @magic.universe ? @magic.universe.name : "" %>
<%= universe_picker %>
</div>
</div>
<%= generate_form_row_for(f, :name) %>
<%= generate_form_row_for(f, :type_of, 'Type of magic') %>
<%= generate_form_row_for(f, :universe, nil, [{:action => 'universe_picker', :icon => 'globe'}]) %>
</div>
<div class="hidden section appearance_section">
<div class="control-group">
<%= f.label 'Manifestation', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :manifestation, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Symptoms', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :symptoms, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
<%= generate_form_row_for(f, :manifestation) %>
<%= generate_form_row_for(f, :symptoms) %>
</div>
<div class="hidden section alignment_section">
<div class="control-group">
<%= f.label 'Element', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :element, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Deity', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :diety, :class => 'text_field' %>
</div>
</div>
<%= generate_form_row_for(f, :element) %>
<%= generate_form_row_for(f, :diety) %>
</div>
<div class="hidden section effects_section">
<div class="control-group">
<%= f.label 'Harmful effects', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :harmfulness, :class => 'text_area', :rows => 3 %>
</div>
</div>
<div class="control-group">
<%= f.label 'Helpful effects', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :helpfulness, :class => 'text_area', :rows => 3 %>
</div>
</div>
<div class="control-group">
<%= f.label 'Neutral effects', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :neutralness, :class => 'text_area', :rows => 3 %>
</div>
</div>
<%= generate_form_row_for(f, :harmfulness) %>
<%= generate_form_row_for(f, :helpfulness) %>
<%= generate_form_row_for(f, :neutralness) %>
</div>
<div class="hidden section requirements_section">
<div class="control-group">
<%= f.label 'Resource cost', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :resource, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Skill required', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :skill_level, :class => 'text_field' %>
</div>
</div>
<div class="control-group">
<%= f.label 'Limitations', :class => 'control-label' %>
<div class="controls">
<%= f.text_field :limitations, :class => 'text_field' %>
<div class="help-inline">What <em>can't</em> this magic do?</div>
</div>
</div>
<%= generate_form_row_for(f, :resource, 'Resource cost') %>
<%= generate_form_row_for(f, :skill_level, 'Skill required') %>
<%= generate_form_row_for(f, :limitations) %>
</div>
<div class="hidden section notes_section">
@ -110,10 +40,3 @@
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
magic_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -13,17 +13,12 @@
<tr>
<td style="width: 160px;"><%= simple_format link_to magic.name, magic_path(magic) %></td>
<td><%= simple_format magic.type_of %></td>
<td style="width: 180px;">
<td style="width: 240px;">
<% if session[:user] and session[:user] == magic.user.id %>
<%= link_to t('.view', :default => t("helpers.links.view")),
magic_path(magic), :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
magic_edit_path(magic), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
magic_path(magic),
:method => :delete,
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<% end %>
</td>
</tr>

View File

@ -1,8 +1,12 @@
<ul class="nav nav-tabs">
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "Appearance", "#", :id => "show_appearance" %></li>
<li class="tab"><%= link_to "Alignment", "#", :id => "show_alignment" %></li>
<li class="tab"><%= link_to "Effects", "#", :id => "show_effects" %></li>
<li class="tab"><%= link_to "Requirements", "#", :id => "show_requirements" %></li>
<li class="tab"><%= link_to "Notes", "#", :id => "show_notes" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,6 +1,37 @@
<%- model_class = @magic.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete magic forever', magic_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @magic.name %></h1>
<%= form_for @magic,
:url => magic_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', magic_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,25 +1,24 @@
<%- model_class = Magic.new.class -%>
<% if @magics.length > 0 %>
<div class="card">
<h3 class="card-heading simple">
<h1 class="card-heading">
Magic
<% if false and Universe.where(user_id: session[:user]).length > 0 %>
<small>from <%= universe_filter %></small>
<% end %>
</h3>
</h1>
<%= render 'list' %>
</div>
<% end %>
<div class="card">
<h3 class="card-heading simple">Planning magic</h3>
<h1 class="card-heading">Planning magic</h1>
<div class="card-body">
<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' %>

View File

@ -1,8 +1,8 @@
<%- model_class = @magic.class -%>
<h2><%=t '.title', :default => t('helpers.titles.new', :model => model_class.model_name.human,
:default => "New #{model_class.model_name.human}") %></h2>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
</div>
<%= render :partial => 'tabs' %>
<div class="card-body">
<%= render :partial => 'form' %>
</div>
</div>

View File

@ -1,55 +1,68 @@
<%- model_class = @magic.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @magic.name, "") %>
<%= print_property("Type of", @magic.type_of, "") %>
<%= print_property("Universe", @magic.universe ? @magic.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Manifestation", @magic.manifestation, "") %>
<%= print_property("Symptoms", @magic.symptoms, "") %>
</dl>
<dl class="dl-horizontal hidden section alignment_section">
<%= print_property("Element", @magic.element, "") %>
<%= print_property("Deity", @magic.diety, "character") %>
</dl>
<dl class="dl-horizontal hidden section effects_section">
<%= print_property("Harmful effects", @magic.harmfulness, "") %>
<%= print_property("Helpful effects", @magic.helpfulness, "") %>
<%= print_property("Neutral effects", @magic.neutralness, "") %>
</dl>
<dl class="dl-horizontal hidden section requirements_section">
<%= print_property("Resource cost", @magic.resource, "") %>
<%= print_property("Skill required", @magic.skill_level, "") %>
<%= print_property("Limitations", @magic.limitations, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @magic.notes, "") %>
<% if session[:user] and session[:user] == @magic.user.id %>
<%= print_property("Private notes", @magic.private_notes, "") %>
<% end %>
</dl>
<% if session[:user] and session[:user] == @magic.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
magic_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
magic_edit_path(@magic), :class => 'btn' %>
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
magic_path(@magic),
:method => 'delete',
:confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
:class => 'btn btn-danger' %>
<div class="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<% end %>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<%= @magic.name %>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @magic.name, "") %>
<%= print_property("Type of", @magic.type_of, "") %>
<%= print_property("Universe", @magic.universe ? @magic.universe.name : "", "universe") %>
</dl>
<dl class="dl-horizontal hidden section appearance_section">
<%= print_property("Manifestation", @magic.manifestation, "") %>
<%= print_property("Symptoms", @magic.symptoms, "") %>
</dl>
<dl class="dl-horizontal hidden section alignment_section">
<%= print_property("Element", @magic.element, "") %>
<%= print_property("Deity", @magic.diety, "character") %>
</dl>
<dl class="dl-horizontal hidden section effects_section">
<%= print_property("Harmful effects", @magic.harmfulness, "") %>
<%= print_property("Helpful effects", @magic.helpfulness, "") %>
<%= print_property("Neutral effects", @magic.neutralness, "") %>
</dl>
<dl class="dl-horizontal hidden section requirements_section">
<%= print_property("Resource cost", @magic.resource, "") %>
<%= print_property("Skill required", @magic.skill_level, "") %>
<%= print_property("Limitations", @magic.limitations, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @magic.notes, "") %>
<% if session[:user] and session[:user] == @magic.user.id %>
<%= print_property("Private notes", @magic.private_notes, "") %>
<% end %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @magic.user.id %>
<div class="form-actions">
<%= link_to t('.back', :default => t("helpers.links.back")),
magic_list_path, :class => 'btn' %>
<%= link_to t('.edit', :default => t("helpers.links.edit")),
magic_edit_path(@magic), :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,39 @@
<div class="row">
<div class="col-md-4">
<div class="card">
<h1 class="card-heading">This is is your dashboard</h1>
<div class="card-body">
<p>
As you plan your stories, you can always return back here to get a view of everything
you've created at a glance. To get back here from anywhere, simply click the
<strong>Indent</strong> logo up top, or the <span class="glyphicon glyphicon-home"></span> icon next to it.
</p>
<p>
Good luck and have fun!
</p>
</div>
<div class="card-comments"></div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<h1 class="card-heading">Ready to get started?</h1>
<div class="card-body">
<p>
Welcome to Indent. Before you get started, it's recommended that you
<%= link_to "create a universe", :universe_create %>.
</p>
<p>
This universe will contain
everything you create about your world, and is a handy way to keep multiple worlds
cleanly separated during the planning process.
</p>
</div>
<div class="card-comments">
<%= link_to "Create a universe!", :universe_create %>
</div>
</div>
</div>
</div>

View File

@ -1,120 +1,111 @@
<div class="card">
<h3 class="card-heading simple">
Attribution
</h3>
<div class="card-body">
<p>
There are a lot of wonderful artists out there, but I am not one of them. Therefore, I've populated the site with <a href="http://us.creativecommons.org/">Creative Commons</a> licensed images. Below, you can see who the artist is for any piece of art displayed on the site, and typically click through to more of their work.
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Attribution</h1>
<div class="card-body">
<p>
There are a lot of wonderful artists out there, but I am not one of them.
</p>
<p>
Therefore, I've populated the site with <a href="http://us.creativecommons.org/">Creative Commons</a> licensed images.
</p>
<p>
Here you can see who the artist is for any piece of art displayed on the site, and typically click through to more of their work.
</p>
</div>
<div class="card-comments"></div>
</div>
</div>
<div class="card-comments"></div>
</div>
<div class="row-fluid">
<div class="span4 card">
<h3 class="card-heading simple">
Ryan Bliss
</h3>
<div class="card-body">
<a href="http://digb.deviantart.com/art/Portals-367961779">
<%= image_tag "card-headers/universes.jpg" %>
</a>
</div>
<div class="card-comments">
<a href="http://digb.deviantart.com">More by this artist</a>
</div>
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">
Ryan Bliss
</h1>
<a href="http://digb.deviantart.com/art/Portals-367961779">
<%= image_tag "card-headers/universes.jpg", style: "width: 100%" %>
</a>
<div class="card-comments">
<a href="http://digb.deviantart.com">More by this artist</a>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">
Anna Steinbauer
</h3>
<div class="card-body">
<a href="http://depingo.deviantart.com/art/Spark-349760024">
<%= image_tag "card-headers/characters.jpg" %>
</a>
</div>
<div class="card-comments">
<a href="http://depingo.deviantart.com">More by this artist</a>
</div>
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Anna Steinbauer</h1>
<a href="http://depingo.deviantart.com/art/Spark-349760024">
<%= image_tag "card-headers/characters.jpg", style: "width: 100%" %>
</a>
<div class="card-comments">
<a href="http://depingo.deviantart.com">More by this artist</a>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">
Alex Ruiz
</h3>
<div class="card-body">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Alex Ruiz</h1>
<a href="http://alexruizart.deviantart.com/art/Conjuring-410846502">
<%= image_tag "card-headers/magic.jpg" %>
<%= image_tag "card-headers/magic.jpg", style: "width: 100%" %>
</a>
</div>
<div class="card-comments">
<a href="http://alexruizart.deviantart.com">More by this artist</a>
</div>
</div>
<div class="card-comments">
<a href="http://alexruizart.deviantart.com">More by this artist</a>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="row">
<div class="span4 card">
<h3 class="card-heading simple">
Paul Fisher
</h3>
<div class="card-body">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Paul Fisher</h1>
<a href="http://paulsgruff.deviantart.com/art/Call-To-Convention-416240260">
<%= image_tag "card-headers/locations.jpg" %>
<%= image_tag "card-headers/locations.jpg", style: "width: 100%" %>
</a>
</div>
<div class="card-comments">
<a href="http://paulsgruff.deviantart.com">More by this artist</a>
</div>
</div>
<div class="card-comments">
<a href="http://paulsgruff.deviantart.com">More by this artist</a>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">
roaala (name pending)
</h3>
<div class="card-body">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">roaala (name pending)</h1>
<a href="http://i.imgur.com/hyfaRvl.jpg">
<%= image_tag "card-headers/equipment.jpg" %>
<%= image_tag "card-headers/equipment.jpg", style: "width: 100%" %>
</a>
</div>
<div class="card-comments">
<a href="#"></a>
</div>
<div class="card-comments">
<a href="#"></a>
</div>
</div>
</div>
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Tom Harrison</h1>
<a href="http://tgharrison.deviantart.com/art/Alien-Territorial-Battle-371618831">
<%= image_tag "card-headers/languages.jpg", style: "width: 100%" %>
</a>
<div class="card-comments">
<a href="http://tgharrison.deviantart.com">More by this artist</a>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">
Tom Harrison
</h3>
<div class="card-body">
<a href="http://tgharrison.deviantart.com/art/Alien-Territorial-Battle-371618831">
<%= image_tag "card-headers/languages.jpg" %>
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Tony Delgrosso</h1>
<a href="http://www.flickr.com/photos/delgrossodotcom/5715664551">
<%= image_tag "card-headers/hero.jpg", style: "width: 100%" %>
</a>
</div>
<div class="card-comments">
<a href="http://tgharrison.deviantart.com">More by this artist</a>
<div class="card-comments">
<a href="http://www.flickr.com/photos/delgrossodotcom/">More by this artist</a>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span4 card">
<h3 class="card-heading simple">
Tony Delgrosso
</h3>
<div class="card-body">
<a href="http://www.flickr.com/photos/delgrossodotcom/5715664551">
<%= image_tag "card-headers/hero.jpg" %>
</a>
</div>
<div class="card-comments">
<a href="http://www.flickr.com/photos/delgrossodotcom/">More by this artist</a>
</div>
</div>
</div>

View File

@ -1,75 +1,37 @@
<div class="row-fluid">
<% if @things > 0 %>
<div class="card span4">
<h3 class="card-heading simple">
<div class="col-md-4">
<div class="card">
<h1 class="card-heading">
<small>You've created a total of</small> <%= @things %> <small><%= "thing".pluralize(@things) %>!</small>
</h3>
</h1>
<div class="card-body">
<p>
Keep it up!
</p>
<div class="card-body">
<p>
Keep it up!
</p>
</div>
<div class="card-comments"></div>
</div>
<div class="card-comments"></div>
</div>
<div class="card span4">
<div class="card-body">
<p>
<h2><%= @characters.length %> <small><%= link_to "character".pluralize(@characters.length), character_list_path %></small></h2>
<h2><%= @equipment.length %> <small><%= link_to "piece".pluralize(@equipment.length) + " of equipment", equipment_list_path %></small></h2>
<h2><%= @languages.length %> <small><%= link_to "language".pluralize(@languages.length), language_list_path %></small></h2>
<h2><%= @locations.length %> <small><%= link_to "location".pluralize(@locations.length), location_list_path %></small></h2>
<h2><%= @magics.length %> <small><%= link_to "manifestation".pluralize(@magics.length) + " of magic", magic_list_path %></small></h2>
<h2><%= @universes.length %> <small><%= link_to "universe".pluralize(@universes.length), universe_list_path %></small></h2>
</p>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<p>
<h2><%= @characters.length %> <small><%= link_to "character".pluralize(@characters.length), character_list_path %></small></h2>
<h2><%= @equipment.length %> <small><%= link_to "piece".pluralize(@equipment.length) + " of equipment", equipment_list_path %></small></h2>
<h2><%= @languages.length %> <small><%= link_to "language".pluralize(@languages.length), language_list_path %></small></h2>
<h2><%= @locations.length %> <small><%= link_to "location".pluralize(@locations.length), location_list_path %></small></h2>
<h2><%= @magics.length %> <small><%= link_to "manifestation".pluralize(@magics.length) + " of magic", magic_list_path %></small></h2>
<h2><%= @universes.length %> <small><%= link_to "universe".pluralize(@universes.length), universe_list_path %></small></h2>
</p>
</div>
<div class="card-comments"></div>
</div>
<div class="card-comments"></div>
</div>
</div>
<% else %>
<div class="card span5">
<h3 class="card-heading simple">
This is your dashboard
</h3>
<div class="card-body">
<p>
As you plan your stories, you can always return back here to get a view of everything
you've created at a glance. To get back here from anywhere, simply click the
<strong>Indent</strong> logo up top, or the dashboard icon next to it.
</p>
<p>
Good luck and have fun!
</p>
</div>
<div class="card-comments">
</div>
</div>
<div class="card span4">
<h3 class="card-heading simple">
Ready to get started?
</h3>
<div class="card-body">
<p>
Welcome to Indent. Before you get started, it's recommended that you
<%= link_to "create a universe", :universe_create %>.
</p>
<p>
This universe will contain
everything you create about your world, and is a handy way to keep multiple worlds
cleanly separated during the planning process.
</p>
</div>
<div class="card-comments">
<%= link_to "Create a universe!", :universe_create %>
</div>
</div>
<%= render 'dashboard_intro' %>
<% end %>
</div>

View File

@ -1,124 +1,129 @@
<div class="card">
<h3 class="card-heading simple">Indent <small>before you write</small></h3>
<div class="card-body">
<div id="landing-page-1">
<div class="row">
<div class="row-fluid">
<div class="span7">
<p>
Indent is a set of tools for writers, game designers, and roleplayers to create magnificent universes &ndash; and everything within them.
</p>
<p>
From a simple interface in your browser, on your phone, or on your tablet, you can do everything you'd ever want to do while creating your own little (or big!) world.
</p>
</div>
<div class="span5">
<div class="thumbnail">
<%= image_tag "card-headers/hero.jpg" %>
<div class="col-md-8">
<div class="card">
<div class="card-body">
<h1 style="font-size: 44px;">
Indent <small>before you write</small>
</h1>
<p>
Indent is a set of tools for writers, game designers, and roleplayers to create magnificent universes &ndash; and everything within them.
</p>
<p>
From a simple interface in your browser, on your phone, or on your tablet, you can do everything you'd ever want to do while creating your own little (or big!) world.
</p>
<p>
Ready?
</p>
</div>
<div class="card-comments">
<a class="btn btn-primary btn-lg" href="/anon-login">
Get Started Now<br />
</a>
or <a href="/login">log in to your existing account</a>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span12">
<a class="btn btn-primary btn-large" href="/anon-login">
Get Started Now<br />
</a>
or <a href="/login">log in to your existing account</a>
<div class="col-xs-4">
<div class="card" style="padding-top: 0px; background: black;">
<%= image_tag "card-headers/hero.jpg", :style => "width: 100%;" %>
</div>
</div>
</div>
<div class="card-comments"></div>
</div>
<div class="row-fluid">
<div class="span4 card">
<h3 class="card-heading simple">Characters</h3>
<%= image_tag "card-headers/characters.jpg" %>
<div class="card-body">
<p>
Plan physical appearance, behaviorisms, social roles, family &ndash; even a favorite color!
</p>
<p>
<div class="row" id="content-types">
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading">Characters</h3>
<%= image_tag "card-headers/characters.jpg" %>
<div class="card-body">
<p>
Plan physical appearance, behaviorisms, social roles, family &ndash; even a favorite color!
</p>
</div>
<div class="card-comments">
<a href="/plan/characters" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">Equipment</h3>
<%= image_tag "card-headers/equipment.jpg" %>
<div class="card-body">
<p>
Every weapon was made by someone. Keep track of every aspect of your equipment.
</p>
<p>
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading">Equipment</h3>
<%= image_tag "card-headers/equipment.jpg" %>
<div class="card-body">
<p>
Every weapon was made by someone. Keep track of every aspect of your equipment.
</p>
</div>
<div class="card-comments">
<a href="/plan/equipment" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">Locations</h3>
<%= image_tag "card-headers/locations.jpg" %>
<div class="card-body">
<p>
Upload maps, link areas, track demographics, and keep track of history.
</p>
<p>
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading">Locations</h3>
<%= image_tag "card-headers/locations.jpg" %>
<div class="card-body">
<p>
Upload maps, link areas, track demographics, and keep track of history.
</p>
</div>
<div class="card-comments">
<a href="/plan/locations" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
</div>
<div class="row-fluid">
<div class="span4 card">
<h3 class="card-heading simple">Magic</h3>
<%= image_tag "card-headers/magic.jpg" %>
<div class="card-body">
<p>
Whether it's fireballs or potions or nature or voodoo, craft every facet to how it works.
</p>
<p>
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading">Magic</h3>
<%= image_tag "card-headers/magic.jpg" %>
<div class="card-body">
<p>
Whether it's fireballs or potions or nature or voodoo, craft every facet to how it works.
</p>
</div>
<div class="card-comments">
<a href="/plan/magic" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">Languages</h3>
<%= image_tag "card-headers/languages.jpg" %>
<div class="card-body">
<p>
English doesn't have to be the only language in your world. Everything is fair game.
</p>
<p>
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading">Languages</h3>
<%= image_tag "card-headers/languages.jpg" %>
<div class="card-body">
<p>
English doesn't have to be the only language in your world. Everything is fair game.
</p>
</div>
<div class="card-comments">
<a href="/plan/languages" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
<div class="span4 card">
<h3 class="card-heading simple">Universes</h3>
<%= image_tag "card-headers/universes.jpg" %>
<div class="card-body">
<p>
You know you've always wanted to create <em>an entire universe</em>. Now's your chance!
</p>
<p>
<div class="col-sm-3">
<div class="card">
<h1 class="card-heading simple">Universes</h3>
<%= image_tag "card-headers/universes.jpg" %>
<div class="card-body">
<p>
You know you've always wanted to create <em>an entire universe</em>. Now's your chance!
</p>
</div>
<div class="card-comments">
<a href="/plan/universes" class="btn">Plan your own</a>
</p>
</div>
</div>
</div>
</div>
<div class="card">
<h3 class="card-heading simple">Just a quick note...</h3>
<div class="card-body">
<p>
I'm still working out the kinks here, so stay with me. Your data is completely safe and anything you store will always be available to you (even if features change), so feel free to use Indent in the meantime!
</p>
</div>
</div>

View File

@ -11,7 +11,10 @@
<%= f.password_field :password, :class => 'text_field' %>
</div>
</div>
</div>
<div class="card-comments"> <!-- dear god what have I done -->
<div class="form-actions">
<%= f.submit 'Log in', :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),

View File

@ -1,12 +1,13 @@
<div class="card">
<ul class="nav nav-tabs">
<li class="active">
<a href="/login">Log in</a>
</li>
<li><a href="/register">Sign up</a></li>
<li><a href="/be-anonymous">Be Anonymous</a></li>
</ul>
<%- model_class = @session.class -%>
<%= render :partial => 'form' %>
</div>
<ul class="nav nav-tabs">
<li class="active">
<a href="/login">Log in</a>
</li>
<li><a href="/register">Sign up</a></li>
<li><a href="/be-anonymous">Be Anonymous</a></li>
</ul>
<div class="card-body">
<%- model_class = @session.class -%>
<%= render :partial => 'form' %>
</div>
</div>

View File

@ -1,71 +0,0 @@
<%= form_for @universe, :url => universe_edit_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<span class="muted">Can't think of a name? Name it after your story!</span>
</div>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_area', :rows => 4, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section starter_section history_section">
<div class="control-group">
<%= f.label 'Relevant history', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :history, :class => 'text_area', :rows => 6, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 12, :style => "width: 80%;" %>
</div>
<div class="muted">
By default, all content is private and only accessible by you. Even if you decide to make something
public, the private notes section will always be only visible to you, no matter what.
</div>
</div>
</div>
<div class="hidden section settings_section">
<div class="control-group">
<%= f.label :privacy, :class => 'control-label' %>
<div class="controls">
<%= f.select :privacy, [['Private', 'Private'], ['Public', 'Public']] %>
<div class="muted">
By default, all universes are <strong>private</strong>, which means only you
can see them. If you choose to make your
universe <strong>public</strong>, <em>all</em> content within it (characters,
locations, etc) will be visible to anyone on the Internet, regardless of that
content's individual privacy setting. Even if a universe is marked public, only
you will have access to edit its contents.
</div>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
universe_list_path, :class => 'btn' %>
</div>
<% end %>

View File

@ -1,71 +1,62 @@
<%= form_for @universe, :url => universe_create_process_path, :html => { :class => 'form-horizontal' } do |f| %>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<span class="muted">Can't think of a name? Name it after your story!</span>
</div>
<div class="hidden section starter_section general_section">
<div class="control-group">
<%= f.label :name, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :name, :class => 'text_field' %>
<span class="muted">Can't think of a name? Name it after your story!</span>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_area', :rows => 4, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Relevant history', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :history, :class => 'text_area', :rows => 6, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 10, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
<div class="muted">
By default, all content is private and only accessible by you. Even if you decide to make something<br />
public, the private notes section will always be only visible to you, no matter what.
</div>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_area', :rows => 4, :style => "width: 80%;" %>
</div>
</div>
<div class="hidden section settings_section">
<div class="control-group">
<%= f.label :privacy, :class => 'control-label' %>
<div class="controls">
<%= f.select :privacy, [['Private', 'Private'], ['Public', 'Public']] %>
<div class="muted">
By default, all universes are <strong>private</strong>, which means only you
can see them. If you choose to make your
universe <strong>public</strong>, <em>all</em> content within it (characters,
locations, etc) will be visible to anyone on the Internet, regardless of that
content's individual privacy setting. Even if a universe is marked public, only
you will have access to edit its contents.
</div>
</div>
<div class="hidden section history_section">
<div class="control-group">
<%= f.label 'Relevant history', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :history, :class => 'text_area', :rows => 6, :style => "width: 80%;" %>
</div>
</div>
</div>
<div class="hidden section notes_section">
<div class="control-group">
<%= f.label 'Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :notes, :class => 'text_area', :rows => 10, :style => "width: 80%;" %>
</div>
</div>
<div class="control-group">
<%= f.label 'Private Notes', :class => 'control-label' %>
<div class="controls">
<%= f.text_area :private_notes, :class => 'text_area', :rows => 8, :style => "width: 80%;" %>
<div class="muted">
By default, all content is private and only accessible by you. Even if you decide to make something<br />
public, the private notes section will always be only visible to you, no matter what.
</div>
</div>
</div>
</div>
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
universe_list_path, :class => 'btn' %>
<div class="hidden section settings_section">
<div class="control-group">
<%= f.label :privacy, :class => 'control-label' %>
<div class="controls">
<%= f.select :privacy, [['Private', 'Private'], ['Public', 'Public']] %>
<div class="muted">
By default, all universes are <strong>private</strong>, which means only you
can see them. If you choose to make your
universe <strong>public</strong>, <em>all</em> content within it (characters,
locations, etc) will be visible to anyone on the Internet, regardless of that
content's individual privacy setting. Even if a universe is marked public, only
you will have access to edit its contents.
</div>
</div>
</div>
<% end %>
</div>

View File

@ -1,6 +1,10 @@
<ul class="nav nav-tabs">
<ul class="nav nav-stacked">
<li class="active tab"><%= link_to "General", "#", :id => "show_general" %></li>
<li class="tab"><%= link_to "History", "#", :id => "show_history" %></li>
<li class="tab"><%= link_to "Notes", "#", :id => "show_notes" %></li>
<li class="tab"><%= link_to "Settings", "#", :id => "show_settings" %></li>
<li class="divider"></li>
<li class="tab"><a href="#expand-all" class="expand-all">
<span class="glyphicon glyphicon-sort-by-attributes-alt"></span> Expand All
</a></li>
</ul>

View File

@ -1,6 +1,37 @@
<%- model_class = @universe.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<%= render :partial => 'edit_form' %>
</div>
<div class="row">
<div class="col-xs-3">
<div class="card">
<h1 class="card-heading">Facets</h1>
<%= render :partial => 'tabs' %>
</div>
<div class="card">
<h1 class="card-heading">Danger-zone</h1>
<div class="card-body">
<%= link_to 'Delete universe forever', universe_path,
:class => 'btn btn-danger',
:method => :delete,
:confirm => 'Are you sure? This action cannot be undone!' %>
</div>
</div>
</div>
<div class="col-xs-8">
<div class="card">
<h1 class="card-heading">Editing <%= @universe.name %></h1>
<%= form_for @universe,
:url => universe_edit_process_path,
:html => { :class => 'form-horizontal' } do |form| %>
<div class="card-body">
<%= render :partial => 'form', :locals => { :f => form } %>
</div>
<div class="card-comments">
<%= form.submit nil, :class => 'btn btn-primary' %>
<%= link_to 'Cancel', universe_list_path, :class => 'btn' %>
</div>
<% end %>
</div>
</div>
</div>

View File

@ -1,40 +1,41 @@
<%- model_class = Universe.new.class -%>
<% if @universes.length > 0 %>
<div class="card">
<h3 class="card-heading simple">Your universes</h3>
<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| %>
<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;">
<div class="row">
<% if @universes.length > 0 %>
<% @universes.each do |universe| %>
<div class="col-md-4">
<div class="card">
<h1 class="card-heading">
<% if universe.privacy and universe.privacy.downcase == "public" %>
<span class="glyphicon glyphicon-globe pull-right" style="font-size: 16px;"></span>
<% end %>
<%= universe.name %>
</h1>
<div class="card-body">
<p><%= simple_format truncate(universe.description, length: 256) %>
</div>
<div class="card-comments">
<%= 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 %>
<%= link_to t('.edit', :default => t("helpers.links.edit")), universe_edit_path(universe), :class => 'btn' %>
</div>
</div>
</div>
<% end %>
<% end %>
<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 &ndash; 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="col-md-4">
<div class="card">
<h1 class="card-heading">What is a universe?</h1>
<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 &ndash; 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>
</div>
<div class="card-comments">
<%= link_to 'New universe', universe_create_path, :class => 'btn btn-primary' %>
</div>
</div>
</div>
<div class="card-comments"></div>
</div>

View File

@ -1,5 +1,7 @@
<div class="card">
<h3 class="card-heading simple">New universe</h3>
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
</div>
<h1 class="card-heading">New universe</h1>
<div class="card-body">
<%= render :partial => 'tabs' %>
<%= render :partial => 'form' %>
</div>
</div>

View File

@ -1,49 +1,68 @@
<%- model_class = @universe.class -%>
<div class="card">
<%= render :partial => 'tabs' %>
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @universe.name, "") %>
<%= print_property("Description", @universe.description, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("History", @universe.history, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @universe.notes, "") %>
<% if session[:user] and session[:user] == @universe.user.id %>
<%= print_property("Private notes", @universe.private_notes, "") %>
<% end %>
</dl>
<dl class="dl-horizontal hidden section settings_section">
<%= print_property("Privacy", @universe.privacy, "") %>
</dl>
<% if session[:user] and session[:user] == @universe.user.id %>
<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="row">
<div class="col-xs-3">
<div class="card">
<%= render :partial => 'tabs' %>
</div>
</div>
<div class="col-xs-9">
<div class="card">
<h1 class="card-heading">
<% if @universe.privacy and @universe.privacy.downcase == "public" %>
<span class="glyphicon glyphicon-globe pull-right" style="font-size: 18px;"></span>
<% end %>
<%= @universe.name %> <small>by <%= @universe.user.name %></small>
</h1>
<div class="card-body">
<dl class="dl-horizontal hidden section general_section">
<%= print_property("Name", @universe.name, "") %>
<%= print_property("Description", @universe.description, "") %>
</dl>
<dl class="dl-horizontal hidden section history_section">
<%= print_property("History", @universe.history, "") %>
</dl>
<dl class="dl-horizontal hidden section notes_section">
<%= print_property("Notes", @universe.notes, "") %>
<% if session[:user] and session[:user] == @universe.user.id %>
<%= print_property("Private notes", @universe.private_notes, "") %>
<% end %>
</dl>
<dl class="dl-horizontal hidden section settings_section">
<%= print_property("Privacy", @universe.privacy, "") %>
</dl>
</div>
<div class="card-comments">
<% if session[:user] and session[:user] == @universe.user.id %>
<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' %>
</div>
<% end %>
</div>
</div>
</div>
<% end %>
</div>
<% if @universe.content_count > 0 %>
<div class="card">
<h3 class="card-heading simple">
<h1 class="card-heading">
In this universe...
</h3>
</h1>
<div class="card-body">
@ -67,16 +86,20 @@
<li class="tab"><%= link_to @universe.magics.length.to_s + " magic", "#", :id => "show_magic" %></li>
<% end %>
</ul>
</div>
</div>
<div>
<div>
<dl class="dl-horizontal hidden content-section characters_section">
<% @characters = @universe.characters %>
<%= render 'characters/list' %>
</dl>
<dl class="dl-horizontal hidden content-section equipment_section">
<dl class="dl-horizontal hidden content-section equipment_section card">
<% @equipment = @universe.equipment %>
<%= render 'equipment/list' %>
</dl>
<dl class="dl-horizontal hidden content-section languages_section">
<dl class="dl-horizontal hidden content-section languages_section card">
<% @languages = @universe.languages %>
<%= render 'languages/list' %>
</dl>
@ -84,7 +107,7 @@
<% @locations = @universe.locations %>
<%= render 'locations/list' %>
</dl>
<dl class="dl-horizontal hidden content-section magic_section">
<dl class="dl-horizontal hidden content-section magic_section card">
<% @magics = @universe.magics %>
<%= render 'magic/list' %>
</dl>
@ -93,7 +116,7 @@
<div class="card-comments"></div>
</div>
</div>
<% end %>
@ -113,4 +136,4 @@
</p>
</div>
</div>
<% end %>
<% end %>

View File

@ -37,6 +37,9 @@
</div>
</div>
</div>
<div class="card-comments">
<div class="form-actions">
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),

View File

@ -18,4 +18,6 @@
</p>
</p>
</div>
</div>
<div class="card-comments"></div>
</div>

View File

@ -1,10 +1,12 @@
<div class="card">
<ul class="nav nav-tabs">
<li><a href="/login">Log in</a></li>
<li class="active"><a href="/register">Sign up</a></li>
<li><a href="/be-anonymous">Be Anonymous</a></li>
</ul>
<ul class="nav nav-tabs">
<li><a href="/login">Log in</a></li>
<li class="active"><a href="/register">Sign up</a></li>
<li><a href="/be-anonymous">Be Anonymous</a></li>
</ul>
<%- model_class = @user.class -%>
<%= render :partial => 'form' %>
</div>
<div class="card-body">
<%- model_class = @user.class -%>
<%= render :partial => 'form' %>
</div>
</div>

View File

@ -0,0 +1,18 @@
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
helpers:
actions: "Actions"
links:
back: "Back"
cancel: "Cancel"
confirm: "Are you sure?"
destroy: "Delete"
new: "New"
edit: "Edit"
titles:
edit: "Edit %{model}"
save: "Save %{model}"
new: "New %{model}"
delete: "Delete %{model}"

1
public/Igor Submodule

@ -0,0 +1 @@
Subproject commit b2351ec146b58f8d509a4d98c9ba649a99b4d12c

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More