diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index fd99511..53b1a84 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -55,3 +55,5 @@ @import "pages/matches"; @import "pages/files"; @import "pages/bans"; +@import "pages/servers"; + diff --git a/app/assets/stylesheets/components/_gather.scss b/app/assets/stylesheets/components/_gather.scss index 952d4ab..1422a42 100644 --- a/app/assets/stylesheets/components/_gather.scss +++ b/app/assets/stylesheets/components/_gather.scss @@ -106,7 +106,6 @@ .data { @include span-columns(4); - max-height: em(400); overflow-y: scroll; padding-bottom: em(20); diff --git a/app/assets/stylesheets/pages/_servers.scss b/app/assets/stylesheets/pages/_servers.scss new file mode 100644 index 0000000..84e2813 --- /dev/null +++ b/app/assets/stylesheets/pages/_servers.scss @@ -0,0 +1,51 @@ +/* + Servers +*/ + +#servers { + @include span-columns(12); + margin-bottom: em(20); + + div.server { + @include span-columns(12); + margin-bottom: em(20); + padding-bottom: em(20); + border-bottom: em(3) solid $light-gray; + position: relative; + + .connect { + position: absolute; + top: 0; + right: 0; + margin: 0; + } + + &:last-child { + margin-bottom: 0; + border-bottom: 0; + } + } +} + +/* + Server Form +*/ + +form.server { + + .inputs { + @include span-columns(12); + + input { + max-width: 100%; + } + + .ip { + @include span-columns(9); + } + + .port { + @include span-columns(3); + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_users.scss b/app/assets/stylesheets/pages/_users.scss index b2d8ed0..3c2d519 100644 --- a/app/assets/stylesheets/pages/_users.scss +++ b/app/assets/stylesheets/pages/_users.scss @@ -87,6 +87,10 @@ } } + .achievements { + margin-bottom: em(20); + } + tbody td { &:first-child, &:nth-child(2) { diff --git a/app/models/concerns/extra.rb b/app/models/concerns/extra.rb index be784b8..08013ad 100644 --- a/app/models/concerns/extra.rb +++ b/app/models/concerns/extra.rb @@ -32,7 +32,6 @@ module Extra def move_up(scope, column = "position") n = 0 objects = self.class.all(conditions: scope, order: column) - binding.pry objects.each do |item| if item.id == id and n > 0 old_position = item.read_attribute(:column) @@ -46,7 +45,6 @@ module Extra def move_down(scope, column = "position") n = 0 objects = self.class.all(conditions: scope, order: column) - binding.pry objects.each do |item| if item.id == id and n < (objects.length-1) old_position = item.read_attribute(:column) diff --git a/app/views/servers/_form.html.erb b/app/views/servers/_form.html.erb index 0e39651..97c0403 100644 --- a/app/views/servers/_form.html.erb +++ b/app/views/servers/_form.html.erb @@ -1,52 +1,52 @@ -
- <%= f.label :dns %>
- <%= f.text_field :dns %>
-
- <%= f.label :ip %> :
- <%= f.label :port %>
- <%= f.text_field :ip, :size => 15 %>
- <%= f.text_field :port, :size => 5 %>
-
- <%= f.label :rcon %>
- <%= f.text_field :rcon %>
-
- <%= f.label :password %>
- <%= f.text_field :password %>
-
- <%= f.label :name %>
- <%= f.text_field :name %>
-
- <%= f.label :description %>
- <%= f.text_field :description %>
-
- <%= f.label :irc %>
- <%= f.text_field :irc %>
-
- <%= f.label :domain %>
- <%= f.select :domain, @server.domains.invert %>
-
- <%= f.label :official, "Available for ENSL officials?" %>
- <%= f.check_box :official %>
-
- <%= f.submit 'Save' %> -
- <% end %> -- IP: + IP: <%= h server.ip %>:<%= h server.port %>
- <%= cascade server, ["dns", "password", "irc", ["Owner", :user]] %> - <% if server.domain == Server::DOMAIN_HLDS or server.domain == Server::DOMAIN_HLTV %> - <%= link_to "Click to connect", "steam://connect/#{server.addr}" %> - <% else %> - <%= link_to "Click to connect", "steam://run/4920//connect #{server.ip} #{server.password}" %> - <% end %> -