idk, lots
This commit is contained in:
11
Gemfile
11
Gemfile
@@ -2,28 +2,22 @@ source 'https://rubygems.org'
|
|||||||
|
|
||||||
gem 'rails', '3.2.12'
|
gem 'rails', '3.2.12'
|
||||||
|
|
||||||
# Bundle edge Rails instead:
|
|
||||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
|
||||||
|
|
||||||
gem 'sqlite3'
|
gem 'sqlite3'
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'therubyracer'
|
gem 'therubyracer'
|
||||||
gem 'bcrypt-ruby', '~> 3.0.0' # To use ActiveModel has_secure_password
|
gem 'bcrypt-ruby', '~> 3.0.0' # To use ActiveModel's has_secure_password
|
||||||
gem 'simple_form'
|
gem 'simple_form'
|
||||||
gem 'sanitize'
|
gem 'sanitize'
|
||||||
gem 'github-markdown'
|
gem 'github-markdown'
|
||||||
gem 'hirb' #pretty console output
|
gem 'hirb' #pretty console output
|
||||||
gem 'rb-readline', '~> 0.4.2'
|
gem 'rb-readline', '~> 0.4.2'
|
||||||
|
gem 'rest-client'
|
||||||
|
|
||||||
# Gems used only for assets and not required
|
# Gems used only for assets and not required
|
||||||
# in production environments by default.
|
# in production environments by default.
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'sass-rails', '~> 3.2.3'
|
gem 'sass-rails', '~> 3.2.3'
|
||||||
gem 'coffee-rails', '~> 3.2.1'
|
gem 'coffee-rails', '~> 3.2.1'
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
|
||||||
# gem 'therubyracer', :platforms => :ruby
|
|
||||||
|
|
||||||
gem 'uglifier', '>= 1.0.3'
|
gem 'uglifier', '>= 1.0.3'
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -31,6 +25,7 @@ group :development do
|
|||||||
gem 'webrick'
|
gem 'webrick'
|
||||||
gem 'better_errors'
|
gem 'better_errors'
|
||||||
gem 'binding_of_caller'
|
gem 'binding_of_caller'
|
||||||
|
gem 'rails-erd'
|
||||||
end
|
end
|
||||||
|
|
||||||
# To use Jbuilder templates for JSON
|
# To use Jbuilder templates for JSON
|
||||||
|
|||||||
11
Gemfile.lock
11
Gemfile.lock
@@ -36,6 +36,7 @@ GEM
|
|||||||
binding_of_caller (0.7.1)
|
binding_of_caller (0.7.1)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
builder (3.0.4)
|
builder (3.0.4)
|
||||||
|
choice (0.1.6)
|
||||||
coderay (1.0.9)
|
coderay (1.0.9)
|
||||||
coffee-rails (3.2.2)
|
coffee-rails (3.2.2)
|
||||||
coffee-script (>= 2.2.0)
|
coffee-script (>= 2.2.0)
|
||||||
@@ -81,6 +82,11 @@ GEM
|
|||||||
activesupport (= 3.2.12)
|
activesupport (= 3.2.12)
|
||||||
bundler (~> 1.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.2.12)
|
railties (= 3.2.12)
|
||||||
|
rails-erd (1.1.0)
|
||||||
|
activerecord (>= 3.0)
|
||||||
|
activesupport (>= 3.0)
|
||||||
|
choice (~> 0.1.6)
|
||||||
|
ruby-graphviz (~> 1.0.4)
|
||||||
railties (3.2.12)
|
railties (3.2.12)
|
||||||
actionpack (= 3.2.12)
|
actionpack (= 3.2.12)
|
||||||
activesupport (= 3.2.12)
|
activesupport (= 3.2.12)
|
||||||
@@ -93,6 +99,9 @@ GEM
|
|||||||
rdoc (3.12.2)
|
rdoc (3.12.2)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
ref (1.0.4)
|
ref (1.0.4)
|
||||||
|
rest-client (1.6.7)
|
||||||
|
mime-types (>= 1.16)
|
||||||
|
ruby-graphviz (1.0.9)
|
||||||
sanitize (2.0.3)
|
sanitize (2.0.3)
|
||||||
nokogiri (>= 1.4.4, < 1.6)
|
nokogiri (>= 1.4.4, < 1.6)
|
||||||
sass (3.2.9)
|
sass (3.2.9)
|
||||||
@@ -135,7 +144,9 @@ DEPENDENCIES
|
|||||||
hirb
|
hirb
|
||||||
jquery-rails
|
jquery-rails
|
||||||
rails (= 3.2.12)
|
rails (= 3.2.12)
|
||||||
|
rails-erd
|
||||||
rb-readline (~> 0.4.2)
|
rb-readline (~> 0.4.2)
|
||||||
|
rest-client
|
||||||
sanitize
|
sanitize
|
||||||
sass-rails (~> 3.2.3)
|
sass-rails (~> 3.2.3)
|
||||||
simple_form
|
simple_form
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 9.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 4.0 KiB |
BIN
app/assets/images/logo_old.png
Normal file
BIN
app/assets/images/logo_old.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
app/assets/images/sel_arr.png
Normal file
BIN
app/assets/images/sel_arr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 168 B |
@@ -9,4 +9,19 @@ and (max-width: 999px)
|
|||||||
display: block;
|
display: block;
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#head {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-content {
|
||||||
|
padding: 30px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editlink {
|
||||||
|
float: right;
|
||||||
|
opacity: 1;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ and (min-width: 0px) //TODO
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
background-image: url('/assets/bg.png');
|
background-image: url('/assets/bg.png');
|
||||||
background-color: #F0F2F2;
|
background-color: #F2F2F2;
|
||||||
color: #222;
|
color: #222;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,20 +54,14 @@ and (min-width: 0px) //TODO
|
|||||||
#head {
|
#head {
|
||||||
background-image: url('/assets/head_bg.png');
|
background-image: url('/assets/head_bg.png');
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1000px;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
#logo {
|
|
||||||
float: left;
|
|
||||||
margin: 10px;
|
|
||||||
max-width: 100%;
|
|
||||||
img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#userinfo {
|
#userinfo {
|
||||||
float: right;
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
img.avatar {
|
img.avatar {
|
||||||
border: 1px solid #000;
|
border: 1px solid #000;
|
||||||
@@ -134,9 +128,8 @@ and (min-width: 0px) //TODO
|
|||||||
}
|
}
|
||||||
|
|
||||||
#main-content {
|
#main-content {
|
||||||
padding: 30px;
|
padding: 30px 100px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1000px;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@@ -309,6 +302,11 @@ and (min-width: 0px) //TODO
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
text-indent: 0.01px;
|
||||||
|
text-overflow: "";
|
||||||
|
}
|
||||||
|
|
||||||
input , select, textarea {
|
input , select, textarea {
|
||||||
margin: 4px;
|
margin: 4px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -430,6 +428,7 @@ and (min-width: 0px) //TODO
|
|||||||
border: none;
|
border: none;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
|
display: inline-block;
|
||||||
&[disabled], &[disabled]:hover {
|
&[disabled], &[disabled]:hover {
|
||||||
box-shadow: 0 0 5px #ddd inset;
|
box-shadow: 0 0 5px #ddd inset;
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
/* General CSS for all screens */
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Global CSS for all screen sizes */
|
||||||
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class BlogpostsController < ApplicationController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
if mod?
|
if mod?
|
||||||
@post = Blogpost.new(params[:blogpost] ? params[:blogpost].slice(:title, :content) : {})
|
@post = Blogpost.new(params[:blogpost].slice(:title, :content))
|
||||||
@post.user_author = current_user
|
@post.user_author = current_user
|
||||||
if @post.save
|
if @post.save
|
||||||
redirect_to @post, notice: 'Post has been created.'
|
redirect_to @post, notice: 'Post has been created.'
|
||||||
|
|||||||
@@ -4,18 +4,40 @@ class ForumthreadsController < ApplicationController
|
|||||||
redirect_to forum_path(f.forumgroup, f)
|
redirect_to forum_path(f.forumgroup, f)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@thread = Forumthread.find(params[:id])
|
||||||
|
render text: @thread.content
|
||||||
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@forum = Forum.find(params[:id])
|
@forum = Forum.find(params[:id])
|
||||||
if @forum && current_user && (@forum.group.role_read.nil? || @forum.group.role_read <= current_user.role) && (@forum.role_read.nil? || @forum.role_read <= current_user.role)
|
if @forum && current_user && (@forum.group.role_read.nil? || @forum.group.role_read <= current_user.role) && (@forum.role_read.nil? || @forum.role_read <= current_user.role)
|
||||||
@thread = Forumthread.new(forum: @forum)
|
@thread = Forumthread.new(forum: @forum)
|
||||||
else
|
else
|
||||||
flash[:alert] = "You are not allowed to create a new thread here!"
|
flash[:alert] = "You are not allowed to create a new thread here!"
|
||||||
|
redirect_to @forum
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
flash[:alert] = "Not yet ;("
|
@forum = Forum.find(params[:id])
|
||||||
redirect_to forum_path(params[:id])
|
if (confirmed? && (@forum.group.role_read || Role.get(:default))<= current_user.role && (@forum.group.role_write || Role.get(:default))<= current_user.role && (@forum.role_read || Role.get(:default))<= current_user.role && (@forum.group.role_write || Role.get(:default))<= current_user.role)
|
||||||
|
@thread = Forumthread.new(mod? ? params[:forumthread] : params[:forumthread].slice(:title, :content))
|
||||||
|
@thread.user_author = current_user
|
||||||
|
@thread.forum = @forum
|
||||||
|
if @thread.save
|
||||||
|
flash[:notice] = "Thread created!"
|
||||||
|
redirect_to @thread
|
||||||
|
return
|
||||||
|
else
|
||||||
|
flash[:alert] = "Seomthing went wrong while creating your thread."
|
||||||
|
render "new"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
flash[:alert] = "You are not allowed to create a thread here!"
|
||||||
|
redirect_to @forum
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
app/controllers/statics_controller.rb
Normal file
9
app/controllers/statics_controller.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
class StaticsController < ApplicationController
|
||||||
|
|
||||||
|
def index
|
||||||
|
end
|
||||||
|
|
||||||
|
def donate
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -37,11 +37,18 @@ require 'open-uri'
|
|||||||
if current_user
|
if current_user
|
||||||
@user = User.find(params[:id])
|
@user = User.find(params[:id])
|
||||||
code = params[:code]
|
code = params[:code]
|
||||||
if @user && @user == current_user && code && @user.confirm_code == code
|
if @user && @user.is?(current_user) && code && @user.confirm_code == code
|
||||||
if @user.role == Role.get(:unconfirmed)
|
if @user.role == Role.get(:unconfirmed)
|
||||||
@user.role = Role.get :default
|
@user.role = Role.get :default
|
||||||
@user.save
|
if @user.save
|
||||||
flash[:notice] = "Registration confirmed."
|
flash[:notice] = "Registration mail confirmed."
|
||||||
|
redirect_to edit_user_path(@user)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
flash[:alert] = "Something went wrong, please contact us ingame."
|
||||||
|
redirect_to @user
|
||||||
|
return
|
||||||
|
end
|
||||||
elsif @user.role < Role.get(:unconfirmed)
|
elsif @user.role < Role.get(:unconfirmed)
|
||||||
flash[:alert] = "Your account has been banned or removed"
|
flash[:alert] = "Your account has been banned or removed"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ class Forumthread < ActiveRecord::Base
|
|||||||
belongs_to :user_author, class_name: "User", foreign_key: "user_author_id"
|
belongs_to :user_author, class_name: "User", foreign_key: "user_author_id"
|
||||||
belongs_to :user_editor, class_name: "User", foreign_key: "user_editor_id"
|
belongs_to :user_editor, class_name: "User", foreign_key: "user_editor_id"
|
||||||
|
|
||||||
attr_accessible :name, :content, :sticky, :locked, :user_author, :user_editor, :forum
|
attr_accessible :title, :content, :sticky, :locked, :user_author, :user_editor, :forum
|
||||||
|
|
||||||
validates_presence_of :name
|
validates_presence_of :title
|
||||||
validates_presence_of :content
|
validates_presence_of :content
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
name
|
title
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -13,13 +13,14 @@ class User < ActiveRecord::Base
|
|||||||
validates_length_of :password, in: 8..256, :on => :create
|
validates_length_of :password, in: 8..256, :on => :create
|
||||||
validates_length_of :name, in: 3..20
|
validates_length_of :name, in: 3..20
|
||||||
validates_length_of :about, maximum: 5000
|
validates_length_of :about, maximum: 5000
|
||||||
validates_length_of :ign, minimum: 2
|
validates_length_of :ign, minimum: 2, maximum: 100
|
||||||
|
|
||||||
validates :email, uniqueness: {case_sensitive: false}, format: {with: /^\S+@\S+\.[a-z]{2,}$/i, message: "That doesn't look like an email adress."}
|
validates :email, uniqueness: {case_sensitive: false}, format: {with: /^\S+@\S+\.[a-z]{2,}$/i, message: "That doesn't look like an email adress."}
|
||||||
validates :name, uniqueness: {case_sensitive: false}, format: {with: /^[a-z\d\-_ ]+$/i, message: "Allowed characters: a-z0-9, dashes, underscores and spaces"}
|
validates :name, uniqueness: {case_sensitive: false}, format: {with: /^[a-z\d\-_ ]+$/i, message: "Allowed characters: a-z0-9, dashes, underscores and spaces"}
|
||||||
validates :ign, uniqueness: {case_sensitive: false}, format: {with: /^[a-z\d_]+$/i, message: "That is probably not your username."}
|
validates :ign, uniqueness: {case_sensitive: false}, format: {with: /^[a-z\d_]+$/i, message: "That is probably not your username."}
|
||||||
|
|
||||||
validate :ign_is_not_skull, :ign_is_not_mojang, :ign_has_paid, :ign_has_correct_case
|
validate :ign_is_not_skull, :ign_has_paid, :ign_has_correct_case
|
||||||
|
validate :ign_is_not_mojang, on: :create
|
||||||
|
|
||||||
has_many :blogposts
|
has_many :blogposts
|
||||||
has_many :comments
|
has_many :comments
|
||||||
@@ -72,7 +73,11 @@ class User < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def ign_is_not_mojang
|
def ign_is_not_mojang
|
||||||
errors.add(:ign, "If that's really you, contact <a href='/users?role=staff'>us</a> in-game.") if ["mollstam", "carlmanneh", "MinecraftChick", "Notch", "jeb_", "xlson", "jonkagstrom", "KrisJelbring", "marc", "Marc_IRL", "MidnightEnforcer", "YoloSwag4Lyfe", "EvilSeph", "Grumm", "Dinnerbone", "geuder", "eldrone", "JahKob", "BomBoy", "MansOlson", "pgeuder", "91maan90", "vubui", "PoiPoiChen", "mamirm", "eldrone", "_tomcc"].include?(self.ign)
|
if self.ign.start_with?("mojang_secret_ign_")
|
||||||
|
self.ign = self.ign[18..-1]
|
||||||
|
else
|
||||||
|
errors.add(:ign, "If that's really you, contact <a href='/users?role=staff'>us</a> in-game.") if ["mollstam", "carlmanneh", "MinecraftChick", "Notch", "jeb_", "xlson", "jonkagstrom", "KrisJelbring", "marc", "Marc_IRL", "MidnightEnforcer", "YoloSwag4Lyfe", "EvilSeph", "Grumm", "Dinnerbone", "geuder", "eldrone", "JahKob", "BomBoy", "MansOlson", "pgeuder", "91maan90", "vubui", "PoiPoiChen", "mamirm", "eldrone", "_tomcc"].include?(self.ign)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def ign_has_paid
|
def ign_has_paid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%= button_to 'Make new Post', new_blogpost_path, method: "get", class: "btn blue" if mod? %>
|
<%= link_to 'Make new Post', new_blogpost_path, class: "btn blue" if mod? %>
|
||||||
<div id="posts">
|
<div id="posts">
|
||||||
<% @posts.each do |p| %>
|
<% @posts.each do |p| %>
|
||||||
<div class="post" id="post-<%= p.id %>">
|
<div class="post" id="post-<%= p.id %>">
|
||||||
|
|||||||
@@ -8,9 +8,7 @@
|
|||||||
|
|
||||||
<div class="forums">
|
<div class="forums">
|
||||||
<% group.forums.each do |f| %>
|
<% group.forums.each do |f| %>
|
||||||
<div class="forum">
|
<%= link_to f.name, f, class: "forum" %>
|
||||||
<%= link_to f.name, f %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<%= link_to "Forums", forums_path %> → <%= link_to @forum.group, @forum.group %> → <%= link_to @forum %>
|
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum %>
|
||||||
<h1><%= @forum.name %></h1>
|
<h1><%= @forum.name %></h1>
|
||||||
<%= link_to "New thread", new_forumthread_path, class: "btn blue" %>
|
<%= link_to "New thread", new_forumthread_path, class: "btn blue" %>
|
||||||
<div id="forum_threads">
|
<div id="forum_threads">
|
||||||
<% @threads.each do |thread| %>
|
<% @threads.each do |thread| %>
|
||||||
<div class="group" id="thread-<%= thread.id %>">
|
<div class="group" id="thread-<%= thread.id %>">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<%= thread.name %>
|
<%= link_to thread.title, forumthread_path(thread) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
<%= link_to @forum.group, @forum.group %> → <%= link_to @forum, @forum %> → New thread
|
<%= link_to @forum.group, forumgroup_path(@forum.group) %> → <%= link_to @forum, @forum %> → New thread
|
||||||
<h1>New thread</h1>
|
<h1>New thread</h1>
|
||||||
<%= simple_form_for @thread do |f|%>
|
<%= simple_form_for @thread do |f|%>
|
||||||
<div id="form_labels">
|
<div id="form_labels">
|
||||||
<%= f.label :title %>
|
<%= f.label :title %>
|
||||||
<%= f.label :sticky if mod? %>
|
|
||||||
<%= f.label :locked if mod? %>
|
|
||||||
<%= f.label :content, "Text" %>
|
<%= f.label :content, "Text" %>
|
||||||
</div>
|
</div>
|
||||||
<div id="form_inputs">
|
<div id="form_inputs">
|
||||||
<%= f.input :title, placeholder: "Title" %>
|
<%= f.input :title, placeholder: "Title" %>
|
||||||
<%= f.input :sticky, as: :select, collection: [["No", false], ["Yes", true]], include_blank: false if mod? %>
|
|
||||||
<%= f.input :locked, as: :select, collection: [["No", false], ["Yes", true]], include_blank: false if mod? %>
|
|
||||||
<%= f.input :content, placeholder: "Text" %>
|
<%= f.input :content, placeholder: "Text" %>
|
||||||
</div>
|
</div>
|
||||||
|
<% if mod? %>
|
||||||
|
<%= f.input :sticky %> <%= f.label :sticky %>
|
||||||
|
<%= f.input :locked %> <%= f.label :locked %>
|
||||||
|
<% end %>
|
||||||
<%= f.submit "Create forum", class: "btn blue" %><br>
|
<%= f.submit "Create forum", class: "btn blue" %><br>
|
||||||
Yea i know this is ugly :D
|
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
<div id="menu">
|
<div id="menu">
|
||||||
<ul>
|
<ul>
|
||||||
<%= link_to root_path do %><li>Home</li><% end %>
|
<%= link_to root_path do %><li>Home</li><% end %>
|
||||||
|
<%= link_to blogposts_path do %><li>Blog</li><% end %>
|
||||||
<%= link_to users_path do %><li>Users</li><% end %>
|
<%= link_to users_path do %><li>Users</li><% end %>
|
||||||
<%= link_to root_path do %><li>Info</li><% end %>
|
<%= link_to root_path do %><li>Info</li><% end %>
|
||||||
<%= link_to forums_path do %><li>Forums</li><% end %>
|
<%= link_to forums_path do %><li>Forums</li><% end %>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="form_inputs">
|
<div id="form_inputs">
|
||||||
<%= text_field_tag :email, nil, placeholder: "email@example.com" %>
|
<div><%= text_field_tag :email, nil, placeholder: "email@example.com" %></div>
|
||||||
<%= password_field_tag :password, nil, placeholder: "••••••" %>
|
<div><%= password_field_tag :password, nil, placeholder: "••••••" %></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= submit_tag "Log in", class: "btn blue" %>
|
<%= submit_tag "Log in", class: "btn blue" %>
|
||||||
|
|||||||
41
app/views/statics/donate.html.erb
Normal file
41
app/views/statics/donate.html.erb
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<h1>Donate</h1>
|
||||||
|
<h3>via PayPal</h3>
|
||||||
|
|
||||||
|
<p>Donating keeps us motivated to do all the hard work and pay our bills for new hardware, etc.</p>
|
||||||
|
<p>We appreciate every amount of donation but we do have two special ranks:</p>
|
||||||
|
<ul>
|
||||||
|
<li>$5 or more: Donator
|
||||||
|
<li>$20 or more: Donator+
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<h3>Perks for you</h3>
|
||||||
|
<p>For <i>Donator</i> and <i>Donator+</i></p>
|
||||||
|
<ul>
|
||||||
|
<li>The warm feeling of donating and a big thank you!
|
||||||
|
<li>commands <i>/speed</i> and <i>/enchant</i>
|
||||||
|
<li>A $ suffix in chat (bold for Donor+)
|
||||||
|
<li>The name over your head gets a special color
|
||||||
|
<li>A sign with your name & head at <i>/warp donors</i>
|
||||||
|
</ul>
|
||||||
|
<div class="donations">
|
||||||
|
<div class="donation">
|
||||||
|
<h1>Donate to Redstone Sheep</h1>
|
||||||
|
<h4>Sheep is our admin. He fixes everything & keeps the server running.</h4>
|
||||||
|
<form target="_top" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||||
|
<input name="custom" type="text" placeholder="Your Minecraft name" value="<%= current_user.try(:ign) %>">
|
||||||
|
<input value="_s-xclick" name="cmd" type="hidden">
|
||||||
|
<input value="HPWLQLL87GTHC" name="hosted_button_id" type="hidden">
|
||||||
|
<input value="Donate" name="Donate" type="submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="donation">
|
||||||
|
<h1>Donate to PanFritz</h1>
|
||||||
|
<h4>Pan hosts the Server.</h4>
|
||||||
|
<form target="_top" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||||
|
<input name="custom" type="text" placeholder="Your Minecraft name" value="<%= current_user.try(:ign) %>">
|
||||||
|
<input value="_s-xclick" name="cmd" type="hidden">
|
||||||
|
<input value="SW8TJLDK9FX3W" name="hosted_button_id" type="hidden">
|
||||||
|
<input value="Donate" name="Donate" type="submit">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
4
app/views/statics/index.html.erb
Normal file
4
app/views/statics/index.html.erb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<div id="delete_me" class="delete_me"> <!-- delete this div -->
|
||||||
|
<h1>The loneliest page in the world</h1>
|
||||||
|
<iframe width="420" height="315" src="//www.youtube.com/embed/N3O20EOE-p4?theme=light&color=red" frameborder="0" allowfullscreen></iframe>
|
||||||
|
</div>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<% if !@user.twitter.blank? %>
|
<% if !@user.twitter.blank? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Twitter</td>
|
<td>Twitter</td>
|
||||||
<td><%= link_to @user.twitter, "https://twitter.com/#{CGI.escape(@user.twitter)}", :target => "_blank" %></td>
|
<td><%= link_to "@#{@user.twitter}", "https://twitter.com/#{CGI.escape(@user.twitter)}", :target => "_blank" %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -4,6 +4,13 @@ Site::Application.routes.draw do
|
|||||||
resources :comments
|
resources :comments
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :statics, only: [:index, :donate], path: '' do
|
||||||
|
collection do
|
||||||
|
get 'donate'
|
||||||
|
get 'index'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
resources :roles
|
resources :roles
|
||||||
|
|
||||||
resources :users do
|
resources :users do
|
||||||
@@ -16,7 +23,7 @@ Site::Application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :forums, path: 'forums', as: 'forums' do
|
resources :forums, path: 'forums' do
|
||||||
collection do
|
collection do
|
||||||
resources :forumgroups, path: 'groups'
|
resources :forumgroups, path: 'groups'
|
||||||
end
|
end
|
||||||
@@ -34,5 +41,5 @@ Site::Application.routes.draw do
|
|||||||
|
|
||||||
post 'paypal' => 'paypal#create'
|
post 'paypal' => 'paypal#create'
|
||||||
|
|
||||||
root to: 'blogposts#index'
|
root to: 'statics#index'
|
||||||
end
|
end
|
||||||
@@ -32,7 +32,7 @@ deleted_user = User.create!(
|
|||||||
|
|
||||||
User.create!(
|
User.create!(
|
||||||
name: "Redstone Sheep",
|
name: "Redstone Sheep",
|
||||||
ign: "noobkackboon",
|
ign: "redstone_sheep",
|
||||||
email: "theredstonesheep@gmail.com",
|
email: "theredstonesheep@gmail.com",
|
||||||
about: "Hi, I am the admin :)",
|
about: "Hi, I am the admin :)",
|
||||||
password: "123456789",
|
password: "123456789",
|
||||||
|
|||||||
11
jd-gui.cfg
Normal file
11
jd-gui.cfg
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[Manifest]
|
||||||
|
Version=2
|
||||||
|
[RecentDirectories]
|
||||||
|
LoadPath=/home/moo/.minecraft/versions/13w47e/
|
||||||
|
SavePath=/home/moo/.minecraft/versions/13w47e/src/
|
||||||
|
[Decompilation]
|
||||||
|
LastUri=
|
||||||
|
[GUI]
|
||||||
|
MainWindowPosition=626,132 872x666 Maximized
|
||||||
|
[RecentFiles]
|
||||||
|
Path0=/home/moo/.minecraft/versions/13w47e/13w47e.jar
|
||||||
9
redstoner.sublime-project
Normal file
9
redstoner.sublime-project
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"folders":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"follow_symlinks": true,
|
||||||
|
"path": "/home/moo/redstoner/rails/site"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
1275
redstoner.sublime-workspace
Normal file
1275
redstoner.sublime-workspace
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user