diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index 10cb49857..f00b6ea70 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -45,7 +45,7 @@ def titles(options = {}) has_captain_label = team && user.can?(:edit, team) && user.can?(:use, :teams) titles = [] - titles << content_tag(:span, 'captain', class: 'badge badge-danger') if has_captain_label + titles << content_tag(:span, 'Captain', class: 'badge badge-danger') if has_captain_label titles << badge if user.badge? safe_join(titles, ' ') end diff --git a/app/views/admin/index.html.haml b/app/views/admin/index.html.haml index 17fb15ae9..60e132f64 100644 --- a/app/views/admin/index.html.haml +++ b/app/views/admin/index.html.haml @@ -23,6 +23,8 @@ = link_to 'Maps', meta_maps_path, class: 'list-group-item' .card.mb-3 - .card-header External - %li.list-group-item - = link_to 'Source Server Controller', 'https://ssc.imconnor.xyz/', target: :_blank, rel: :noopener + .card-header Easy Access + %ul.list-group.list-group-flush + %li.list-group-item= link_to 'Staff Applications', 'https://ozfortress.com/forums/topics/24', target: :_blank, rel: :noopener + %li.list-group-item= link_to 'News', 'https://ozfortress.com/forums/topics/2', target: :_blank, rel: :noopener + %li.list-group-item= link_to 'Ban Appeals', 'https://forms.gle/3CbDmeBq2U35YAcR9', target: :_blank, rel: :noopener \ No newline at end of file diff --git a/app/views/application/_navbar.html.haml b/app/views/application/_navbar.html.haml index 202f8ffd9..318726ac1 100644 --- a/app/views/application/_navbar.html.haml +++ b/app/views/application/_navbar.html.haml @@ -15,30 +15,72 @@ %li.nav-item.dropdown %a.nav-link.dropdown-toggle{ role: :button, data: { toggle: :dropdown } } - About + Rules %span.caret - .dropdown-menu - = link_to('Rules', :rules, class: 'dropdown-item') - = link_to('Community Rules', :community_rules, class: 'dropdown-item') - = link_to('Infractions', :infractions, class: 'dropdown-item') - = link_to('Staff', :staff, class: 'dropdown-item') - = link_to('Bans', :bans, class: 'dropdown-item') - = link_to('Anti-Cheat and You', :anticheat_and_you, class: 'dropdown-item') + .dropdown-menu.dropdown-menu-animated#rules-dropdown-menu + .dropdown-header + Competitive Rulesets + + = link_to('Global Ruleset', 'https://docs.ozfortress.com/rules/global/index', class: 'dropdown-item') + = link_to('Sixes Ruleset', 'https://docs.ozfortress.com/rules/sixes/index', class: 'dropdown-item') + = link_to('Highlander Ruleset', 'https://docs.ozfortress.com/rules/highlander/index', class: 'dropdown-item') + + .dropdown-divider + + .dropdown-header + Community + + = link_to('Community Guidelines', 'https://docs.ozfortress.com/rules/community_guidelines/index', class: 'dropdown-item') + = link_to('Infractions', 'https://docs.ozfortress.com/rules/infractions/index', class: 'dropdown-item') + + :javascript + // Prevent inside clicks from dismissing dropdown + $("#rules-dropdown-menu").click(function(e) { + e.stopPropagation() + }) + %li.nav-item.dropdown %a.nav-link.dropdown-toggle{ role: :button, data: { toggle: :dropdown } } Help %span.caret - .dropdown-menu - = link_to('Server Configs', :server_configs, class: 'dropdown-item') - = link_to('Book a Server', :book_server, class: 'dropdown-item') - = link_to('Newbie Guide', :newbie_guide, class: 'dropdown-item') - = link_to('Transfers', :transfers, class: 'dropdown-item') - = link_to('Verify Rosters', 'https://verify.ozfortress.com', target: :_blank, rel: :noopener, - class: 'dropdown-item') - = link_to('Demos', 'https://demos.tf/uploads/76561198049618390', target: :_blank, rel: :noopener, class: 'dropdown-item') + .dropdown-menu.dropdown-menu-animated#help-dropdown-menu + .dropdown-header + General Info + + = link_to('Staff', 'https://docs.ozfortress.com/info/staff/index', class: 'dropdown-item') + = link_to('Map History', 'https://docs.ozfortress.com/info/map_history/index', class: 'dropdown-item') + = link_to('Anti-Cheat and You', 'https://docs.ozfortress.com/info/anticheat_and_you/index', class: 'dropdown-item') + + .dropdown-divider + + .dropdown-header + Guides + + = link_to('Book a Server', 'https://docs.ozfortress.com/guides/book_a_server/index', class: 'dropdown-item') + = link_to('Newbie Guide', 'https://docs.ozfortress.com/guides/newbie_guide/index', class: 'dropdown-item') + + .dropdown-divider + + .dropdown-header + Other + + = link_to('Verify Rosters tool', 'https://verify.ozfortress.com', target: :_blank, rel: :noopener, class: 'dropdown-item') + = link_to('STV Demos', 'https://demos.tf/uploads/76561198049618390', target: :_blank, rel: :noopener, class: 'dropdown-item') + + :javascript + // Prevent inside clicks from dismissing dropdown + $("#help-dropdown-menu").click(function(e) { + e.stopPropagation() + }) + +%li.nav-item + = link_to('Support & Reporting', 'https://docs.ozfortress.com/support/landing/index', target: :_blank, rel: :noopener, class: 'nav-link') + +%li.nav-item + = link_to('Docs', 'https://docs.ozfortress.com/index', target: :_blank, rel: :noopener, class: 'nav-link') - if user_signed_in? && current_user.admin? %li.nav-item{ class: navbar_class(:admin) } diff --git a/app/views/application/_sidebar.html.haml b/app/views/application/_sidebar.html.haml index 72487cdec..d0871aaa3 100644 --- a/app/views/application/_sidebar.html.haml +++ b/app/views/application/_sidebar.html.haml @@ -1,18 +1,18 @@ .card - .card-header External Links + .card-header Socials %ul.list-group.list-group-flush %li.list-group-item = link_to 'https://discord.gg/7E6kC2H', target: '_blank', rel: :noopener do = image_tag 'discord-logo.png', width: 32 Join our Discord - %li.list-group-item - = link_to 'https://www.patreon.com/ozfortress/', target: '_blank', rel: :noopener do - = image_tag 'patreon-logo.png', width: 32 - Support us on Patreon %li.list-group-item = link_to 'http://twitter.com/ozfortress', target: '_blank', rel: :noopener do = image_tag 'twitter-logo.png', width: 32 Follow us on Twitter + %li.list-group-item + = link_to 'https://www.patreon.com/ozfortress/', target: '_blank', rel: :noopener do + = image_tag 'patreon-logo.png', width: 32 + Support us on Patreon %li.list-group-item = link_to 'https://www.youtube.com/channel/UCKnMgeTAHzdttd8TXE9UOgw', target: '_blank', rel: :noopener do = image_tag 'youtube-logo.png', width: 32 diff --git a/app/views/leagues/matches/_match_comms.html.haml b/app/views/leagues/matches/_match_comms.html.haml index 6c198b5ec..85993a6f9 100644 --- a/app/views/leagues/matches/_match_comms.html.haml +++ b/app/views/leagues/matches/_match_comms.html.haml @@ -1,6 +1,6 @@ .card.mb-3#match-comms .card-header - Match Comms + Match Communications (Match Comms) .card-body.p-0 - comms.each do |comm| @@ -16,3 +16,22 @@ .d-flex.justify-content-end = f.primary 'Post' + + .card-header Post Guidelines + .card-body + %p + Please ensure your posts in Match Communications + %b does not + contain the following: + %ul + %li Anything unrelated to the match. This is an infractable offence. + %li Anything that violates our Community Guidelines. + + .card-header Expected Match Details + .card-body + %p Your Match Communications should (by the end of that round) contain: + %ul + %li The agreed upon, scheduled match day and time. + %li Indication as to which team won what map. + %li logs.tf links for each map, which you can find easily via your ozfortress.com profile. + %li Any mercenaries used within the match (it is expected that each team declares their approved mercenaries here). \ No newline at end of file diff --git a/app/views/leagues/matches/_schedule.html.haml b/app/views/leagues/matches/_schedule.html.haml index 23c7e6610..ee73df563 100644 --- a/app/views/leagues/matches/_schedule.html.haml +++ b/app/views/leagues/matches/_schedule.html.haml @@ -1,6 +1,6 @@ - if league.schedule == 'weeklies' .card.mb-3 - .card-header Availability + .card-header Shared Availability .card-body - Schedule suggestions (based on availability): + Schedule suggestions (based on both team's shared availability): %b= league.scheduler.common_schedule(match.home_team, match.away_team).join(', ') diff --git a/app/views/leagues/matches/comms/_comm.html.haml b/app/views/leagues/matches/comms/_comm.html.haml index 97127901e..f16dc7773 100644 --- a/app/views/leagues/matches/comms/_comm.html.haml +++ b/app/views/leagues/matches/comms/_comm.html.haml @@ -19,8 +19,7 @@ - if user_can_edit_comm?(comm) = link_to 'Edit', comm.paths.edit, class: 'dropdown-item' - - if user_can_edit_comm?(comm) && comm.edits.size > 1 - = link_to 'History', comm.paths.edits, class: 'dropdown-item' + = link_to 'History', comm.paths.edits, class: 'dropdown-item' .card-body .markdown.pb-3 diff --git a/app/views/leagues/matches/show.html.haml b/app/views/leagues/matches/show.html.haml index 223bb0ecb..9465775a5 100644 --- a/app/views/leagues/matches/show.html.haml +++ b/app/views/leagues/matches/show.html.haml @@ -52,7 +52,7 @@ .card.mb-3 - .card-header Results #{match_p.status} + .card-header Picks/Bans #{match_p.status} - can_view_scores = !@match.confirmed? && user_can_either_teams? && @league.matches_submittable? - if can_view_scores || user_can_edit_league? diff --git a/app/views/leagues/rosters/edit.html.haml b/app/views/leagues/rosters/edit.html.haml index 4c34001c2..517aae395 100644 --- a/app/views/leagues/rosters/edit.html.haml +++ b/app/views/leagues/rosters/edit.html.haml @@ -53,6 +53,17 @@ = link_to 'Cancel', team_path(@roster.team), class: 'btn btn-link mr-2' = f.primary 'Update' + .card-header Roster Content Guidelines + .card-body + %p + Your roster name + %b can not + contain the following: + %ul + %li Emojis or special characters. + %li Blank characters or characters to otherwise break the name field. + %li Links/URLs. + %li Anything that violates our Community Guidelines. = render 'leagues/rosters/transfers/index', league: @league, roster: @roster, new_transfer_request: @transfer_request, diff --git a/app/views/pages/anticheat_and_you.html.haml b/app/views/pages/anticheat_and_you.html.haml deleted file mode 100644 index 929a12897..000000000 --- a/app/views/pages/anticheat_and_you.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Anti-Cheat and You' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'anticheat_and_you.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/bans.html.haml b/app/views/pages/bans.html.haml deleted file mode 100644 index fed0c29ab..000000000 --- a/app/views/pages/bans.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Bans' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'bans.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/book_server.html.haml b/app/views/pages/book_server.html.haml deleted file mode 100644 index 0b1bb5124..000000000 --- a/app/views/pages/book_server.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Booking a Server' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'book_server.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/community_rules.html.haml b/app/views/pages/community_rules.html.haml deleted file mode 100644 index 090ccfff1..000000000 --- a/app/views/pages/community_rules.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Community Rules' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'community_rules.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/home.html.haml b/app/views/pages/home.html.haml index 7491042af..6de813a0d 100644 --- a/app/views/pages/home.html.haml +++ b/app/views/pages/home.html.haml @@ -1,6 +1,3 @@ -.row.justify-content-center.mb-4 - = image_tag 'logo.svg', width: '340px' - - if @topic %h1 News diff --git a/app/views/pages/infractions.html.haml b/app/views/pages/infractions.html.haml deleted file mode 100644 index 8ba849306..000000000 --- a/app/views/pages/infractions.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Infractions' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'infractions.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/newbie_guide.html.haml b/app/views/pages/newbie_guide.html.haml deleted file mode 100644 index c1ab261ad..000000000 --- a/app/views/pages/newbie_guide.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Newbie Guide' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'newbie_guide.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/rules.html.haml b/app/views/pages/rules.html.haml deleted file mode 100644 index 818a78f19..000000000 --- a/app/views/pages/rules.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Rules' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'rules.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/server_configs.html.haml b/app/views/pages/server_configs.html.haml deleted file mode 100644 index 3256f527a..000000000 --- a/app/views/pages/server_configs.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Server Configs' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'server_configs.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/staff.html.haml b/app/views/pages/staff.html.haml deleted file mode 100644 index ff9b1a5ed..000000000 --- a/app/views/pages/staff.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Staff' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'staff.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/pages/transfers.html.haml b/app/views/pages/transfers.html.haml deleted file mode 100644 index 3c8d5f2d0..000000000 --- a/app/views/pages/transfers.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for(:title) { 'Transfers' } - --# rubocop:disable Rails/OutputSafety -= raw File.read(Rails.root.join('public', 'transfers.html.txt')) --# rubocop:enable Rails/OutputSafety diff --git a/app/views/teams/edit.html.haml b/app/views/teams/edit.html.haml index b44b235bf..217a9d5a1 100644 --- a/app/views/teams/edit.html.haml +++ b/app/views/teams/edit.html.haml @@ -19,6 +19,20 @@ = f.primary 'Save' + .card-header Team Content Guidelines + .card-body + %p + Your team page (name, avatar/logo and description) + %b can not + contain the following: + %ul + %li Emojis or special characters. (Name only) + %li Blank characters or characters to otherwise break the name/description fields. + %li Links/URLs. (Name only) + %li Nudity or Sexual Content. + %li Inappropriate or Not Safe for Work memes. + %li Blank characters or characters to otherwise break the description field. + %li Anything that violates our Community Guidelines. - unless @team.rosters.exists? .alert.alert-danger.mb-3 diff --git a/app/views/users/_show_admin_comments.html.haml b/app/views/users/_show_admin_comments.html.haml index 6a34e3e37..d59eff277 100644 --- a/app/views/users/_show_admin_comments.html.haml +++ b/app/views/users/_show_admin_comments.html.haml @@ -1,6 +1,6 @@ .alert.alert-admin.mb-3 %label.font-weight-bold.alert-heading - Admin Comments + Admin Comments (Only visible for administrators) %hr.mt-0 diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 340b977b4..0a5ae0c0e 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -7,7 +7,7 @@ %hr .card.mb-3 - .card-header Change Name + .card-header Change your ozfortress.com name .card-body = bootstrap_form_for @name_change, url: name_user_path(@user), method: :post, as: :name_change do |f| @@ -15,6 +15,27 @@ = f.primary 'Request Name Change' + .card-header Name Change Request Guidelines + .card-body + %p + Your name + %b can not + contain the following: + %ul + %li Emojis or special characters. + %li Blank characters or characters to otherwise break the name field. + %li Links/URLs. + %li Anything that violates our Community Guidelines. + %br/ + %p + The following + %b may + result in your Name Change Request being denied: + %ul + %li Inappropriate or Not Safe for Work memes/meme names. + %li Non-emoji faces without a name next to them. + %li Obscured or otherwise "sneaky" references to anything that breaks our Community Guidelines. + .card.mb-3 .card-header General .card-body @@ -25,6 +46,18 @@ = link_to 'Cancel', user_path(@user), class: 'btn btn-link mr-2' = f.primary 'Save' + .card-header Profile Content Guidelines + .card-body + %p + Your profile (avatar and description) + %b can not + contain the following: + %ul + %li Nudity or Sexual Content. + %li Inappropriate or Not Safe for Work memes. + %li Blank characters or characters to otherwise break the description field. + %li Anything that violates our Community Guidelines. + - if user_can_edit_users? .card.border-danger.mb-3 .card-header.text-white.bg-danger Admin Only diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml index ae151c453..945463176 100644 --- a/app/views/users/new.html.haml +++ b/app/views/users/new.html.haml @@ -11,3 +11,5 @@ .d-flex.justify-content-end = link_to 'Cancel', :back, class: 'btn btn-link mr-2' = f.submit 'Register' + +%p By signing up, you are agreeing to our Community Guidelines & User Policy. diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index 92426d9e7..c4e6336ec 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -30,21 +30,20 @@ %span.mx-2= '/' %span= @user.steam_id - .row.mt-2 - %span.steam-link + .row.align-items-center.steam-link.mt-2 + = link_to "LEGACY HL (RSL)", 'https://rsl.tf/users/steam_id/' + @user.steam_id.to_s, class: 'steam_link' + %span.mx-2='|' = link_to "LOGS.TF", 'http://logs.tf/profile/' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' - = link_to "DEMOS.TF", 'https://demos.tf/uploads/' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' + %span.mx-2='·' + = link_to "DEMOS.TF", 'https://demos.tf/profiles/' + @user.steam_id.to_s, class: 'steam_link' + %span.mx-2='·' = link_to "ETF2L", 'http://etf2l.org/search/' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' + %span.mx-2='·' = link_to "RGL", 'https://rgl.gg/public/PlayerProfile.aspx?p=' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' - = link_to "RSL.TF", 'https://rsl.tf/users/steam_id/' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' - = link_to "MATCH.TF", 'https://match.tf/users/steam_id/' + @user.steam_id.to_s, class: 'steam_link' - %span=' · ' + %span.mx-2='·' = link_to "UGC", 'http://www.ugcleague.com/players_page.cfm?player_id=' + @user.steam_id.to_s, class: 'steam_link' + %span.mx-2='·' + = link_to "MATCH.TF", 'https://match.tf/users/steam_id/' + @user.steam_id.to_s, class: 'steam_link' .row.mb-3 != present_collection(@titles).map(&:icon).join(' ') diff --git a/config/routes.rb b/config/routes.rb index 2fea2ec9c..febadeee5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,16 +18,6 @@ root 'pages#home' get 'pages/home' - get 'rules', to: 'pages#rules' - get 'staff', to: 'pages#staff' - get 'bans', to: 'pages#bans' - get 'anticheat_and_you', to: 'pages#anticheat_and_you' - get 'server_configs', to: 'pages#server_configs' - get 'book_server', to: 'pages#book_server' - get 'transfers', to: 'pages#transfers' - get 'newbie_guide', to: 'pages#newbie_guide' - get 'community_rules', to: 'pages#community_rules' - get 'infractions', to: 'pages#infractions' get 'admin', to: 'admin#index' get 'statistics', to: 'admin#statistics', as: 'admin_statistics' diff --git a/public/highlander_competitive_ruleset.html.txt b/public/highlander_competitive_ruleset.html.txt new file mode 100644 index 000000000..63238d7cf --- /dev/null +++ b/public/highlander_competitive_ruleset.html.txt @@ -0,0 +1,5 @@ +