mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-27 04:51:14 +00:00
More progress on upgrade
This commit is contained in:
parent
ce9797aed8
commit
f156ed3060
10 changed files with 17 additions and 8 deletions
|
@ -270,7 +270,7 @@ GEM
|
||||||
websocket-driver (0.5.4)
|
websocket-driver (0.5.4)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.2)
|
websocket-extensions (0.1.2)
|
||||||
will_paginate (3.0.5)
|
will_paginate (3.0.12)
|
||||||
xpath (2.0.0)
|
xpath (2.0.0)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,12 @@ $(function() {
|
||||||
$(this).scrollTop(scrollTop-Math.round(delta));
|
$(this).scrollTop(scrollTop-Math.round(delta));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Forums fast reply
|
||||||
|
$("a#fastReply").live('click', function() {
|
||||||
|
$('#reply').fadeIn('slow')
|
||||||
|
});
|
||||||
|
|
||||||
// Gather stuff
|
// Gather stuff
|
||||||
|
|
||||||
$("a#gather-info-hide").live('click', function() {
|
$("a#gather-info-hide").live('click', function() {
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
class TeamersController < ApplicationController
|
class TeamersController < ApplicationController
|
||||||
|
def index
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@teamer = Teamer.new params[:teamer]
|
@teamer = Teamer.new params[:teamer]
|
||||||
raise AccessError unless @teamer.can_create? cuser, params[:teamer]
|
raise AccessError unless @teamer.can_create? cuser, params[:teamer]
|
||||||
|
|
|
@ -171,7 +171,6 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def upcoming_matches
|
def upcoming_matches
|
||||||
GoogleCalendar.new(ENV['GOOGLE_CALENDAR_ID'], timezone_offset).
|
GoogleCalendar.new(ENV['GOOGLE_CALENDAR_ID'], timezone_offset).
|
||||||
upcoming.sort_by do |event|
|
upcoming.sort_by do |event|
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Forum < ActiveRecord::Base
|
||||||
is_admin = Grouper.where(user_id: cuser, group_id: Group::ADMINS)
|
is_admin = Grouper.where(user_id: cuser, group_id: Group::ADMINS)
|
||||||
Forum.where("EXISTS (#{is_admin.to_sql}) OR
|
Forum.where("EXISTS (#{is_admin.to_sql}) OR
|
||||||
id IN (SELECT q.id from (#{user_has_access.to_sql}) q ) OR
|
id IN (SELECT q.id from (#{user_has_access.to_sql}) q ) OR
|
||||||
id IN (SELECT q.id from (#{Forum.public.to_sql}) q )")
|
id IN (SELECT q.id from (#{Forum.public_forums.to_sql}) q )")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Post < ActiveRecord::Base
|
||||||
|
|
||||||
attr_protected :id, :updated_at, :created_at, :votes, :user_id
|
attr_protected :id, :updated_at, :created_at, :votes, :user_id
|
||||||
|
|
||||||
scope :basic, :include => [{:user => [:team, :profile]}, :topic]
|
scope :basic, -> {includes([{:user => [:team, :profile]}, :topic])}
|
||||||
|
|
||||||
validates_presence_of :topic, :user
|
validates_presence_of :topic, :user
|
||||||
validates_length_of :text, :in => 1..10000
|
validates_length_of :text, :in => 1..10000
|
||||||
|
|
|
@ -183,7 +183,7 @@ class User < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def banned? type = Ban::TYPE_SITE
|
def banned? type = Ban::TYPE_SITE
|
||||||
Ban.first :conditions => ["expiry > UTC_TIMESTAMP() AND user_id = ? AND ban_type = ?", self.id, type]
|
Ban.where("expiry > UTC_TIMESTAMP() AND user_id = ? AND ban_type = ?", self.id, type).exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin?
|
def admin?
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<% if cuser %>
|
<% if cuser %>
|
||||||
<%= link_to_function icon('comment'), "QuoteText(#{comment.id}, 'comments')" %>
|
<%= link_to '#', data:{on: :click, call: 'QuoteText',args: "#{comment.id}, 'comments'"} >
|
||||||
<% if comment.can_update? cuser %>
|
<% if comment.can_update? cuser %>
|
||||||
<%= link_to icon('pencil'), edit_comment_path(comment) %>
|
<%= link_to icon('pencil'), edit_comment_path(comment) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -69,7 +69,8 @@
|
||||||
|
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<% if post.topic.posts.build.can_create? cuser %>
|
<% if post.topic.posts.build.can_create? cuser %>
|
||||||
<%= link_to_function 'Quote Reply', "QuoteText(#{post.id}); $('#reply').fadeIn('slow')", class: 'button tiny' %>
|
<%= # link_to_function 'Quote Reply', "QuoteText(#{post.id}); $('#reply').fadeIn('slow') ", class: 'button tiny' %>
|
||||||
|
<%= link_to '#', data:{on: :click, call: 'QuoteText', args: "#{post.id}"}, class: 'button tiny' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if post.can_update? cuser %>
|
<% if post.can_update? cuser %>
|
||||||
<%= link_to 'Edit', edit_post_path(post), class: 'button tiny' %>
|
<%= link_to 'Edit', edit_post_path(post), class: 'button tiny' %>
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<% if @newpost.can_create? cuser %>
|
<% if @newpost.can_create? cuser %>
|
||||||
<%= link_to_function 'Fast Reply', "$('#reply').fadeIn('slow')", class: 'button' %>
|
<%= link_to 'Fast Reply', "#", class: 'button fastReply' %>
|
||||||
<%= link_to 'Reply', new_post_path(@newpost, id: @topic), class: 'button' %>
|
<%= link_to 'Reply', new_post_path(@newpost, id: @topic), class: 'button' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @topic.can_update? cuser %>
|
<% if @topic.can_update? cuser %>
|
||||||
|
|
Loading…
Reference in a new issue