Skip to content

Commit

Permalink
Merge pull request #111 from indentlabs/user-feedback
Browse files Browse the repository at this point in the history
User feedback
  • Loading branch information
drusepth authored Oct 5, 2016
2 parents 0322e67 + 9ddcb31 commit 18e54e4
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 24 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 3 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
5 changes: 3 additions & 2 deletions app/controllers/characters_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
5 changes: 3 additions & 2 deletions app/controllers/locations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions app/controllers/universes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def content_param_list
[
:user_id,
:name, :description,
:laws_of_physics, :magic_system, :technologies,
:history,
:privacy,
:notes, :private_notes
Expand Down
15 changes: 7 additions & 8 deletions app/models/character.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
6 changes: 3 additions & 3 deletions app/models/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ 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',
attributes: %w(capital_cities largest_cities notable_cities)
},
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',
Expand Down
4 changes: 4 additions & 0 deletions app/models/universe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions app/views/content/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@
<% end %>
<% if @content.any? %>
<h4>You've created <%= pluralize(@content.count, content_type) %></h4>
<h4>
You've created <%= pluralize(@content.count, content_type) %>
<% if @content.count > 0 %>
<small class="right">
<%= link_to new_polymorphic_path(@content.build), class: "btn white #{content_type_class.color}-text" do %>
+
<i class="material-icons <%= content_type_class.color %>-text">
<%= content_type_class.icon %>
</i>
<% end %>
</small>
<% end %>
</h4>
<%= 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? %>
<div class="center">
<div class="center" style="margin-bottom: 50px;">
<h4>You haven't created any <%= content_type.pluralize %> yet!</h4>
<h1>
<i class="material-icons <%= content_type_class.color %>-text" style="font-size: 200%">
Expand Down
13 changes: 13 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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?
Expand All @@ -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:
Expand All @@ -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
Expand Down
7 changes: 7 additions & 0 deletions db/migrate/20161005111959_add_fields_to_universe.rb
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions db/migrate/20161005115303_add_fields_to_character.rb
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions db/migrate/20161005120615_add_fields_to_location.rb
Original file line number Diff line number Diff line change
@@ -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
20 changes: 17 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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|
Expand Down Expand Up @@ -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|
Expand Down Expand Up @@ -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"
Expand All @@ -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|
Expand Down

0 comments on commit 18e54e4

Please sign in to comment.