Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First working version of Gameye integration
- Loading branch information
Showing
19 changed files
with
445 additions
and
213 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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,5 +1,7 @@ | ||
json.id server.id | ||
json.name server.name | ||
json.location do | ||
json.partial! 'locations/location', location: server.location | ||
if server.location_id | ||
json.location do | ||
json.partial! 'locations/location', location: server.location | ||
end | ||
end |
This file contains 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,41 @@ | ||
.row | ||
.col-md-12 | ||
%p.alert.alert-warning | ||
Please pick your start and end time carefully, reservations that have no players for 30 minutes (60 minutes for premium users) get ended automatically and you will receive a 24h temp ban. Use the "idle reset" button if you need more time before you start (e.g. your lobby takes a long time to fill). All times are in timezone: | ||
= link_to(Time.zone, edit_users_path) | ||
|
||
= render "donator_nag" | ||
|
||
.row | ||
.col-md-12.col-lg-6.offset-lg-2 | ||
= simple_form_for(@reservation, url: url_for(controller: "reservations", action: "create_gameye"), wrapper: :horizontal_form, :html => { :class => 'form-horizontal reservation' }) do |f| | ||
- if @reservation.schedulable? | ||
= f.input :starts_at, :as => :string, :input_html => { :value => I18n.l(@reservation.starts_at, :format => :datepicker), :data => { :"datepicker-format" => "dd-mm-yyyy hh:ii", :"datepicker-nodefault" => "false" } }, :label => "Starts at" | ||
= f.input :ends_at, :as => :string, :input_html => { :value => I18n.l(@reservation.ends_at, :format => :datepicker), :data => { :"datepicker-format" => "dd-mm-yyyy hh:ii", :"datepicker-nodefault" => "false" } }, :label => "Ends at" | ||
|
||
= f.input :gameye_location, :label => "Location", :required => true, :disabled => !@reservation.schedulable?, :collection => @gameye_locations | ||
|
||
= f.input :password, :as => :string, :placeholder => "The server password to join the game" | ||
= f.input :rcon, :as => :string, :placeholder => "The RCON password to control the server", :disabled => !@reservation.schedulable? | ||
= f.input :first_map, :collection => MapUpload.available_maps, :input_html => { :class => "select2" }, :disabled => !@reservation.schedulable? | ||
= f.input :tv_password, :as => :string, :placeholder => "Password for STV, default tv" | ||
= f.association :server_config, :collection => ServerConfig.ordered, :hint => "Specify a league config to run on each map start", :input_html => { :class => "select2" } | ||
= f.input :custom_whitelist_id, :hint => "Enter the whitelist ID or preset name (e.g. etf2l_6v6_s22) from <a href='http://whitelist.tf/configure' target='_blank'>whitelist.tf</a>".html_safe | ||
|
||
- users_last_reservation = current_user.reservations.last | ||
- if users_last_reservation && users_last_reservation.past? && users_last_reservation.inactive_too_long? | ||
- hint = "Auto-ending is forced on for your next reservation, because you didn't end your last one" | ||
- readonly = true | ||
- else | ||
- hint = "Automatically end the reservation once everyone has left the server" | ||
- readonly = false | ||
= f.input :auto_end, :as => :boolean, :hint => hint, :readonly => readonly, :disabled => readonly, :input_html => { :value => true } | ||
|
||
.row.submit-row | ||
.col-sm-2.offset-sm-4.col-lg-2.offset-lg-5 | ||
%button.btn.btn-success{:type => :submit} | ||
Save | ||
|
||
= render "datepicker_javascript_options" | ||
:javascript | ||
var reservationSchedulable = #{@reservation.schedulable?} |
Oops, something went wrong.