-
-
Notifications
You must be signed in to change notification settings - Fork 108
[WIP] Create grid layout to list all CoderDojo #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e6cf427
Create new widget for grid layout
nanophate dd9996c
Update auto PR generator
nanophate fc3ee6f
Add attribute to enable custom edit
nanophate cba12b1
Add html layout to enable visualization
nanophate 10a6b55
Close #10 enabled stable implement of color
nanophate 0379586
Add database with necessary storage
nanophate f637ae8
Add test for coder dojo model
nanophate 7395a3c
Add test for each col
nanophate 0f36abf
Add test model with limitation
nanophate ac43e0a
Fix spacing issue in coderdojo app/model
nanophate 7c1c02e
Fix conflict with sublime due to unrefreshed session and clean spacaing
nanophate 40b4eeb
Add form to gather informtaion
nanophate 777fbb8
Updated .gitignore file
nanophate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.3.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class CoderDojo < ActiveRecord::Base | ||
validates :name, presence: true, length: { maximum: 50 } | ||
validates :course, presence: true, length: { maximum: 25 } | ||
validates :caption, presence: true, length: { maximum: 60 } | ||
validates :venue, presence: true | ||
validates :region, presence: true | ||
validates :logo_image_url, presence: true | ||
validates :redirect_url, presence: true | ||
validates :user_name, presence: true, length: { maximum: 50 } | ||
validates :email, presence: true, length: { maximum: 255 } | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class CoderDojoListWidget < Widget | ||
attribute :image, :reference | ||
attribute :headline, :html | ||
attribute :tag, :string | ||
attribute :caption, :string | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class FooterWidget < Widget | ||
attribute :headline, :html | ||
attribute :paragraph, :html | ||
attribute :line, :html | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<%= scrivito_medium_dialog do %> | ||
<%= scrivito_details_for CoderDojoListWidget.description_for_editor do %> | ||
<% end %> | ||
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="row"> | ||
<div class="col-1"> | ||
<%= scrivito_image_tag widget, :image, class:'image-responsive center-block clearfix'%> | ||
<%= scrivito_tag :h1, widget, :headline, data: {newlines: false} %> | ||
<%= scrivito_tag :p, widget, :tag, class:'cover-text-white'%> | ||
<%= scrivito_tag :p, widget, :caption, class:'cover-text-white'%> | ||
</div> | ||
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<%= scrivito_thumbnail CoderDojoListWidget.description_for_editor %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<div class="col-12"> | ||
<div class="col-3 cover-bg-blue"> | ||
<%= scrivito_tag :h5, widget, :headline, class:'cover-text-white', style:'padding-top:20px;' %> | ||
<%= scrivito_tag :p, widget, :paragraph, class:'cover-text-white', style:'padding-bottom:60; padding-top:20px;' %> | ||
<%= scrivito_tag :div, widget, :line, class:'cover-text-white', style:'padding-bottom:60; padding-top:20px;' %> | ||
</div> | ||
</div> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class CreateCoderDojos < ActiveRecord::Migration | ||
def change | ||
create_table :coder_dojos do |t| | ||
t.string :name | ||
t.string :course | ||
t.string :caption | ||
t.string :venue | ||
t.integer :region | ||
t.string :logo_image_url | ||
t.string :redirect_url | ||
t.string :user_name | ||
t.string :email | ||
|
||
t.timestamps null: false | ||
end | ||
end | ||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# encoding: UTF-8 | ||
# This file is auto-generated from the current state of the database. Instead | ||
# of editing this file, please use the migrations feature of Active Record to | ||
# incrementally modify your database, and then regenerate this schema definition. | ||
# | ||
# Note that this schema.rb definition is the authoritative source for your | ||
# database schema. If you need to create the application database on another | ||
# system, you should be using db:schema:load, not running all the migrations | ||
# from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
# you'll amass, the slower it'll run and the greater likelihood for issues). | ||
# | ||
# It's strongly recommended that you check this file into your version control system. | ||
|
||
ActiveRecord::Schema.define(version: 20160606065215) do | ||
|
||
create_table "coder_dojos", force: :cascade do |t| | ||
t.string "name" | ||
t.string "course" | ||
t.string "caption" | ||
t.string "venue" | ||
t.integer "region" | ||
t.string "logo_image_url" | ||
t.string "redirect_url" | ||
t.string "user_name" | ||
t.string "email" | ||
t.datetime "created_at", null: false | ||
t.datetime "updated_at", null: false | ||
end | ||
|
||
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html | ||
|
||
one: | ||
name: MyString | ||
course: MyString | ||
caption: MyString | ||
venue: MyString | ||
region: 1 | ||
logo_image_url: MyString | ||
redirect_url: MyString | ||
user_name: MyString | ||
email: MyString | ||
|
||
two: | ||
name: MyString | ||
course: MyString | ||
caption: MyString | ||
venue: MyString | ||
region: 1 | ||
logo_image_url: MyString | ||
redirect_url: MyString | ||
user_name: MyString | ||
email: MyString |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
require 'test_helper' | ||
|
||
class CoderDojoTest < ActiveSupport::TestCase | ||
def setup | ||
@dojo = CoderDojo.new(name: "Example User", | ||
course: "scratch", | ||
caption: "Weekly Event", | ||
venue: "okinawa", | ||
region: '47', | ||
logo_image_url: "https://www.example.com/logo.png", | ||
redirect_url: "https://www.facebook.com", | ||
user_name: "example", | ||
email: "user@example.com") | ||
end | ||
|
||
test "should be valid" do | ||
assert @dojo.valid? | ||
end | ||
|
||
test "name should be present" do | ||
@dojo.name = "c" * 51 | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "course should be present" do | ||
@dojo.course = "c" * 244 + "@example.com" | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "caption should be present" do | ||
@dojo.caption = "c " * 60 | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "venue should be present" do | ||
@dojo.venue = " " | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "region should be present" do | ||
@dojo.region = ' ' | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "logo should be present" do | ||
@dojo.logo_image_url = " " | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "dojo url should be present" do | ||
@dojo.redirect_url = " " | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "user name should be present" do | ||
@dojo.user_name = "c" * 51 | ||
assert_not @dojo.valid? | ||
end | ||
|
||
test "user email should be present" do | ||
@dojo.email = "c" * 244 + "@example.com" | ||
assert_not @dojo.valid? | ||
end | ||
|
||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scrivitoに直接データを取っているので、自分のdbにアクセスして取得できるようにしたい。