Skip to content

Commit

Permalink
Merge pull request #7072 from code-dot-org/add-level-notes-to-levelbu…
Browse files Browse the repository at this point in the history
…ilder

add notes column to levels table
  • Loading branch information
Hamms committed Mar 3, 2016
2 parents 51c178b + 35a4a0a commit 660c8e5
Show file tree
Hide file tree
Showing 31 changed files with 42 additions and 1 deletion.
1 change: 1 addition & 0 deletions dashboard/app/controllers/levels_controller.rb
Expand Up @@ -228,6 +228,7 @@ def set_level
def level_params
permitted_params = [
:name,
:notes,
:type,
:level_num,
:user,
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/applab.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/artist.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/blockly.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/calc.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/contract_match.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/craft.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/dsl_defined.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/eval.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/external.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/frequency_analysis.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/gamelab.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/grid.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/karel.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/level.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/match.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/maze.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/multi.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/net_sim.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/odometer.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/pixelation.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/studio.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/studio_ec.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/text_compression.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/text_match.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/unplugged.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/vigenere.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
1 change: 1 addition & 0 deletions dashboard/app/models/widget.rb
Expand Up @@ -15,6 +15,7 @@
# type :string(255)
# md5 :string(255)
# published :boolean default(FALSE), not null
# notes :text(65535)
#
# Indexes
#
Expand Down
7 changes: 7 additions & 0 deletions dashboard/app/views/levels/editors/_all.html.haml
Expand Up @@ -4,6 +4,13 @@
= javascript_include_tag 'js/levelbuilder'
= javascript_include_tag 'jquery.handsontable.full'

- unless @level.is_a? DSLDefined
.field
= f.label 'notes'
%p
Notes for yourself or other Levelbuilders. Viewable here and here alone.
= f.text_area :notes, rows: 6, class: "input-block-level"

.field
= f.label 'concepts'
%p
Expand Down
5 changes: 5 additions & 0 deletions dashboard/db/migrate/20160301213220_add_notes_to_levels.rb
@@ -0,0 +1,5 @@
class AddNotesToLevels < ActiveRecord::Migration
def change
add_column :levels, :notes, :text
end
end
3 changes: 2 additions & 1 deletion dashboard/db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160225192540) do
ActiveRecord::Schema.define(version: 20160301213220) do

create_table "activities", force: :cascade do |t|
t.integer "user_id", limit: 4
Expand Down Expand Up @@ -283,6 +283,7 @@
t.string "type", limit: 255
t.string "md5", limit: 255
t.boolean "published", default: false, null: false
t.text "notes", limit: 65535
end

add_index "levels", ["game_id"], name: "index_levels_on_game_id", using: :btree
Expand Down

0 comments on commit 660c8e5

Please sign in to comment.