From eaf3d3cddf418c560c9619f722ea1dbc5d6cc61a Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Sun, 2 Mar 2014 15:59:50 -0500 Subject: currently adding Session controller and view --- app/assets/javascripts/alerts.js.coffee | 3 ++ app/assets/javascripts/games.js.coffee | 3 ++ app/assets/javascripts/main.js.coffee | 3 ++ app/assets/javascripts/matches.js.coffee | 3 ++ app/assets/javascripts/pms.js.coffee | 3 ++ app/assets/javascripts/search.js.coffee | 3 ++ app/assets/javascripts/servers.js.coffee | 3 ++ app/assets/javascripts/sessions.js.coffee | 3 ++ app/assets/javascripts/static.js.coffee | 3 ++ app/assets/javascripts/teams.js.coffee | 3 ++ app/assets/javascripts/tournaments.js.coffee | 3 ++ app/assets/javascripts/users.js.coffee | 3 ++ app/assets/stylesheets/alerts.css.scss | 3 ++ app/assets/stylesheets/games.css.scss | 3 ++ app/assets/stylesheets/main.css.scss | 3 ++ app/assets/stylesheets/matches.css.scss | 3 ++ app/assets/stylesheets/pms.css.scss | 3 ++ app/assets/stylesheets/scaffolds.css.scss | 69 ++++++++++++++++++++++++++ app/assets/stylesheets/search.css.scss | 3 ++ app/assets/stylesheets/servers.css.scss | 3 ++ app/assets/stylesheets/sessions.css.scss | 3 ++ app/assets/stylesheets/static.css.scss | 3 ++ app/assets/stylesheets/teams.css.scss | 3 ++ app/assets/stylesheets/tournaments.css.scss | 3 ++ app/assets/stylesheets/users.css.scss | 3 ++ app/controllers/alerts_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/games_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/main_controller.rb | 2 + app/controllers/matches_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/pms_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/search_controller.rb | 2 + app/controllers/servers_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/sessions_controller.rb | 2 + app/controllers/static_controller.rb | 2 + app/controllers/teams_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/tournaments_controller.rb | 74 ++++++++++++++++++++++++++++ app/controllers/users_controller.rb | 2 + app/helpers/alerts_helper.rb | 2 + app/helpers/games_helper.rb | 2 + app/helpers/main_helper.rb | 2 + app/helpers/matches_helper.rb | 2 + app/helpers/pms_helper.rb | 2 + app/helpers/search_helper.rb | 2 + app/helpers/servers_helper.rb | 2 + app/helpers/sessions_helper.rb | 2 + app/helpers/static_helper.rb | 2 + app/helpers/teams_helper.rb | 2 + app/helpers/tournaments_helper.rb | 2 + app/helpers/users_helper.rb | 2 + app/models/alert.rb | 3 ++ app/models/game.rb | 2 + app/models/game_attribute.rb | 3 ++ app/models/match.rb | 3 ++ app/models/pm.rb | 4 ++ app/models/server.rb | 2 + app/models/server_settings.rb | 2 + app/models/team.rb | 2 + app/models/team_match_pair.rb | 4 ++ app/models/tournament.rb | 3 ++ app/models/tournament_option.rb | 2 + app/models/user.rb | 2 + app/models/user_team_pair.rb | 4 ++ app/views/alerts/_form.html.erb | 25 ++++++++++ app/views/alerts/edit.html.erb | 6 +++ app/views/alerts/index.html.erb | 29 +++++++++++ app/views/alerts/index.json.jbuilder | 4 ++ app/views/alerts/new.html.erb | 5 ++ app/views/alerts/show.html.erb | 14 ++++++ app/views/alerts/show.json.jbuilder | 1 + app/views/games/_form.html.erb | 37 ++++++++++++++ app/views/games/edit.html.erb | 6 +++ app/views/games/index.html.erb | 35 +++++++++++++ app/views/games/index.json.jbuilder | 4 ++ app/views/games/new.html.erb | 5 ++ app/views/games/show.html.erb | 29 +++++++++++ app/views/games/show.json.jbuilder | 1 + app/views/matches/_form.html.erb | 21 ++++++++ app/views/matches/edit.html.erb | 6 +++ app/views/matches/index.html.erb | 27 ++++++++++ app/views/matches/index.json.jbuilder | 4 ++ app/views/matches/new.html.erb | 5 ++ app/views/matches/show.html.erb | 9 ++++ app/views/matches/show.json.jbuilder | 1 + app/views/pms/_form.html.erb | 29 +++++++++++ app/views/pms/edit.html.erb | 6 +++ app/views/pms/index.html.erb | 31 ++++++++++++ app/views/pms/index.json.jbuilder | 4 ++ app/views/pms/new.html.erb | 5 ++ app/views/pms/show.html.erb | 19 +++++++ app/views/pms/show.json.jbuilder | 1 + app/views/servers/_form.html.erb | 17 +++++++ app/views/servers/edit.html.erb | 6 +++ app/views/servers/index.html.erb | 25 ++++++++++ app/views/servers/index.json.jbuilder | 4 ++ app/views/servers/new.html.erb | 5 ++ app/views/servers/show.html.erb | 4 ++ app/views/servers/show.json.jbuilder | 1 + app/views/teams/_form.html.erb | 17 +++++++ app/views/teams/edit.html.erb | 6 +++ app/views/teams/index.html.erb | 25 ++++++++++ app/views/teams/index.json.jbuilder | 4 ++ app/views/teams/new.html.erb | 5 ++ app/views/teams/show.html.erb | 4 ++ app/views/teams/show.json.jbuilder | 1 + app/views/tournaments/_form.html.erb | 21 ++++++++ app/views/tournaments/edit.html.erb | 6 +++ app/views/tournaments/index.html.erb | 27 ++++++++++ app/views/tournaments/index.json.jbuilder | 4 ++ app/views/tournaments/new.html.erb | 5 ++ app/views/tournaments/show.html.erb | 9 ++++ app/views/tournaments/show.json.jbuilder | 1 + 111 files changed, 1295 insertions(+) create mode 100644 app/assets/javascripts/alerts.js.coffee create mode 100644 app/assets/javascripts/games.js.coffee create mode 100644 app/assets/javascripts/main.js.coffee create mode 100644 app/assets/javascripts/matches.js.coffee create mode 100644 app/assets/javascripts/pms.js.coffee create mode 100644 app/assets/javascripts/search.js.coffee create mode 100644 app/assets/javascripts/servers.js.coffee create mode 100644 app/assets/javascripts/sessions.js.coffee create mode 100644 app/assets/javascripts/static.js.coffee create mode 100644 app/assets/javascripts/teams.js.coffee create mode 100644 app/assets/javascripts/tournaments.js.coffee create mode 100644 app/assets/javascripts/users.js.coffee create mode 100644 app/assets/stylesheets/alerts.css.scss create mode 100644 app/assets/stylesheets/games.css.scss create mode 100644 app/assets/stylesheets/main.css.scss create mode 100644 app/assets/stylesheets/matches.css.scss create mode 100644 app/assets/stylesheets/pms.css.scss create mode 100644 app/assets/stylesheets/scaffolds.css.scss create mode 100644 app/assets/stylesheets/search.css.scss create mode 100644 app/assets/stylesheets/servers.css.scss create mode 100644 app/assets/stylesheets/sessions.css.scss create mode 100644 app/assets/stylesheets/static.css.scss create mode 100644 app/assets/stylesheets/teams.css.scss create mode 100644 app/assets/stylesheets/tournaments.css.scss create mode 100644 app/assets/stylesheets/users.css.scss create mode 100644 app/controllers/alerts_controller.rb create mode 100644 app/controllers/games_controller.rb create mode 100644 app/controllers/main_controller.rb create mode 100644 app/controllers/matches_controller.rb create mode 100644 app/controllers/pms_controller.rb create mode 100644 app/controllers/search_controller.rb create mode 100644 app/controllers/servers_controller.rb create mode 100644 app/controllers/sessions_controller.rb create mode 100644 app/controllers/static_controller.rb create mode 100644 app/controllers/teams_controller.rb create mode 100644 app/controllers/tournaments_controller.rb create mode 100644 app/controllers/users_controller.rb create mode 100644 app/helpers/alerts_helper.rb create mode 100644 app/helpers/games_helper.rb create mode 100644 app/helpers/main_helper.rb create mode 100644 app/helpers/matches_helper.rb create mode 100644 app/helpers/pms_helper.rb create mode 100644 app/helpers/search_helper.rb create mode 100644 app/helpers/servers_helper.rb create mode 100644 app/helpers/sessions_helper.rb create mode 100644 app/helpers/static_helper.rb create mode 100644 app/helpers/teams_helper.rb create mode 100644 app/helpers/tournaments_helper.rb create mode 100644 app/helpers/users_helper.rb create mode 100644 app/models/alert.rb create mode 100644 app/models/game.rb create mode 100644 app/models/game_attribute.rb create mode 100644 app/models/match.rb create mode 100644 app/models/pm.rb create mode 100644 app/models/server.rb create mode 100644 app/models/server_settings.rb create mode 100644 app/models/team.rb create mode 100644 app/models/team_match_pair.rb create mode 100644 app/models/tournament.rb create mode 100644 app/models/tournament_option.rb create mode 100644 app/models/user.rb create mode 100644 app/models/user_team_pair.rb create mode 100644 app/views/alerts/_form.html.erb create mode 100644 app/views/alerts/edit.html.erb create mode 100644 app/views/alerts/index.html.erb create mode 100644 app/views/alerts/index.json.jbuilder create mode 100644 app/views/alerts/new.html.erb create mode 100644 app/views/alerts/show.html.erb create mode 100644 app/views/alerts/show.json.jbuilder create mode 100644 app/views/games/_form.html.erb create mode 100644 app/views/games/edit.html.erb create mode 100644 app/views/games/index.html.erb create mode 100644 app/views/games/index.json.jbuilder create mode 100644 app/views/games/new.html.erb create mode 100644 app/views/games/show.html.erb create mode 100644 app/views/games/show.json.jbuilder create mode 100644 app/views/matches/_form.html.erb create mode 100644 app/views/matches/edit.html.erb create mode 100644 app/views/matches/index.html.erb create mode 100644 app/views/matches/index.json.jbuilder create mode 100644 app/views/matches/new.html.erb create mode 100644 app/views/matches/show.html.erb create mode 100644 app/views/matches/show.json.jbuilder create mode 100644 app/views/pms/_form.html.erb create mode 100644 app/views/pms/edit.html.erb create mode 100644 app/views/pms/index.html.erb create mode 100644 app/views/pms/index.json.jbuilder create mode 100644 app/views/pms/new.html.erb create mode 100644 app/views/pms/show.html.erb create mode 100644 app/views/pms/show.json.jbuilder create mode 100644 app/views/servers/_form.html.erb create mode 100644 app/views/servers/edit.html.erb create mode 100644 app/views/servers/index.html.erb create mode 100644 app/views/servers/index.json.jbuilder create mode 100644 app/views/servers/new.html.erb create mode 100644 app/views/servers/show.html.erb create mode 100644 app/views/servers/show.json.jbuilder create mode 100644 app/views/teams/_form.html.erb create mode 100644 app/views/teams/edit.html.erb create mode 100644 app/views/teams/index.html.erb create mode 100644 app/views/teams/index.json.jbuilder create mode 100644 app/views/teams/new.html.erb create mode 100644 app/views/teams/show.html.erb create mode 100644 app/views/teams/show.json.jbuilder create mode 100644 app/views/tournaments/_form.html.erb create mode 100644 app/views/tournaments/edit.html.erb create mode 100644 app/views/tournaments/index.html.erb create mode 100644 app/views/tournaments/index.json.jbuilder create mode 100644 app/views/tournaments/new.html.erb create mode 100644 app/views/tournaments/show.html.erb create mode 100644 app/views/tournaments/show.json.jbuilder (limited to 'app') diff --git a/app/assets/javascripts/alerts.js.coffee b/app/assets/javascripts/alerts.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/alerts.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/games.js.coffee b/app/assets/javascripts/games.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/games.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/main.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/matches.js.coffee b/app/assets/javascripts/matches.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/matches.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/pms.js.coffee b/app/assets/javascripts/pms.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/pms.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/search.js.coffee b/app/assets/javascripts/search.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/search.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/servers.js.coffee b/app/assets/javascripts/servers.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/servers.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/sessions.js.coffee b/app/assets/javascripts/sessions.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/sessions.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/static.js.coffee b/app/assets/javascripts/static.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/static.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/teams.js.coffee b/app/assets/javascripts/teams.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/teams.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/tournaments.js.coffee b/app/assets/javascripts/tournaments.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/tournaments.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/javascripts/users.js.coffee b/app/assets/javascripts/users.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/users.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/alerts.css.scss b/app/assets/stylesheets/alerts.css.scss new file mode 100644 index 0000000..c01a620 --- /dev/null +++ b/app/assets/stylesheets/alerts.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the alerts controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/games.css.scss b/app/assets/stylesheets/games.css.scss new file mode 100644 index 0000000..db1b7bc --- /dev/null +++ b/app/assets/stylesheets/games.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the games controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/main.css.scss b/app/assets/stylesheets/main.css.scss new file mode 100644 index 0000000..a0d94c1 --- /dev/null +++ b/app/assets/stylesheets/main.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the main controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/matches.css.scss b/app/assets/stylesheets/matches.css.scss new file mode 100644 index 0000000..4c396e3 --- /dev/null +++ b/app/assets/stylesheets/matches.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the matches controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/pms.css.scss b/app/assets/stylesheets/pms.css.scss new file mode 100644 index 0000000..5106093 --- /dev/null +++ b/app/assets/stylesheets/pms.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the pms controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss new file mode 100644 index 0000000..6ec6a8f --- /dev/null +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -0,0 +1,69 @@ +body { + background-color: #fff; + color: #333; + font-family: verdana, arial, helvetica, sans-serif; + font-size: 13px; + line-height: 18px; +} + +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; + } +} diff --git a/app/assets/stylesheets/search.css.scss b/app/assets/stylesheets/search.css.scss new file mode 100644 index 0000000..22fd394 --- /dev/null +++ b/app/assets/stylesheets/search.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the search controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/servers.css.scss b/app/assets/stylesheets/servers.css.scss new file mode 100644 index 0000000..4710386 --- /dev/null +++ b/app/assets/stylesheets/servers.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the servers controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/sessions.css.scss b/app/assets/stylesheets/sessions.css.scss new file mode 100644 index 0000000..ccb1ed2 --- /dev/null +++ b/app/assets/stylesheets/sessions.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Sessions controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/static.css.scss b/app/assets/stylesheets/static.css.scss new file mode 100644 index 0000000..5a803c8 --- /dev/null +++ b/app/assets/stylesheets/static.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the static controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/teams.css.scss b/app/assets/stylesheets/teams.css.scss new file mode 100644 index 0000000..320d00d --- /dev/null +++ b/app/assets/stylesheets/teams.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the teams controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/tournaments.css.scss b/app/assets/stylesheets/tournaments.css.scss new file mode 100644 index 0000000..e372b90 --- /dev/null +++ b/app/assets/stylesheets/tournaments.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the tournaments controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/assets/stylesheets/users.css.scss b/app/assets/stylesheets/users.css.scss new file mode 100644 index 0000000..1efc835 --- /dev/null +++ b/app/assets/stylesheets/users.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the users controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb new file mode 100644 index 0000000..873e9b7 --- /dev/null +++ b/app/controllers/alerts_controller.rb @@ -0,0 +1,74 @@ +class AlertsController < ApplicationController + before_action :set_alert, only: [:show, :edit, :update, :destroy] + + # GET /alerts + # GET /alerts.json + def index + @alerts = Alert.all + end + + # GET /alerts/1 + # GET /alerts/1.json + def show + end + + # GET /alerts/new + def new + @alert = Alert.new + end + + # GET /alerts/1/edit + def edit + end + + # POST /alerts + # POST /alerts.json + def create + @alert = Alert.new(alert_params) + + respond_to do |format| + if @alert.save + format.html { redirect_to @alert, notice: 'Alert was successfully created.' } + format.json { render action: 'show', status: :created, location: @alert } + else + format.html { render action: 'new' } + format.json { render json: @alert.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /alerts/1 + # PATCH/PUT /alerts/1.json + def update + respond_to do |format| + if @alert.update(alert_params) + format.html { redirect_to @alert, notice: 'Alert was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @alert.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /alerts/1 + # DELETE /alerts/1.json + def destroy + @alert.destroy + respond_to do |format| + format.html { redirect_to alerts_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_alert + @alert = Alert.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def alert_params + params.require(:alert).permit(:author_id, :message) + end +end diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb new file mode 100644 index 0000000..4ecff17 --- /dev/null +++ b/app/controllers/games_controller.rb @@ -0,0 +1,74 @@ +class GamesController < ApplicationController + before_action :set_game, only: [:show, :edit, :update, :destroy] + + # GET /games + # GET /games.json + def index + @games = Game.all + end + + # GET /games/1 + # GET /games/1.json + def show + end + + # GET /games/new + def new + @game = Game.new + end + + # GET /games/1/edit + def edit + end + + # POST /games + # POST /games.json + def create + @game = Game.new(game_params) + + respond_to do |format| + if @game.save + format.html { redirect_to @game, notice: 'Game was successfully created.' } + format.json { render action: 'show', status: :created, location: @game } + else + format.html { render action: 'new' } + format.json { render json: @game.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /games/1 + # PATCH/PUT /games/1.json + def update + respond_to do |format| + if @game.update(game_params) + format.html { redirect_to @game, notice: 'Game was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @game.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /games/1 + # DELETE /games/1.json + def destroy + @game.destroy + respond_to do |format| + format.html { redirect_to games_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_game + @game = Game.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def game_params + params.require(:game).permit(:name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams) + end +end diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb new file mode 100644 index 0000000..6519d7b --- /dev/null +++ b/app/controllers/main_controller.rb @@ -0,0 +1,2 @@ +class MainController < ApplicationController +end diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb new file mode 100644 index 0000000..e9f3c5a --- /dev/null +++ b/app/controllers/matches_controller.rb @@ -0,0 +1,74 @@ +class MatchesController < ApplicationController + before_action :set_match, only: [:show, :edit, :update, :destroy] + + # GET /matches + # GET /matches.json + def index + @matches = Match.all + end + + # GET /matches/1 + # GET /matches/1.json + def show + end + + # GET /matches/new + def new + @match = Match.new + end + + # GET /matches/1/edit + def edit + end + + # POST /matches + # POST /matches.json + def create + @match = Match.new(match_params) + + respond_to do |format| + if @match.save + format.html { redirect_to @match, notice: 'Match was successfully created.' } + format.json { render action: 'show', status: :created, location: @match } + else + format.html { render action: 'new' } + format.json { render json: @match.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /matches/1 + # PATCH/PUT /matches/1.json + def update + respond_to do |format| + if @match.update(match_params) + format.html { redirect_to @match, notice: 'Match was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @match.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /matches/1 + # DELETE /matches/1.json + def destroy + @match.destroy + respond_to do |format| + format.html { redirect_to matches_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_match + @match = Match.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def match_params + params.require(:match).permit(:tournament_id) + end +end diff --git a/app/controllers/pms_controller.rb b/app/controllers/pms_controller.rb new file mode 100644 index 0000000..5dd0d69 --- /dev/null +++ b/app/controllers/pms_controller.rb @@ -0,0 +1,74 @@ +class PmsController < ApplicationController + before_action :set_pm, only: [:show, :edit, :update, :destroy] + + # GET /pms + # GET /pms.json + def index + @pms = Pm.all + end + + # GET /pms/1 + # GET /pms/1.json + def show + end + + # GET /pms/new + def new + @pm = Pm.new + end + + # GET /pms/1/edit + def edit + end + + # POST /pms + # POST /pms.json + def create + @pm = Pm.new(pm_params) + + respond_to do |format| + if @pm.save + format.html { redirect_to @pm, notice: 'Pm was successfully created.' } + format.json { render action: 'show', status: :created, location: @pm } + else + format.html { render action: 'new' } + format.json { render json: @pm.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /pms/1 + # PATCH/PUT /pms/1.json + def update + respond_to do |format| + if @pm.update(pm_params) + format.html { redirect_to @pm, notice: 'Pm was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @pm.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /pms/1 + # DELETE /pms/1.json + def destroy + @pm.destroy + respond_to do |format| + format.html { redirect_to pms_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_pm + @pm = Pm.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def pm_params + params.require(:pm).permit(:author_id, :recipient_id, :message) + end +end diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb new file mode 100644 index 0000000..ee61487 --- /dev/null +++ b/app/controllers/search_controller.rb @@ -0,0 +1,2 @@ +class SearchController < ApplicationController +end diff --git a/app/controllers/servers_controller.rb b/app/controllers/servers_controller.rb new file mode 100644 index 0000000..7d54eb6 --- /dev/null +++ b/app/controllers/servers_controller.rb @@ -0,0 +1,74 @@ +class ServersController < ApplicationController + before_action :set_server, only: [:show, :edit, :update, :destroy] + + # GET /servers + # GET /servers.json + def index + @servers = Server.all + end + + # GET /servers/1 + # GET /servers/1.json + def show + end + + # GET /servers/new + def new + @server = Server.new + end + + # GET /servers/1/edit + def edit + end + + # POST /servers + # POST /servers.json + def create + @server = Server.new(server_params) + + respond_to do |format| + if @server.save + format.html { redirect_to @server, notice: 'Server was successfully created.' } + format.json { render action: 'show', status: :created, location: @server } + else + format.html { render action: 'new' } + format.json { render json: @server.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /servers/1 + # PATCH/PUT /servers/1.json + def update + respond_to do |format| + if @server.update(server_params) + format.html { redirect_to @server, notice: 'Server was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @server.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /servers/1 + # DELETE /servers/1.json + def destroy + @server.destroy + respond_to do |format| + format.html { redirect_to servers_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_server + @server = Server.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def server_params + params[:server] + end +end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb new file mode 100644 index 0000000..16d11b5 --- /dev/null +++ b/app/controllers/sessions_controller.rb @@ -0,0 +1,2 @@ +class SessionsController < ApplicationController +end diff --git a/app/controllers/static_controller.rb b/app/controllers/static_controller.rb new file mode 100644 index 0000000..c6df11e --- /dev/null +++ b/app/controllers/static_controller.rb @@ -0,0 +1,2 @@ +class StaticController < ApplicationController +end diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb new file mode 100644 index 0000000..f14c97f --- /dev/null +++ b/app/controllers/teams_controller.rb @@ -0,0 +1,74 @@ +class TeamsController < ApplicationController + before_action :set_team, only: [:show, :edit, :update, :destroy] + + # GET /teams + # GET /teams.json + def index + @teams = Team.all + end + + # GET /teams/1 + # GET /teams/1.json + def show + end + + # GET /teams/new + def new + @team = Team.new + end + + # GET /teams/1/edit + def edit + end + + # POST /teams + # POST /teams.json + def create + @team = Team.new(team_params) + + respond_to do |format| + if @team.save + format.html { redirect_to @team, notice: 'Team was successfully created.' } + format.json { render action: 'show', status: :created, location: @team } + else + format.html { render action: 'new' } + format.json { render json: @team.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /teams/1 + # PATCH/PUT /teams/1.json + def update + respond_to do |format| + if @team.update(team_params) + format.html { redirect_to @team, notice: 'Team was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @team.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /teams/1 + # DELETE /teams/1.json + def destroy + @team.destroy + respond_to do |format| + format.html { redirect_to teams_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_team + @team = Team.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def team_params + params[:team] + end +end diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb new file mode 100644 index 0000000..720305f --- /dev/null +++ b/app/controllers/tournaments_controller.rb @@ -0,0 +1,74 @@ +class TournamentsController < ApplicationController + before_action :set_tournament, only: [:show, :edit, :update, :destroy] + + # GET /tournaments + # GET /tournaments.json + def index + @tournaments = Tournament.all + end + + # GET /tournaments/1 + # GET /tournaments/1.json + def show + end + + # GET /tournaments/new + def new + @tournament = Tournament.new + end + + # GET /tournaments/1/edit + def edit + end + + # POST /tournaments + # POST /tournaments.json + def create + @tournament = Tournament.new(tournament_params) + + respond_to do |format| + if @tournament.save + format.html { redirect_to @tournament, notice: 'Tournament was successfully created.' } + format.json { render action: 'show', status: :created, location: @tournament } + else + format.html { render action: 'new' } + format.json { render json: @tournament.errors, status: :unprocessable_entity } + end + end + end + + # PATCH/PUT /tournaments/1 + # PATCH/PUT /tournaments/1.json + def update + respond_to do |format| + if @tournament.update(tournament_params) + format.html { redirect_to @tournament, notice: 'Tournament was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: 'edit' } + format.json { render json: @tournament.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /tournaments/1 + # DELETE /tournaments/1.json + def destroy + @tournament.destroy + respond_to do |format| + format.html { redirect_to tournaments_url } + format.json { head :no_content } + end + end + + private + # Use callbacks to share common setup or constraints between actions. + def set_tournament + @tournament = Tournament.find(params[:id]) + end + + # Never trust parameters from the scary internet, only allow the white list through. + def tournament_params + params.require(:tournament).permit(:game_id) + end +end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 0000000..3e74dea --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,2 @@ +class UsersController < ApplicationController +end diff --git a/app/helpers/alerts_helper.rb b/app/helpers/alerts_helper.rb new file mode 100644 index 0000000..20f5b50 --- /dev/null +++ b/app/helpers/alerts_helper.rb @@ -0,0 +1,2 @@ +module AlertsHelper +end diff --git a/app/helpers/games_helper.rb b/app/helpers/games_helper.rb new file mode 100644 index 0000000..2ef8c1f --- /dev/null +++ b/app/helpers/games_helper.rb @@ -0,0 +1,2 @@ +module GamesHelper +end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb new file mode 100644 index 0000000..826effe --- /dev/null +++ b/app/helpers/main_helper.rb @@ -0,0 +1,2 @@ +module MainHelper +end diff --git a/app/helpers/matches_helper.rb b/app/helpers/matches_helper.rb new file mode 100644 index 0000000..cc2ef83 --- /dev/null +++ b/app/helpers/matches_helper.rb @@ -0,0 +1,2 @@ +module MatchesHelper +end diff --git a/app/helpers/pms_helper.rb b/app/helpers/pms_helper.rb new file mode 100644 index 0000000..0188e59 --- /dev/null +++ b/app/helpers/pms_helper.rb @@ -0,0 +1,2 @@ +module PmsHelper +end diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb new file mode 100644 index 0000000..b3ce20a --- /dev/null +++ b/app/helpers/search_helper.rb @@ -0,0 +1,2 @@ +module SearchHelper +end diff --git a/app/helpers/servers_helper.rb b/app/helpers/servers_helper.rb new file mode 100644 index 0000000..a36fb17 --- /dev/null +++ b/app/helpers/servers_helper.rb @@ -0,0 +1,2 @@ +module ServersHelper +end diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb new file mode 100644 index 0000000..309f8b2 --- /dev/null +++ b/app/helpers/sessions_helper.rb @@ -0,0 +1,2 @@ +module SessionsHelper +end diff --git a/app/helpers/static_helper.rb b/app/helpers/static_helper.rb new file mode 100644 index 0000000..8cfc9af --- /dev/null +++ b/app/helpers/static_helper.rb @@ -0,0 +1,2 @@ +module StaticHelper +end diff --git a/app/helpers/teams_helper.rb b/app/helpers/teams_helper.rb new file mode 100644 index 0000000..5fb41eb --- /dev/null +++ b/app/helpers/teams_helper.rb @@ -0,0 +1,2 @@ +module TeamsHelper +end diff --git a/app/helpers/tournaments_helper.rb b/app/helpers/tournaments_helper.rb new file mode 100644 index 0000000..2b6e27c --- /dev/null +++ b/app/helpers/tournaments_helper.rb @@ -0,0 +1,2 @@ +module TournamentsHelper +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100644 index 0000000..2310a24 --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/app/models/alert.rb b/app/models/alert.rb new file mode 100644 index 0000000..343c269 --- /dev/null +++ b/app/models/alert.rb @@ -0,0 +1,3 @@ +class Alert < ActiveRecord::Base + belongs_to :author +end diff --git a/app/models/game.rb b/app/models/game.rb new file mode 100644 index 0000000..a181c26 --- /dev/null +++ b/app/models/game.rb @@ -0,0 +1,2 @@ +class Game < ActiveRecord::Base +end diff --git a/app/models/game_attribute.rb b/app/models/game_attribute.rb new file mode 100644 index 0000000..c12723b --- /dev/null +++ b/app/models/game_attribute.rb @@ -0,0 +1,3 @@ +class GameAttribute < ActiveRecord::Base + belongs_to :game +end diff --git a/app/models/match.rb b/app/models/match.rb new file mode 100644 index 0000000..533435a --- /dev/null +++ b/app/models/match.rb @@ -0,0 +1,3 @@ +class Match < ActiveRecord::Base + belongs_to :tournament +end diff --git a/app/models/pm.rb b/app/models/pm.rb new file mode 100644 index 0000000..ab5af3b --- /dev/null +++ b/app/models/pm.rb @@ -0,0 +1,4 @@ +class Pm < ActiveRecord::Base + belongs_to :author + belongs_to :recipient +end diff --git a/app/models/server.rb b/app/models/server.rb new file mode 100644 index 0000000..120f0fa --- /dev/null +++ b/app/models/server.rb @@ -0,0 +1,2 @@ +class Server < ActiveRecord::Base +end diff --git a/app/models/server_settings.rb b/app/models/server_settings.rb new file mode 100644 index 0000000..7f49863 --- /dev/null +++ b/app/models/server_settings.rb @@ -0,0 +1,2 @@ +class ServerSettings < ActiveRecord::Base +end diff --git a/app/models/team.rb b/app/models/team.rb new file mode 100644 index 0000000..fa7ba9e --- /dev/null +++ b/app/models/team.rb @@ -0,0 +1,2 @@ +class Team < ActiveRecord::Base +end diff --git a/app/models/team_match_pair.rb b/app/models/team_match_pair.rb new file mode 100644 index 0000000..85f8eaa --- /dev/null +++ b/app/models/team_match_pair.rb @@ -0,0 +1,4 @@ +class TeamMatchPair < ActiveRecord::Base + belongs_to :team + belongs_to :match +end diff --git a/app/models/tournament.rb b/app/models/tournament.rb new file mode 100644 index 0000000..cc915a0 --- /dev/null +++ b/app/models/tournament.rb @@ -0,0 +1,3 @@ +class Tournament < ActiveRecord::Base + belongs_to :game +end diff --git a/app/models/tournament_option.rb b/app/models/tournament_option.rb new file mode 100644 index 0000000..950b351 --- /dev/null +++ b/app/models/tournament_option.rb @@ -0,0 +1,2 @@ +class TournamentOption < ActiveRecord::Base +end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..4a57cf0 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,2 @@ +class User < ActiveRecord::Base +end diff --git a/app/models/user_team_pair.rb b/app/models/user_team_pair.rb new file mode 100644 index 0000000..c55dc2e --- /dev/null +++ b/app/models/user_team_pair.rb @@ -0,0 +1,4 @@ +class UserTeamPair < ActiveRecord::Base + belongs_to :user + belongs_to :team +end diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb new file mode 100644 index 0000000..b60eaf2 --- /dev/null +++ b/app/views/alerts/_form.html.erb @@ -0,0 +1,25 @@ +<%= form_for(@alert) do |f| %> + <% if @alert.errors.any? %> +
+

<%= pluralize(@alert.errors.count, "error") %> prohibited this alert from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :author_id %>
+ <%= f.text_field :author_id %> +
+
+ <%= f.label :message %>
+ <%= f.text_area :message %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/alerts/edit.html.erb b/app/views/alerts/edit.html.erb new file mode 100644 index 0000000..ad99164 --- /dev/null +++ b/app/views/alerts/edit.html.erb @@ -0,0 +1,6 @@ +

Editing alert

+ +<%= render 'form' %> + +<%= link_to 'Show', @alert %> | +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/index.html.erb b/app/views/alerts/index.html.erb new file mode 100644 index 0000000..458b951 --- /dev/null +++ b/app/views/alerts/index.html.erb @@ -0,0 +1,29 @@ +

Listing alerts

+ + + + + + + + + + + + + + <% @alerts.each do |alert| %> + + + + + + + + <% end %> + +
AuthorMessage
<%= alert.author %><%= alert.message %><%= link_to 'Show', alert %><%= link_to 'Edit', edit_alert_path(alert) %><%= link_to 'Destroy', alert, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Alert', new_alert_path %> diff --git a/app/views/alerts/index.json.jbuilder b/app/views/alerts/index.json.jbuilder new file mode 100644 index 0000000..0911a5c --- /dev/null +++ b/app/views/alerts/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@alerts) do |alert| + json.extract! alert, :id, :author_id, :message + json.url alert_url(alert, format: :json) +end diff --git a/app/views/alerts/new.html.erb b/app/views/alerts/new.html.erb new file mode 100644 index 0000000..6d04589 --- /dev/null +++ b/app/views/alerts/new.html.erb @@ -0,0 +1,5 @@ +

New alert

+ +<%= render 'form' %> + +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/show.html.erb b/app/views/alerts/show.html.erb new file mode 100644 index 0000000..eeab7f7 --- /dev/null +++ b/app/views/alerts/show.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

+ Author: + <%= @alert.author %> +

+ +

+ Message: + <%= @alert.message %> +

+ +<%= link_to 'Edit', edit_alert_path(@alert) %> | +<%= link_to 'Back', alerts_path %> diff --git a/app/views/alerts/show.json.jbuilder b/app/views/alerts/show.json.jbuilder new file mode 100644 index 0000000..95481eb --- /dev/null +++ b/app/views/alerts/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @alert, :id, :author_id, :message, :created_at, :updated_at diff --git a/app/views/games/_form.html.erb b/app/views/games/_form.html.erb new file mode 100644 index 0000000..8941c59 --- /dev/null +++ b/app/views/games/_form.html.erb @@ -0,0 +1,37 @@ +<%= form_for(@game) do |f| %> + <% if @game.errors.any? %> +
+

<%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :name %>
+ <%= f.text_area :name %> +
+
+ <%= f.label :players_per_team %>
+ <%= f.number_field :players_per_team %> +
+
+ <%= f.label :teams_per_match %>
+ <%= f.number_field :teams_per_match %> +
+
+ <%= f.label :set_rounds %>
+ <%= f.number_field :set_rounds %> +
+
+ <%= f.label :randomized_teams %>
+ <%= f.number_field :randomized_teams %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/games/edit.html.erb b/app/views/games/edit.html.erb new file mode 100644 index 0000000..d72bd2e --- /dev/null +++ b/app/views/games/edit.html.erb @@ -0,0 +1,6 @@ +

Editing game

+ +<%= render 'form' %> + +<%= link_to 'Show', @game %> | +<%= link_to 'Back', games_path %> diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb new file mode 100644 index 0000000..ccd0f63 --- /dev/null +++ b/app/views/games/index.html.erb @@ -0,0 +1,35 @@ +

Listing games

+ + + + + + + + + + + + + + + + + <% @games.each do |game| %> + + + + + + + + + + + <% end %> + +
NamePlayers per teamTeams per matchSet roundsRandomized teams
<%= game.name %><%= game.players_per_team %><%= game.teams_per_match %><%= game.set_rounds %><%= game.randomized_teams %><%= link_to 'Show', game %><%= link_to 'Edit', edit_game_path(game) %><%= link_to 'Destroy', game, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Game', new_game_path %> diff --git a/app/views/games/index.json.jbuilder b/app/views/games/index.json.jbuilder new file mode 100644 index 0000000..7e5c1a1 --- /dev/null +++ b/app/views/games/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@games) do |game| + json.extract! game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams + json.url game_url(game, format: :json) +end diff --git a/app/views/games/new.html.erb b/app/views/games/new.html.erb new file mode 100644 index 0000000..ab95f70 --- /dev/null +++ b/app/views/games/new.html.erb @@ -0,0 +1,5 @@ +

New game

+ +<%= render 'form' %> + +<%= link_to 'Back', games_path %> diff --git a/app/views/games/show.html.erb b/app/views/games/show.html.erb new file mode 100644 index 0000000..7986016 --- /dev/null +++ b/app/views/games/show.html.erb @@ -0,0 +1,29 @@ +

<%= notice %>

+ +

+ Name: + <%= @game.name %> +

+ +

+ Players per team: + <%= @game.players_per_team %> +

+ +

+ Teams per match: + <%= @game.teams_per_match %> +

+ +

+ Set rounds: + <%= @game.set_rounds %> +

+ +

+ Randomized teams: + <%= @game.randomized_teams %> +

+ +<%= link_to 'Edit', edit_game_path(@game) %> | +<%= link_to 'Back', games_path %> diff --git a/app/views/games/show.json.jbuilder b/app/views/games/show.json.jbuilder new file mode 100644 index 0000000..1a2d0c7 --- /dev/null +++ b/app/views/games/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @game, :id, :name, :players_per_team, :teams_per_match, :set_rounds, :randomized_teams, :created_at, :updated_at diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb new file mode 100644 index 0000000..34494c3 --- /dev/null +++ b/app/views/matches/_form.html.erb @@ -0,0 +1,21 @@ +<%= form_for(@match) do |f| %> + <% if @match.errors.any? %> +
+

<%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :tournament_id %>
+ <%= f.text_field :tournament_id %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/matches/edit.html.erb b/app/views/matches/edit.html.erb new file mode 100644 index 0000000..38b7d70 --- /dev/null +++ b/app/views/matches/edit.html.erb @@ -0,0 +1,6 @@ +

Editing match

+ +<%= render 'form' %> + +<%= link_to 'Show', @match %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb new file mode 100644 index 0000000..d8122ac --- /dev/null +++ b/app/views/matches/index.html.erb @@ -0,0 +1,27 @@ +

Listing matches

+ + + + + + + + + + + + + <% @matches.each do |match| %> + + + + + + + <% end %> + +
Tournament
<%= match.tournament %><%= link_to 'Show', match %><%= link_to 'Edit', edit_match_path(match) %><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Match', new_match_path %> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder new file mode 100644 index 0000000..c8ada7a --- /dev/null +++ b/app/views/matches/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@matches) do |match| + json.extract! match, :id, :tournament_id + json.url match_url(match, format: :json) +end diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb new file mode 100644 index 0000000..bd4c78c --- /dev/null +++ b/app/views/matches/new.html.erb @@ -0,0 +1,5 @@ +

New match

+ +<%= render 'form' %> + +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb new file mode 100644 index 0000000..7bab721 --- /dev/null +++ b/app/views/matches/show.html.erb @@ -0,0 +1,9 @@ +

<%= notice %>

+ +

+ Tournament: + <%= @match.tournament %> +

+ +<%= link_to 'Edit', edit_match_path(@match) %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder new file mode 100644 index 0000000..2e45395 --- /dev/null +++ b/app/views/matches/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @match, :id, :tournament_id, :created_at, :updated_at diff --git a/app/views/pms/_form.html.erb b/app/views/pms/_form.html.erb new file mode 100644 index 0000000..480e308 --- /dev/null +++ b/app/views/pms/_form.html.erb @@ -0,0 +1,29 @@ +<%= form_for(@pm) do |f| %> + <% if @pm.errors.any? %> +
+

<%= pluralize(@pm.errors.count, "error") %> prohibited this pm from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :author_id %>
+ <%= f.text_field :author_id %> +
+
+ <%= f.label :recipient_id %>
+ <%= f.text_field :recipient_id %> +
+
+ <%= f.label :message %>
+ <%= f.text_area :message %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/pms/edit.html.erb b/app/views/pms/edit.html.erb new file mode 100644 index 0000000..074a4fd --- /dev/null +++ b/app/views/pms/edit.html.erb @@ -0,0 +1,6 @@ +

Editing pm

+ +<%= render 'form' %> + +<%= link_to 'Show', @pm %> | +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/index.html.erb b/app/views/pms/index.html.erb new file mode 100644 index 0000000..cb7fe4b --- /dev/null +++ b/app/views/pms/index.html.erb @@ -0,0 +1,31 @@ +

Listing pms

+ + + + + + + + + + + + + + + <% @pms.each do |pm| %> + + + + + + + + + <% end %> + +
AuthorRecipientMessage
<%= pm.author %><%= pm.recipient %><%= pm.message %><%= link_to 'Show', pm %><%= link_to 'Edit', edit_pm_path(pm) %><%= link_to 'Destroy', pm, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Pm', new_pm_path %> diff --git a/app/views/pms/index.json.jbuilder b/app/views/pms/index.json.jbuilder new file mode 100644 index 0000000..fcfca84 --- /dev/null +++ b/app/views/pms/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@pms) do |pm| + json.extract! pm, :id, :author_id, :recipient_id, :message + json.url pm_url(pm, format: :json) +end diff --git a/app/views/pms/new.html.erb b/app/views/pms/new.html.erb new file mode 100644 index 0000000..29e24ec --- /dev/null +++ b/app/views/pms/new.html.erb @@ -0,0 +1,5 @@ +

New pm

+ +<%= render 'form' %> + +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/show.html.erb b/app/views/pms/show.html.erb new file mode 100644 index 0000000..5ee483f --- /dev/null +++ b/app/views/pms/show.html.erb @@ -0,0 +1,19 @@ +

<%= notice %>

+ +

+ Author: + <%= @pm.author %> +

+ +

+ Recipient: + <%= @pm.recipient %> +

+ +

+ Message: + <%= @pm.message %> +

+ +<%= link_to 'Edit', edit_pm_path(@pm) %> | +<%= link_to 'Back', pms_path %> diff --git a/app/views/pms/show.json.jbuilder b/app/views/pms/show.json.jbuilder new file mode 100644 index 0000000..94252e9 --- /dev/null +++ b/app/views/pms/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @pm, :id, :author_id, :recipient_id, :message, :created_at, :updated_at diff --git a/app/views/servers/_form.html.erb b/app/views/servers/_form.html.erb new file mode 100644 index 0000000..b08654b --- /dev/null +++ b/app/views/servers/_form.html.erb @@ -0,0 +1,17 @@ +<%= form_for(@server) do |f| %> + <% if @server.errors.any? %> +
+

<%= pluralize(@server.errors.count, "error") %> prohibited this server from being saved:

+ + +
+ <% end %> + +
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/servers/edit.html.erb b/app/views/servers/edit.html.erb new file mode 100644 index 0000000..a92cdb5 --- /dev/null +++ b/app/views/servers/edit.html.erb @@ -0,0 +1,6 @@ +

Editing server

+ +<%= render 'form' %> + +<%= link_to 'Show', @server %> | +<%= link_to 'Back', servers_path %> diff --git a/app/views/servers/index.html.erb b/app/views/servers/index.html.erb new file mode 100644 index 0000000..f45d393 --- /dev/null +++ b/app/views/servers/index.html.erb @@ -0,0 +1,25 @@ +

Listing servers

+ + + + + + + + + + + + <% @servers.each do |server| %> + + + + + + <% end %> + +
<%= link_to 'Show', server %><%= link_to 'Edit', edit_server_path(server) %><%= link_to 'Destroy', server, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Server', new_server_path %> diff --git a/app/views/servers/index.json.jbuilder b/app/views/servers/index.json.jbuilder new file mode 100644 index 0000000..2776abc --- /dev/null +++ b/app/views/servers/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@servers) do |server| + json.extract! server, :id + json.url server_url(server, format: :json) +end diff --git a/app/views/servers/new.html.erb b/app/views/servers/new.html.erb new file mode 100644 index 0000000..0422009 --- /dev/null +++ b/app/views/servers/new.html.erb @@ -0,0 +1,5 @@ +

New server

+ +<%= render 'form' %> + +<%= link_to 'Back', servers_path %> diff --git a/app/views/servers/show.html.erb b/app/views/servers/show.html.erb new file mode 100644 index 0000000..039cd8f --- /dev/null +++ b/app/views/servers/show.html.erb @@ -0,0 +1,4 @@ +

<%= notice %>

+ +<%= link_to 'Edit', edit_server_path(@server) %> | +<%= link_to 'Back', servers_path %> diff --git a/app/views/servers/show.json.jbuilder b/app/views/servers/show.json.jbuilder new file mode 100644 index 0000000..972b1c0 --- /dev/null +++ b/app/views/servers/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @server, :id, :created_at, :updated_at diff --git a/app/views/teams/_form.html.erb b/app/views/teams/_form.html.erb new file mode 100644 index 0000000..fd10129 --- /dev/null +++ b/app/views/teams/_form.html.erb @@ -0,0 +1,17 @@ +<%= form_for(@team) do |f| %> + <% if @team.errors.any? %> +
+

<%= pluralize(@team.errors.count, "error") %> prohibited this team from being saved:

+ + +
+ <% end %> + +
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/teams/edit.html.erb b/app/views/teams/edit.html.erb new file mode 100644 index 0000000..49858ad --- /dev/null +++ b/app/views/teams/edit.html.erb @@ -0,0 +1,6 @@ +

Editing team

+ +<%= render 'form' %> + +<%= link_to 'Show', @team %> | +<%= link_to 'Back', teams_path %> diff --git a/app/views/teams/index.html.erb b/app/views/teams/index.html.erb new file mode 100644 index 0000000..b077e10 --- /dev/null +++ b/app/views/teams/index.html.erb @@ -0,0 +1,25 @@ +

Listing teams

+ + + + + + + + + + + + <% @teams.each do |team| %> + + + + + + <% end %> + +
<%= link_to 'Show', team %><%= link_to 'Edit', edit_team_path(team) %><%= link_to 'Destroy', team, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Team', new_team_path %> diff --git a/app/views/teams/index.json.jbuilder b/app/views/teams/index.json.jbuilder new file mode 100644 index 0000000..b29428b --- /dev/null +++ b/app/views/teams/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@teams) do |team| + json.extract! team, :id + json.url team_url(team, format: :json) +end diff --git a/app/views/teams/new.html.erb b/app/views/teams/new.html.erb new file mode 100644 index 0000000..433d944 --- /dev/null +++ b/app/views/teams/new.html.erb @@ -0,0 +1,5 @@ +

New team

+ +<%= render 'form' %> + +<%= link_to 'Back', teams_path %> diff --git a/app/views/teams/show.html.erb b/app/views/teams/show.html.erb new file mode 100644 index 0000000..5b18d33 --- /dev/null +++ b/app/views/teams/show.html.erb @@ -0,0 +1,4 @@ +

<%= notice %>

+ +<%= link_to 'Edit', edit_team_path(@team) %> | +<%= link_to 'Back', teams_path %> diff --git a/app/views/teams/show.json.jbuilder b/app/views/teams/show.json.jbuilder new file mode 100644 index 0000000..1538019 --- /dev/null +++ b/app/views/teams/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @team, :id, :created_at, :updated_at diff --git a/app/views/tournaments/_form.html.erb b/app/views/tournaments/_form.html.erb new file mode 100644 index 0000000..1fd63e9 --- /dev/null +++ b/app/views/tournaments/_form.html.erb @@ -0,0 +1,21 @@ +<%= form_for(@tournament) do |f| %> + <% if @tournament.errors.any? %> +
+

<%= pluralize(@tournament.errors.count, "error") %> prohibited this tournament from being saved:

+ + +
+ <% end %> + +
+ <%= f.label :game_id %>
+ <%= f.text_field :game_id %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/tournaments/edit.html.erb b/app/views/tournaments/edit.html.erb new file mode 100644 index 0000000..2913025 --- /dev/null +++ b/app/views/tournaments/edit.html.erb @@ -0,0 +1,6 @@ +

Editing tournament

+ +<%= render 'form' %> + +<%= link_to 'Show', @tournament %> | +<%= link_to 'Back', tournaments_path %> diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb new file mode 100644 index 0000000..ad2b7cf --- /dev/null +++ b/app/views/tournaments/index.html.erb @@ -0,0 +1,27 @@ +

Listing tournaments

+ + + + + + + + + + + + + <% @tournaments.each do |tournament| %> + + + + + + + <% end %> + +
Game
<%= tournament.game %><%= link_to 'Show', tournament %><%= link_to 'Edit', edit_tournament_path(tournament) %><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Tournament', new_tournament_path %> diff --git a/app/views/tournaments/index.json.jbuilder b/app/views/tournaments/index.json.jbuilder new file mode 100644 index 0000000..e6f3b49 --- /dev/null +++ b/app/views/tournaments/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@tournaments) do |tournament| + json.extract! tournament, :id, :game_id + json.url tournament_url(tournament, format: :json) +end diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb new file mode 100644 index 0000000..2a60539 --- /dev/null +++ b/app/views/tournaments/new.html.erb @@ -0,0 +1,5 @@ +

New tournament

+ +<%= render 'form' %> + +<%= link_to 'Back', tournaments_path %> diff --git a/app/views/tournaments/show.html.erb b/app/views/tournaments/show.html.erb new file mode 100644 index 0000000..30df788 --- /dev/null +++ b/app/views/tournaments/show.html.erb @@ -0,0 +1,9 @@ +

<%= notice %>

+ +

+ Game: + <%= @tournament.game %> +

+ +<%= link_to 'Edit', edit_tournament_path(@tournament) %> | +<%= link_to 'Back', tournaments_path %> diff --git a/app/views/tournaments/show.json.jbuilder b/app/views/tournaments/show.json.jbuilder new file mode 100644 index 0000000..0fe65a6 --- /dev/null +++ b/app/views/tournaments/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @tournament, :id, :game_id, :created_at, :updated_at -- cgit v1.2.3-2-g168b