diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc new file mode 100644 index 000000000..6d5a3335e --- /dev/null +++ b/CHANGELOG.rdoc @@ -0,0 +1,14 @@ +# Changelog + +Please add each new change as its own line to the top of the list below when a pull request is made in the format MM/DD: FEATURE/BUGFIX. :) + +-- + +Most recent changes: + +10/05 Added additional fields to Locations: laws, climate, founding story, and sports. +10/05 Added a "Nature" tab to Characters containing new fields, and moved the "Fave" tab fields under "Social". +10/05 Added a "Rules" tab to Universes containing fields for detailing magic systems, laws of physics, and technologies. +10/05 Fixed a bug that prevented the "Hairstyle" field from saving on Characters. +10/05 Fixed a bug that prevented the "Language" field from saving on Locations. +10/04 Added the ability to download Notebook contents in JSON, TXT, or CSV. diff --git a/README.rdoc b/README.rdoc index ff87b8214..87a6e49e0 100644 --- a/README.rdoc +++ b/README.rdoc @@ -82,7 +82,7 @@ Finally, run the server with rails server -== Deployment to indentapp.com +== Deployment to notebook.ai Deployment to the live stage will only be done by approved developers, and consists of a deployment of @@ -92,11 +92,11 @@ Deployment to the live stage will only be done by approved developers, and consi - run regression tests on staging environment -- deploy from staging to live (viewed at indentapp.com) +- deploy from staging to live (viewed at notebook.ai) == Thanks Feel free to get in touch if you have any questions, comments, or concerns! :) -(c) Andrew Brown 2014 +(c) Andrew Brown 2016 diff --git a/app/controllers/characters_controller.rb b/app/controllers/characters_controller.rb index d4a650a03..086e294d7 100644 --- a/app/controllers/characters_controller.rb +++ b/app/controllers/characters_controller.rb @@ -12,9 +12,10 @@ def content_param_list [ :universe_id, :user_id, :name, :age, :role, :gender, :age, :archetype, :height, :weight, :haircolor, - :facialhair, :eyecolor, :race, :skintone, :bodytype, :identmarks, - :religion, :politics, :prejudices, :occupation, :pets, + :facialhair, :eyecolor, :race, :skintone, :bodytype, :identmarks, :hairstyle, + :religion, :politics, :prejudices, :occupation, :pets, :aliases, :mannerisms, :birthday, :education, :background, + :motivations, :flaws, :talents, :hobbies, :personality_type, :fave_color, :fave_food, :fave_possession, :fave_weapon, :fave_animal, :notes, :private_notes, :privacy, siblingships_attributes: [:id, :sibling_id, :_destroy], diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index f45a173d4..7f0e50f99 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -11,9 +11,10 @@ def content_params def content_param_list [ :universe_id, :user_id, :name, :type_of, :description, #:map, - :population, :currency, :motto, + :population, :currency, :motto, :language, :area, :crops, :located_at, :established_year, :notable_wars, - :notes, :private_notes, :privacy, + :notes, :private_notes, :privacy, :laws, :climate, :founding_story, + :sports, # Relations #todo might be able to inject/reflect these from :relates concern implementation diff --git a/app/controllers/universes_controller.rb b/app/controllers/universes_controller.rb index c68425057..2527c8e55 100644 --- a/app/controllers/universes_controller.rb +++ b/app/controllers/universes_controller.rb @@ -10,6 +10,7 @@ def content_param_list [ :user_id, :name, :description, + :laws_of_physics, :magic_system, :technologies, :history, :privacy, :notes, :private_notes diff --git a/app/models/character.rb b/app/models/character.rb index 9c8d92a63..733abc3cc 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -51,27 +51,26 @@ def self.attribute_categories { overview: { icon: 'info', - attributes: %w(name role gender age archetype universe_id) + attributes: %w(name role gender age archetype aliases universe_id) }, looks: { icon: 'face', attributes: %w(weight height haircolor hairstyle facialhair eyecolor race skintone bodytype identmarks) }, + nature: { + icon: 'fingerprint', + attributes: %w(mannerisms motivations flaws prejudices talents hobbies personality_type) + }, social: { icon: 'groups', - attributes: %w(best_friends archenemies religion politics prejudices occupation) + attributes: %w(best_friends archenemies religion politics occupation fave_color fave_food fave_possession fave_weapon fave_animal) }, - # TODO: remove schema for mannerisms history: { icon: 'info', attributes: %w(birthday birthplaces education background) }, - faves: { - icon: 'star', - attributes: %w(fave_color fave_food fave_possession fave_weapon fave_animal) - }, family: { - icon: 'face', + icon: 'device_hub', attributes: %w(mothers fathers spouses siblings children) }, notes: { diff --git a/app/models/location.rb b/app/models/location.rb index 4974185e4..5d50ce09e 100644 --- a/app/models/location.rb +++ b/app/models/location.rb @@ -46,7 +46,7 @@ def self.attribute_categories # TODO: map culture: { icon: 'face', - attributes: %w(leaders population language currency motto) + attributes: %w(leaders population language currency motto laws sports) }, cities: { icon: 'business', @@ -54,11 +54,11 @@ def self.attribute_categories }, geography: { icon: 'map', - attributes: %w(area crops located_at) + attributes: %w(area crops located_at climate) }, history: { icon: 'book', - attributes: %w(established_year notable_wars) + attributes: %w(founding_story established_year notable_wars) }, notes: { icon: 'edit', diff --git a/app/models/universe.rb b/app/models/universe.rb index b83305216..e6eb5fb6a 100644 --- a/app/models/universe.rb +++ b/app/models/universe.rb @@ -44,6 +44,10 @@ def self.attribute_categories icon: 'book', attributes: %w(history) }, + rules: { + icon: 'gavel', + attributes: %w(laws_of_physics magic_system technologies) + }, notes: { icon: 'edit', attributes: %w(notes private_notes) diff --git a/app/models/user.rb b/app/models/user.rb index f4278db2d..b719d74be 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -36,7 +36,7 @@ def to_xml(options={}) end def name - self[:name].blank? ? 'Anonymous author' : self[:name] + self[:name].blank? && self.persisted? ? 'Anonymous author' : self[:name] end def content diff --git a/app/views/content/index.html.erb b/app/views/content/index.html.erb index 20b7c4ae9..4127e220e 100644 --- a/app/views/content/index.html.erb +++ b/app/views/content/index.html.erb @@ -8,12 +8,24 @@ <% end %> <% if @content.any? %> -

You've created <%= pluralize(@content.count, content_type) %>

+

+ You've created <%= pluralize(@content.count, content_type) %> + <% if @content.count > 0 %> + + <%= link_to new_polymorphic_path(@content.build), class: "btn white #{content_type_class.color}-text" do %> + + + + <%= content_type_class.icon %> + + <% end %> + + <% end %> +

<%= render partial: 'content/list/list', locals: { content_list: @content } %> <%= link_to "Create another #{content_type}", new_polymorphic_path(@content.build), :class => 'btn' %> <% elsif @content.empty? %> -
+

You haven't created any <%= content_type.pluralize %> yet!

diff --git a/config/locales/en.yml b/config/locales/en.yml index d9aa12736..c80ca56a8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -52,6 +52,7 @@ en: attributes: character: age: How old is %{name}? + aliases: What other aliases does %{name} go by? background: What is %{name}’s background? birthday: When is %{name}’s birthday? #birthplace: Where was %{name} born? @@ -65,12 +66,15 @@ en: fave_food: What is %{name}’s favorite food? fave_possession: What is %{name}’s favorite possession? fave_weapon: What is %{name}’s favorite weapon? + flaws: What flaws does %{name} have? gender: What is %{name}’s gender? haircolor: What color is %{name}’s hair? hairstyle: How does %{name} style their hair? height: How tall is %{name}? + hobbies: What hobbies does %{name} have? identmarks: What identifying marks does %{name} have? mannerisms: What mannerisms does %{name} have? + motivations: What motivates %{name} most? name: What is %{name}’s full name? notes: Do you have any miscellaneous public notes for %{name}? occupation: What is %{name}’s occupation? @@ -82,6 +86,7 @@ en: religion: What religion does %{name} practice? role: What is %{name}’s role in your story? skintone: What skin tone does %{name} have? + talents: What talents does %{name} have? weight: How much does %{name} weigh? item: @@ -102,24 +107,32 @@ en: location: area: What kind of area is %{name} in? #capital: What is %{name}’s capital? + climate: What is the climate like in %{name}? crops: What crops does %{name} produce? currency: What currencies are used in %{name}? established_year: When was %{name} established? + founding_story: How was %{name} founded? language: What languages are spoken in %{name}? #largest_city: What is %{name}’s largest city? + laws: What are the laws in %{name}? located_at: Where is %{name} located? motto: What is %{name}’s motto? #notable_cities: What notable cities are located in %{name}? notable_wars: What notable wars has %{name} been involved in? population: What is %{name}’s population? + sports: What sports are played in %{name}? type_of: What type of location is %{name}? description: Describe %{name}. name: What is %{name}’s full name? notes: Do you have any miscellaneous public notes for %{name}? private_notes: Do you have any private notes for %{name}? + universe: history: What is %{name}’s history? + laws_of_physics: What are the laws of physics like in %{name}? + magic_system: What is the magic system like in %{name}? + technologies: What is the level of technology like in %{name}? blacklist: _: - id diff --git a/db/migrate/20161005111959_add_fields_to_universe.rb b/db/migrate/20161005111959_add_fields_to_universe.rb new file mode 100644 index 000000000..a160bafea --- /dev/null +++ b/db/migrate/20161005111959_add_fields_to_universe.rb @@ -0,0 +1,7 @@ +class AddFieldsToUniverse < ActiveRecord::Migration + def change + add_column :universes, :laws_of_physics, :string + add_column :universes, :magic_system, :string + add_column :universes, :technologies, :string + end +end diff --git a/db/migrate/20161005115303_add_fields_to_character.rb b/db/migrate/20161005115303_add_fields_to_character.rb new file mode 100644 index 000000000..6e0238ce7 --- /dev/null +++ b/db/migrate/20161005115303_add_fields_to_character.rb @@ -0,0 +1,10 @@ +class AddFieldsToCharacter < ActiveRecord::Migration + def change + add_column :characters, :aliases, :string + add_column :characters, :motivations, :string + add_column :characters, :flaws, :string + add_column :characters, :talents, :string + add_column :characters, :hobbies, :string + add_column :characters, :personality_type, :string + end +end diff --git a/db/migrate/20161005120615_add_fields_to_location.rb b/db/migrate/20161005120615_add_fields_to_location.rb new file mode 100644 index 000000000..ea2a3b82a --- /dev/null +++ b/db/migrate/20161005120615_add_fields_to_location.rb @@ -0,0 +1,8 @@ +class AddFieldsToLocation < ActiveRecord::Migration + def change + add_column :locations, :laws, :string + add_column :locations, :climate, :string + add_column :locations, :founding_story, :string + add_column :locations, :sports, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 360c58a5a..bbed3ec8b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,8 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20161003000856) do +ActiveRecord::Schema.define(version: 20161005120615) do + create_table "archenemyships", force: :cascade do |t| t.integer "user_id" t.integer "character_id" @@ -43,7 +44,7 @@ end create_table "characters", force: :cascade do |t| - t.string "name", null: false + t.string "name", null: false t.string "role" t.string "gender" t.string "age" @@ -80,6 +81,12 @@ t.datetime "updated_at" t.string "privacy" t.string "archetype" + t.string "aliases" + t.string "motivations" + t.string "flaws" + t.string "talents" + t.string "hobbies" + t.string "personality_type" end create_table "childrenships", force: :cascade do |t| @@ -161,6 +168,10 @@ t.datetime "created_at" t.datetime "updated_at" t.string "privacy", default: "private", null: false + t.string "laws" + t.string "climate" + t.string "founding_story" + t.string "sports" end create_table "maker_relationships", force: :cascade do |t| @@ -228,7 +239,7 @@ end create_table "universes", force: :cascade do |t| - t.string "name", null: false + t.string "name", null: false t.text "description" t.text "history" t.text "notes" @@ -237,6 +248,9 @@ t.integer "user_id" t.datetime "created_at" t.datetime "updated_at" + t.string "laws_of_physics" + t.string "magic_system" + t.string "technologies" end create_table "users", force: :cascade do |t|