diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index dd27d4f..fd99511 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -53,3 +53,5 @@ @import "pages/teams"; @import "pages/users"; @import "pages/matches"; +@import "pages/files"; +@import "pages/bans"; diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/components/_forms.scss index 3276900..176ce8d 100644 --- a/app/assets/stylesheets/components/_forms.scss +++ b/app/assets/stylesheets/components/_forms.scss @@ -57,6 +57,9 @@ form { display: block; width: auto; position: relative; + line-height: em(22); + vertical-align: middle; + max-height: em(36); margin-left: 0; border: 0; margin: 0; @@ -139,42 +142,46 @@ form { font-family: $open-sans; } - input[type=checkbox] { - @include appearance(none); - border-radius: $input-border-radius; + > label.checkbox { + display: none; + position: relative; width: em(40); height: em(40); - font-size: $input-font-size; - padding: $input-padding; - background-color: $input-primary; - border: $input-border-colour solid $input-border-width; - position: relative; - margin: 0; - float: left; + overflow: hidden; - &:focus { - outline: none; + &:before { + @include box-sizing(border-box); + content: ""; + display: block; + border-radius: $input-border-radius; + width: em(40); + height: em(40); + padding: $input-padding; + background-color: $input-primary; + border: $input-border-colour solid $input-border-width; + margin: 0; } - + &:hover { - border: $input-border-width solid lighten($input-secondary, 20%); - cursor: pointer; + + &:before { + border: $input-border-width solid lighten($input-secondary, 20%); + } } + } + + input[type=checkbox] { + display: none; &:checked { - border-color: $button-secondary; - &:after { + & + label.checkbox:before { content: $fa-var-check; pointer-events: none; font-family: $fontawesome; font-weight: normal; font-style: normal; - position: absolute; - font-size: em(22); - top: em(4); - left: em(5); - color: $button-secondary; + color: $light-blue; } } } @@ -258,6 +265,11 @@ form.square { @include span-columns(3); padding: em(11) 0; line-height: em(16); + + &.checkbox { + width: em(40); + padding: 0; + } } input[type=text], @@ -277,7 +289,6 @@ form.square { } } - &.wide { > .field_with_errors { diff --git a/app/assets/stylesheets/components/_tables.scss b/app/assets/stylesheets/components/_tables.scss index cd08ecd..3cb4dc8 100644 --- a/app/assets/stylesheets/components/_tables.scss +++ b/app/assets/stylesheets/components/_tables.scss @@ -26,12 +26,16 @@ tr, td, th { } table.striped > tbody { - > tr > td:first-child { - padding-left: ($base-line-height / 2); - } + > tr { + td:first-child, + th:first-child { + padding-left: ($base-line-height / 2); + } - > tr > td:last-child { - padding-right: ($base-line-height / 2); + td:last-child, + th:last-child { + padding-right: ($base-line-height / 2); + } } > tr:nth-child(2n) td { diff --git a/app/assets/stylesheets/layout/_navigation.scss b/app/assets/stylesheets/layout/_navigation.scss index a2b538e..f7f692d 100644 --- a/app/assets/stylesheets/layout/_navigation.scss +++ b/app/assets/stylesheets/layout/_navigation.scss @@ -21,7 +21,6 @@ ul.navigation { float: left; width: 100%; background: transparent; - overflow: hidden; max-width: $max-width; max-height: em(60); diff --git a/app/assets/stylesheets/pages/_bans.scss b/app/assets/stylesheets/pages/_bans.scss new file mode 100644 index 0000000..e91ba24 --- /dev/null +++ b/app/assets/stylesheets/pages/_bans.scss @@ -0,0 +1,23 @@ +/* + Bans List +*/ + +#bans { + + h1 { + margin-bottom: 1em; + } + + table.bans { + + .type, + .expiry { + width: 20%; + } + + .actions { + width: 10%; + text-align: right; + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_files.scss b/app/assets/stylesheets/pages/_files.scss new file mode 100644 index 0000000..146e932 --- /dev/null +++ b/app/assets/stylesheets/pages/_files.scss @@ -0,0 +1,12 @@ +/* + File Page +*/ + +#file { + + .actions, + .files-list { + @include span-columns(12); + margin: em(20) 0; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_forums.scss b/app/assets/stylesheets/pages/_forums.scss index 5c646ff..1ca1108 100644 --- a/app/assets/stylesheets/pages/_forums.scss +++ b/app/assets/stylesheets/pages/_forums.scss @@ -175,4 +175,23 @@ div#categories { } } } +} + +/* + Forms +*/ + + +#forums .add-acl { + + h4 { + margin: 1em 0; + } + + .permissions, + .controls { + display: inline; + width: auto; + float: none; + } } \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_news.scss b/app/assets/stylesheets/pages/_news.scss index 857de55..aa272d8 100644 --- a/app/assets/stylesheets/pages/_news.scss +++ b/app/assets/stylesheets/pages/_news.scss @@ -87,4 +87,20 @@ form.article { h4 { margin-bottom: em(20); } +} + +.files { + + .files-list { + margin: em(20) 0 em(40); + } + + form { + @include span-columns(12); + margin: em(20) 0; + + .fields { + margin-bottom: em(20); + } + } } \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_users.scss b/app/assets/stylesheets/pages/_users.scss index 0a2ad51..b2d8ed0 100644 --- a/app/assets/stylesheets/pages/_users.scss +++ b/app/assets/stylesheets/pages/_users.scss @@ -96,6 +96,17 @@ } } +#profile-edit { + + h1 { + margin-bottom: 1em; + } + + form { + margin-top: 0; + } +} + /* Agenda */ @@ -172,3 +183,23 @@ margin-top: em(20); } } + +/* + Staff List +*/ + +table.staff { + table-layout: auto; + + .country { + width: 6%; + } + + .username { + width: 20%; + } + + .age { + width: 5%; + } +} \ No newline at end of file diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index cb3f7f1..6e1da8f 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -1,6 +1,7 @@ class PostsController < ApplicationController before_filter :get_post, except: [:new, :create] respond_to :html, :js + layout 'forums' def quote raise AccessError unless @post.can_show? cuser @@ -10,7 +11,6 @@ class PostsController < ApplicationController @post = Post.new @post.topic = Topic.find(params[:id]) raise AccessError unless @post.can_create? cuser - render layout: 'forums' end def edit @@ -28,8 +28,7 @@ class PostsController < ApplicationController flash[:notice] = t(:posts_create) format.js { render } else - flash[:error] = t(:posts_invalid) + @post.errors.full_messages.to_s - format.html { return_to } + format.html { render :new } end end end diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index 38a8306..33493e4 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -1,5 +1,6 @@ class TopicsController < ApplicationController before_filter :get_topic, only: [:show, :reply, :edit, :update, :destroy] + layout 'forums' def index render partial: true, locals: {page: params[:p].to_i} @@ -18,7 +19,6 @@ class TopicsController < ApplicationController @newpost.topic = @topic @newpost.user = cuser @lock = (@topic.lock ? @topic.lock : Lock.new(:lockable => @topic)) - render layout: 'forums' end def reply @@ -27,7 +27,7 @@ class TopicsController < ApplicationController if request.xhr? render 'quickreply', layout: false else - render layout: 'forums' + render end end @@ -35,12 +35,10 @@ class TopicsController < ApplicationController @topic = Topic.new @topic.forum = Forum.find(params[:id]) raise AccessError unless @topic.can_create? cuser - render layout: 'forums' end def edit raise AccessError unless @topic.can_update? cuser - render layout: 'forums' end def create diff --git a/app/views/about/staff.html.erb b/app/views/about/staff.html.erb index c9beed1..bad9e40 100644 --- a/app/views/about/staff.html.erb +++ b/app/views/about/staff.html.erb @@ -27,7 +27,7 @@
Username | @@ -36,9 +36,9 @@Age | ||||
---|---|---|---|---|---|
<%= flag grouper.user.country %> | -<%= namelink grouper.user %> | +||||
<%= flag grouper.user.country %> | +<%= namelink grouper.user %> | <%= h grouper.user.email_s %> | <% if grouper.task %> @@ -47,14 +47,14 @@ <%= h grouper.group.name.singularize %> <% end %> | -<%= h grouper.user.age %> | +<%= h grouper.user.age %> |
Username | @@ -63,9 +63,9 @@Age | ||||
---|---|---|---|---|---|
<%= flag grouper.user.country %> | -<%= namelink grouper.user %> | +||||
<%= flag grouper.user.country %> | +<%= namelink grouper.user %> | <%= h grouper.user.email_s %> | <% if grouper.task %> @@ -74,14 +74,14 @@ <%= h grouper.group.name.singularize %> <% end %> | -<%= h grouper.user.age %> | +<%= h grouper.user.age %> |
Username | @@ -90,9 +90,9 @@Age | ||||
---|---|---|---|---|---|
<%= flag grouper.user.country %> | -<%= namelink grouper.user %> | +||||
<%= flag grouper.user.country %> | +<%= namelink grouper.user %> | <%= h grouper.user.email_s %> | <% if grouper.task %> @@ -101,14 +101,14 @@ <%= h grouper.group.name.singularize %> <% end %> | -<%= h grouper.user.age %> | +<%= h grouper.user.age %> |
Username | @@ -118,8 +118,8 @@|||||||
---|---|---|---|---|---|---|---|
<%= flag grouper.user.country %> | -<%= namelink grouper.user %> | +<%= flag grouper.user.country %> | +<%= namelink grouper.user %> | <%= h grouper.user.email_s %> | <% if grouper.task %> @@ -128,7 +128,7 @@ <%= h grouper.group.name.singularize %> <% end %> | -<%= h grouper.user.age %> | +<%= h grouper.user.age %> |
- <%= f.file_field :name %> - <%= f.submit 'Create' %> -
- <% end %> - <% end %> +- <%= link_to 'New article', new_article_path %> -
+ <%= link_to 'New Article', new_article_path, class: 'button' %> <% end %> diff --git a/app/views/articles/new.html.erb b/app/views/articles/new.html.erb index e27c01a..2872e82 100644 --- a/app/views/articles/new.html.erb +++ b/app/views/articles/new.html.erb @@ -1,3 +1 @@ <%= render :partial => "form" %> - -<%= link_to 'Back', articles_path %> \ No newline at end of file diff --git a/app/views/bans/_form.html.erb b/app/views/bans/_form.html.erb index 551b9c0..15f1df4 100644 --- a/app/views/bans/_form.html.erb +++ b/app/views/bans/_form.html.erb @@ -1,35 +1,29 @@ -
- <%= link_to_function 'User', "findUser('ban[user_name]')" %>
- <%= f.text_field :user_name, {:value => @ban.user.to_s} %>
-
- <%= f.label :ban_type %>
- <%= f.select :ban_type, @ban.types.invert %>
-
- <%= f.label :steamid %>
- <%= f.text_field :steamid %>
-
- <%= f.label :expiry %>
- <%= f.datetime_select :expiry %>
-
- <%= f.label :reason %> <%= bbcode %>
- <%= f.text_area :reason %>
-
- <%= f.submit 'Create' %> -
- <% end %> -User | -Type | -Expiry | -Reason | +User | +Type | +Expiry | +Reason | <% if cuser and cuser.admin? %> -Actions | +<% end %> | <%= ban.types[ban.ban_type] %> | <%= shorttime ban.expiry %> | -<%= shorten ban.reason, 30 %> | +<%= shorten ban.reason, 30 %> | <% if cuser and cuser.admin? %> -+ | <% if ban.can_update? cuser %> - <%= link_to 'E', edit_ban_path(ban) %> - <% end; if ban.can_destroy? cuser %> - <%= link_to 'D', ban, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('pencil'), edit_ban_path(ban) %> + <% end %> + <% if ban.can_destroy? cuser %> + <%= link_to icon('times'), ban, confirm: 'Are you sure?', method: :delete %> <% end %> | <% end %> diff --git a/app/views/bans/edit.html.erb b/app/views/bans/edit.html.erb index 29029da..efb5edd 100644 --- a/app/views/bans/edit.html.erb +++ b/app/views/bans/edit.html.erb @@ -1,6 +1,3 @@ -
---|
Name | Path | @@ -7,7 +7,7 @@||||||
---|---|---|---|---|---|---|---|
<%= namelink file %> | <%= h file.url %> | <%= file.size_s %> | @@ -15,7 +15,7 @@ <% if file.can_update? cuser %> <%= link_to icon('pencil'), edit_data_file_path(file) %> <% end; if file.can_destroy? cuser %> - <%= link_to icon('times'), file, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('times'), file, confirm: 'Are you sure?', method: :delete %> <% end %>
Name | -Size | -MD5 | -Modified | -
---|
- <%= link_to (h related.name.filename), related.name.url %> - | -- <%= related.size_s %> MB - | -- <%= related.md5_s %> - | -- <%= shorttime related.created_at %> - | +Name | +Size | +MD5 | +Modified |
---|
- <%= f.label :title %>
+
- <%= f.label :description %>
+
- <%= f.label :category %>
+
+
Group | -Access Level | -Options | +Group | +Access Level | +Options |
---|---|---|---|---|---|
<%= namelink forumer.group %> | -- <%= g.select :access, forumer.accesses.invert, :size => 20 %> - | -- <%= link_to_function "Update", "$('edit_forumer_#{forumer.id}').submit()" %> - <%= link_to "Remove", forumer, :method => :delete %> - | - <% end %> +|||
<%= namelink forumer.group %> | +
+ <%= form_for forumer do |g| %>
+
+ <%= g.select :access, forumer.accesses.invert, size: 20 %>
+
+ <% end %>
+ |
+ + <%= content_tag :a, { class: 'button tiny', data: { forumer: forumer.id } } do %> + Update + <% end %> + <%= link_to "Remove", forumer, method: :delete, class: 'button tiny' %> + |
- <%= f.label :group_id %>
+
+
- Topic: <%= namelink @post.topic %> -
-- <%= f.text_area :text, :rows => 15, :cols => 108 %> -
-- <%= f.submit 'Save' %> -
+
- <%= f.label :title %>
- <%= f.text_field :title %>
-
- <%= f.label :forum_id %>
- <%= f.select :forum_id, Forum.all.collect{|forum| [forum, forum.id]} %>
-
- <%= f.label :state %>
- <%= f.select :state, f.object.states.invert %>
-
- <%= f.submit 'Update' %> -
- <% end %> -
- <%= f.label :title %>
- <%= f.text_field :title, :size => 50 %>
-
- <%= f.text_area :first_post, :rows => 15, :cols => 108 %> -
+- <%= f.submit 'Create the topic' %> -
+First Name
+ (only visible to members) + <% end %> + <%= f.text_field :firstname %> +Last Name
+ (only visible to members) + <% end %> + <%= f.text_field :lastname %> +Daylight savings will be observed automatically.
+First Name
- (only visible to members) - <% end %> - <%= f.text_field :firstname %> -Last Name
- (only visible to members) - <% end %> - <%= f.text_field :lastname %> -Daylight savings will be observed automatically.
-