summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-01 23:49:38 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-01 23:49:38 -0500
commit5e11b5212272613367193f90a0a211f4fa08b2af (patch)
treeb6e19db560241ed3422f150d81877691b1c52159
parent6afb9ac595b025b06c7664e600aa3781c217651f (diff)
parentc1f3f731cdf3201905fd8797dd4fe33783f2bc53 (diff)
Merge branch 'master' of github.com:LukeShu/leager
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock38
-rw-r--r--app/assets/stylesheets/custom.css.scss1
-rw-r--r--app/assets/stylesheets/scaffolds.css.scss78
-rw-r--r--app/views/games/index.html.erb35
-rw-r--r--app/views/layouts/application.html.erb14
-rw-r--r--app/views/tournaments/index.html.erb27
-rw-r--r--config/routes.rb4
8 files changed, 193 insertions, 6 deletions
diff --git a/Gemfile b/Gemfile
index cc95938..cb3d6f6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,7 +3,6 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
-gem 'bootstrap-sass'
# bcrypt is used for password digesting
gem 'bcrypt-ruby', '3.1.2'
@@ -23,6 +22,7 @@ end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
+gem 'bootstrap-sass'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 75d27b8..b47c41e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -27,9 +27,18 @@ GEM
tzinfo (~> 0.3.37)
arel (4.0.2)
atomic (1.1.14)
+ bcrypt-ruby (3.1.2)
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
builder (3.1.4)
+ capybara (2.1.0)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ xpath (~> 2.0)
+ childprocess (0.5.1)
+ ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -37,8 +46,10 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.7.0)
+ diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.0.2)
+ ffi (1.9.3)
hike (1.2.3)
i18n (0.6.9)
jbuilder (1.5.3)
@@ -53,8 +64,11 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
+ mini_portile (0.5.2)
minitest (4.7.5)
multi_json (1.8.4)
+ nokogiri (1.6.1)
+ mini_portile (~> 0.5.0)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
@@ -76,6 +90,18 @@ GEM
rdoc (4.1.1)
json (~> 1.4)
ref (1.0.5)
+ rspec-core (2.13.1)
+ rspec-expectations (2.13.0)
+ diff-lcs (>= 1.1.3, < 2.0)
+ rspec-mocks (2.13.1)
+ rspec-rails (2.13.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec-core (~> 2.13.0)
+ rspec-expectations (~> 2.13.0)
+ rspec-mocks (~> 2.13.0)
+ rubyzip (0.9.9)
sass (3.2.14)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
@@ -84,6 +110,11 @@ GEM
sdoc (0.4.0)
json (~> 1.8)
rdoc (~> 4.0, < 5.0)
+ selenium-webdriver (2.35.1)
+ childprocess (>= 0.2.5)
+ multi_json (~> 1.0)
+ rubyzip (< 1.0.0)
+ websocket (~> 1.0.4)
sprockets (2.10.1)
hike (~> 1.2)
multi_json (~> 1.0)
@@ -110,18 +141,25 @@ GEM
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
+ websocket (1.0.7)
+ xpath (2.0.0)
+ nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
+ bcrypt-ruby (= 3.1.2)
bootstrap-sass
+ capybara (= 2.1.0)
coffee-rails (~> 4.0.0)
jbuilder (~> 1.2)
jquery-rails
rails (= 4.0.2)
+ rspec-rails (= 2.13.1)
sass-rails (~> 4.0.0)
sdoc
+ selenium-webdriver (= 2.35.1)
sqlite3
therubyracer
turbolinks
diff --git a/app/assets/stylesheets/custom.css.scss b/app/assets/stylesheets/custom.css.scss
new file mode 100644
index 0000000..b0692d8
--- /dev/null
+++ b/app/assets/stylesheets/custom.css.scss
@@ -0,0 +1 @@
+@import "bootstrap"; \ No newline at end of file
diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss
new file mode 100644
index 0000000..7561529
--- /dev/null
+++ b/app/assets/stylesheets/scaffolds.css.scss
@@ -0,0 +1,78 @@
+body {
+ background-color: #909090;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+
+ h1, h2, h3, h4, h5{
+ color: #F0F0F0;
+ }
+}
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px;
+}
+
+a {
+ color: #000;
+ &:visited {
+ color: #666;
+ }
+ &:hover {
+ color: #fff;
+ background-color: #000;
+ }
+}
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px;
+ }
+}
+
+#notice {
+ color: green;
+}
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table;
+}
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff;
+ }
+ ul li {
+ font-size: 12px;
+ list-style: square;
+ }
+}
+
+
+#footer{
+ text-align: center;
+}
diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb
new file mode 100644
index 0000000..2c178f5
--- /dev/null
+++ b/app/views/games/index.html.erb
@@ -0,0 +1,35 @@
+<h1>Listing games</h1>
+
+<table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Players per team</th>
+ <th>Teams per match</th>
+ <th>Set rounds</th>
+ <th>Randomized teams</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @games.each do |game| %>
+ <tr>
+ <td><%= game.name %></td>
+ <td><%= game.players_per_team %></td>
+ <td><%= game.teams_per_match %></td>
+ <td><%= game.set_rounds %></td>
+ <td><%= game.randomized_teams %></td>
+ <td><%= link_to 'Show', game %></td>
+ <td><%= link_to 'Edit', edit_game_path(game) %></td>
+ <td><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index e2b8e02..0deede3 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -7,17 +7,21 @@
<%= csrf_meta_tags %>
</head>
<body>
+<div role="navigation" class="navbar navbar-inverse">
<header>
- <h1 id="logo"> Leaguer </h1>
- <%= form_tag("/search", method: "get", :id => "search-bar") do %>
+ <div class="navbar-brand"> Leaguer </div>
+ <div>
+ <%= form_tag("/search", method: "get", :class => "navbar-form navbar-right") do %>
<%= text_field_tag(:query, nil, :placeholder => "Search") %>
- <%= submit_tag("Go") %>
+ <%= submit_tag("Go", {:class => "btn btn-warning"}) %>
<% end %>
+ </div>
</header>
-
+ </div>
<%= yield %>
-<footer >
+<hr>
+<footer id="footer">
<p> Tomer Kimia Andrew Murrell Luke Shumaker Nathaniel Foy Davis Webb Guntas Grewal </p>
<p> The Leaguer System &#169; <%= Time.now.year %> </p> </footer>
diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb
new file mode 100644
index 0000000..8ab3c15
--- /dev/null
+++ b/app/views/tournaments/index.html.erb
@@ -0,0 +1,27 @@
+<h1>Listing tournaments</h1>
+
+<table class="table table-hover">
+ <thead>
+ <tr>
+ <th>Game</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+
+ <tbody>
+ <% @tournaments.each do |tournament| %>
+ <tr>
+ <td><%= %></td>
+ <td><%= link_to 'Show', tournament %></td>
+ <td><%= link_to 'Edit', edit_tournament_path(tournament) %></td>
+ <td><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+ <% end %>
+ </tbody>
+</table>
+
+<br>
+
+<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning" %>
diff --git a/config/routes.rb b/config/routes.rb
index f13c891..3c49858 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -13,6 +13,10 @@ Leaguer::Application.routes.draw do
resources :servers
+ resources :games
+
+ root "tournaments#index"
+
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".