summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavisLWebb <davislwebb@ymail.com>2014-03-02 15:06:54 -0500
committerDavisLWebb <davislwebb@ymail.com>2014-03-02 15:06:54 -0500
commit0d3a1f6030eec5631892ec733ec75001bfe2f9ff (patch)
tree00ad96fd52bcdebc2e96ebb3157e314b2466fc22
parent59b2dc33ea83d5d5a52a72d14213f564afe8f0ce (diff)
parent699bd065c06689a159c11ac3aacef6b34001617c (diff)
Merge branch 'master' of http://github.com/LukeShu/leaguer
Conflicts: Gemfile.lock app/views/layouts/application.html.erb config/routes.rb
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock8
-rw-r--r--app/assets/stylesheets/application.css13
-rw-r--r--app/assets/stylesheets/custom.css.scss1
-rw-r--r--app/assets/stylesheets/scaffolds.css.scss89
-rw-r--r--app/assets/stylesheets/static.css.scss12
-rw-r--r--app/controllers/static_controller.rb4
-rw-r--r--app/views/games/index.html.erb35
-rw-r--r--app/views/layouts/application.html.erb29
-rw-r--r--app/views/static/homepage.html.erb10
-rw-r--r--app/views/tournaments/index.html.erb27
-rw-r--r--app/views/users/new.html.erb27
-rw-r--r--config/routes.rb74
-rw-r--r--doc/.gitignore9
-rw-r--r--doc/DesignDocument-architecture-model2.pptx (renamed from docs/DesignDocument-architecture-model2.pptx)bin63714 -> 63714 bytes
-rw-r--r--doc/DesignDocument-classes.dot (renamed from docs/DesignDocument-classes.dot)0
-rw-r--r--doc/DesignDocument-models.pptx (renamed from docs/DesignDocument-models.pptx)bin34389 -> 34389 bytes
-rw-r--r--doc/DesignDocument.md (renamed from docs/DesignDocument.md)0
-rw-r--r--doc/Diagram01.jpg (renamed from docs/Diagram01.jpg)bin2008078 -> 2008078 bytes
-rw-r--r--doc/Makefile (renamed from docs/Makefile)0
-rw-r--r--doc/ProductBacklog.md (renamed from docs/ProductBacklog.md)0
-rw-r--r--doc/ProjectCharter.md (renamed from docs/ProjectCharter.md)0
-rw-r--r--doc/ProjectLeaguerWorkloadBreakup.md (renamed from docs/ProjectLeaguerWorkloadBreakup.md)0
-rw-r--r--doc/Sprint1.md (renamed from docs/Sprint1.md)0
-rw-r--r--doc/SystemModel.dot (renamed from docs/SystemModel.dot)0
-rw-r--r--doc/stickman.png (renamed from docs/stickman.png)bin1308 -> 1308 bytes
-rw-r--r--docs/.gitignore4
-rwxr-xr-xgenerate.sh1
28 files changed, 339 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 9dd0199..9de990e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -26,7 +26,11 @@ GEM
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
+<<<<<<< HEAD
atomic (1.1.15)
+=======
+ atomic (1.1.14)
+>>>>>>> 699bd065c06689a159c11ac3aacef6b34001617c
bcrypt-ruby (3.1.2)
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
@@ -115,7 +119,11 @@ GEM
multi_json (~> 1.0)
rubyzip (< 1.0.0)
websocket (~> 1.0.4)
+<<<<<<< HEAD
sprockets (2.11.0)
+=======
+ sprockets (2.10.1)
+>>>>>>> 699bd065c06689a159c11ac3aacef6b34001617c
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 3192ec8..355c0d4 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -9,5 +9,16 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
- *= require_tree .
+ *= require_tree
+
*/
+
+#query{
+ background-color: #888;
+ border: 2px solid #ED9C28;
+ border-radius: 5px;
+ color: #FFF;
+ font-weight: bold;
+ height: 30px;
+
+} \ No newline at end of file
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..8279f4f
--- /dev/null
+++ b/app/assets/stylesheets/scaffolds.css.scss
@@ -0,0 +1,89 @@
+body {
+ background-color: #EEEEEE;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+
+ h1, h2, h3, h4, h5{
+ color: #0f0f0f;
+ }
+}
+
+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;
+ }
+}
+
+hr {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ border-color: #999 -moz-use-text-color #FFFFFF;
+ border-style: solid none;
+ border-width: 1px 0;
+ margin: 18px 0;
+}
+
+#footer{
+ text-align: center;
+}
diff --git a/app/assets/stylesheets/static.css.scss b/app/assets/stylesheets/static.css.scss
new file mode 100644
index 0000000..9457e7f
--- /dev/null
+++ b/app/assets/stylesheets/static.css.scss
@@ -0,0 +1,12 @@
+// Place all the styles related to the static controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here:
+
+.jumbotron {
+ background-color: #FFF;
+
+ p {
+ line-height: 1.5em;
+ }
+
+} \ No newline at end of file
diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb
new file mode 100644
index 0000000..6fc9490
--- /dev/null
+++ b/app/controllers/static_controller.rb
@@ -0,0 +1,4 @@
+class StaticController < ApplicationController
+ def homepage
+ end
+end
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
new file mode 100644
index 0000000..0deede3
--- /dev/null
+++ b/app/views/layouts/application.html.erb
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Leaguer</title>
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
+ <%= csrf_meta_tags %>
+</head>
+<body>
+<div role="navigation" class="navbar navbar-inverse">
+<header>
+ <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", {:class => "btn btn-warning"}) %>
+ <% end %>
+ </div>
+</header>
+ </div>
+<%= yield %>
+
+<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>
+
+</body>
+</html>
diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb
new file mode 100644
index 0000000..bca440a
--- /dev/null
+++ b/app/views/static/homepage.html.erb
@@ -0,0 +1,10 @@
+<div role="main" class="container theme-showcase">
+
+ <!-- Main jumbotron for a primary marketing message or call to action -->
+ <div class="jumbotron">
+ <h1>Welcome to Leauger</h1>
+ <p>This is a tournment management system designed to be used for any team sport. Our peer review system ensures that the best players move on to the next round! Try creating a new tournament and having people sign up for it. </p>
+ <p id="jumbo-buttons"><%= link_to 'Log In / Sign Up', "#", :class => "btn btn-warning btn-lg", :role => "button" %> <%= link_to 'See Ongoing Tournaments', tournaments_path, :class => "btn btn-warning btn-lg", :role => "button" %> </p>
+ </div>
+
+ </div> \ No newline at end of file
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/app/views/users/new.html.erb b/app/views/users/new.html.erb
new file mode 100644
index 0000000..418f2e2
--- /dev/null
+++ b/app/views/users/new.html.erb
@@ -0,0 +1,27 @@
+<h1> Sign Up </h1>
+
+<%= form_for :user do |f| %>
+ <p>
+ <%= f.label :name %><br>
+ <%= f.text_field :name %>
+ </p>
+ <p>
+ <%= f.label :email %><br>
+ <%= f.text_field :email %>
+ </p>
+ <p>
+ <%= f.label :user_name %><br>
+ <%= f.text_field :user_name %>
+ </p>
+ <p>
+ <%= f.label :password %><br>
+ <%= f.text_field :password %>
+ </p>
+ <p>
+ <%= f.label :password_confirm %><br>
+ <%= f.text_field :password_confirm %>
+ </p>
+ <p>
+ <%= f.submit %>
+ </p>
+<% end %>
diff --git a/config/routes.rb b/config/routes.rb
new file mode 100644
index 0000000..7d898b8
--- /dev/null
+++ b/config/routes.rb
@@ -0,0 +1,74 @@
+Leaguer::Application.routes.draw do
+ resources :pms
+
+ resources :alerts
+
+ resources :users
+
+ resources :teams
+
+ resources :matches
+
+ resources :tournaments
+
+ resources :servers
+
+ resources :games
+
+ root to: 'static#homepage'
+
+ # The priority is based upon order of creation: first created -> highest priority.
+ # See how all your routes lay out with "rake routes".
+
+ # You can have the root of your site routed with "root"
+ # root 'welcome#index'
+
+ # Example of regular route:
+ # get 'products/:id' => 'catalog#view'
+
+ # Example of named route that can be invoked with purchase_url(id: product.id)
+ # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
+
+ # Example resource route (maps HTTP verbs to controller actions automatically):
+ # resources :products
+
+ # Example resource route with options:
+ # resources :products do
+ # member do
+ # get 'short'
+ # post 'toggle'
+ # end
+ #
+ # collection do
+ # get 'sold'
+ # end
+ # end
+
+ # Example resource route with sub-resources:
+ # resources :products do
+ # resources :comments, :sales
+ # resource :seller
+ # end
+
+ # Example resource route with more complex sub-resources:
+ # resources :products do
+ # resources :comments
+ # resources :sales do
+ # get 'recent', on: :collection
+ # end
+ # end
+
+ # Example resource route with concerns:
+ # concern :toggleable do
+ # post 'toggle'
+ # end
+ # resources :posts, concerns: :toggleable
+ # resources :photos, concerns: :toggleable
+
+ # Example resource route within a namespace:
+ # namespace :admin do
+ # # Directs /admin/products/* to Admin::ProductsController
+ # # (app/controllers/admin/products_controller.rb)
+ # resources :products
+ # end
+end
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..54a1602
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,9 @@
+/api
+/app
+/guides
+
+*.html
+*.pdf
+*.png
+
+!/stickman.png
diff --git a/docs/DesignDocument-architecture-model2.pptx b/doc/DesignDocument-architecture-model2.pptx
index 1a1a08a..1a1a08a 100644
--- a/docs/DesignDocument-architecture-model2.pptx
+++ b/doc/DesignDocument-architecture-model2.pptx
Binary files differ
diff --git a/docs/DesignDocument-classes.dot b/doc/DesignDocument-classes.dot
index cccc477..cccc477 100644
--- a/docs/DesignDocument-classes.dot
+++ b/doc/DesignDocument-classes.dot
diff --git a/docs/DesignDocument-models.pptx b/doc/DesignDocument-models.pptx
index e689a7c..e689a7c 100644
--- a/docs/DesignDocument-models.pptx
+++ b/doc/DesignDocument-models.pptx
Binary files differ
diff --git a/docs/DesignDocument.md b/doc/DesignDocument.md
index 45f6d5f..45f6d5f 100644
--- a/docs/DesignDocument.md
+++ b/doc/DesignDocument.md
diff --git a/docs/Diagram01.jpg b/doc/Diagram01.jpg
index 0c85216..0c85216 100644
--- a/docs/Diagram01.jpg
+++ b/doc/Diagram01.jpg
Binary files differ
diff --git a/docs/Makefile b/doc/Makefile
index 469b1a2..469b1a2 100644
--- a/docs/Makefile
+++ b/doc/Makefile
diff --git a/docs/ProductBacklog.md b/doc/ProductBacklog.md
index 59b5e11..59b5e11 100644
--- a/docs/ProductBacklog.md
+++ b/doc/ProductBacklog.md
diff --git a/docs/ProjectCharter.md b/doc/ProjectCharter.md
index f88ccd4..f88ccd4 100644
--- a/docs/ProjectCharter.md
+++ b/doc/ProjectCharter.md
diff --git a/docs/ProjectLeaguerWorkloadBreakup.md b/doc/ProjectLeaguerWorkloadBreakup.md
index 99d9c2e..99d9c2e 100644
--- a/docs/ProjectLeaguerWorkloadBreakup.md
+++ b/doc/ProjectLeaguerWorkloadBreakup.md
diff --git a/docs/Sprint1.md b/doc/Sprint1.md
index 03baf5d..03baf5d 100644
--- a/docs/Sprint1.md
+++ b/doc/Sprint1.md
diff --git a/docs/SystemModel.dot b/doc/SystemModel.dot
index ea1836a..ea1836a 100644
--- a/docs/SystemModel.dot
+++ b/doc/SystemModel.dot
diff --git a/docs/stickman.png b/doc/stickman.png
index 00f16fc..00f16fc 100644
--- a/docs/stickman.png
+++ b/doc/stickman.png
Binary files differ
diff --git a/docs/.gitignore b/docs/.gitignore
deleted file mode 100644
index ed193ea..0000000
--- a/docs/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.pdf
-*.html
-*.png
-!stickman.png
diff --git a/generate.sh b/generate.sh
index 2bf027a..807b9ef 100755
--- a/generate.sh
+++ b/generate.sh
@@ -28,6 +28,7 @@ bundle exec rails generate model game_attribute game:references key:text type:in
bundle exec rails generate model server_settings $NOTEST
bundle exec rails generate controller search $NOTEST
bundle exec rails generate controller main $NOTEST
+bundle exec rails generate controller static $NOTEST
#for the tournament controller to generate options
bundle exec rails generate model tournament_option $NOTEST