a TON of bugfixes and new features
This commit is contained in:
12
app/views/application/_mdhelp.html.erb
Normal file
12
app/views/application/_mdhelp.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="markdown-help">
|
||||
<blockquote>> quote</blockquote> |
|
||||
_underline_ |
|
||||
<i>*italic*</i> |
|
||||
<b>**bold**</b> |
|
||||
<code>`code`</code> |
|
||||
<mark>==mark==</mark> |
|
||||
[<a>link</a>](https://example.com)
|
||||
|
||||
<%= link_to "more...", "/info/1", target: "_blank", class: "right", tabindex: -1 %>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
@@ -1,8 +1,8 @@
|
||||
<h1>Edit post</h1>
|
||||
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
|
||||
<%= simple_form_for @post do |f|%>
|
||||
<%= f.input :title, :label => false %>
|
||||
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
|
||||
<%= form_for @post do |f|%>
|
||||
<%= f.text_field :title %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, class: "vertical" %>
|
||||
<p><%= f.submit "Update Post", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete post", @post, method: "delete", data: {confirm: "Delete post & comments forever?"}, class: "btn red right" %></p>
|
||||
@@ -3,9 +3,9 @@
|
||||
<div id="posts">
|
||||
<% @posts.each do |p| %>
|
||||
<div class="item-group with-avatar" id="post-<%= p.id %>">
|
||||
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
||||
<%= link_to(image_tag(p.author.avatar_url(64), class: "avatar"), p.author, title: p.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: p.author } %> <time><%= link_to p.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||
<span class="comment-counter">
|
||||
<%= link_to pluralize(p.comments.count, "Comment"), p %>
|
||||
</span>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<h1>New Post</h1>
|
||||
<%= simple_form_for @post do |f|%>
|
||||
<%= f.input :title, placeholder: "Title" %>
|
||||
<p id="markdown-note">Note: You can use <%= link_to "Markdown", "https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet", target: "_blank" %>!</p>
|
||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
|
||||
<%= form_for @post do |f|%>
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "vertical"} %>
|
||||
<p><%= f.submit "Create Post", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<%= link_to "News", blogposts_path %> → <%= link_to @post.title %>
|
||||
<div class="item-group post with-avatar" id="post-<%= @post.id %>">
|
||||
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
||||
<%= link_to(image_tag(@post.author.avatar_url(64), class: "avatar"), @post.author, title: @post.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: @post.author } %> <time><%= link_to @post.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||
<%= link_to "edit", edit_blogpost_path(@post.id), class: "editlink" if mod? %>
|
||||
</div>
|
||||
<div class="items">
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div class="item-group with-avatar comment" id="comment-<%= c.id %>">
|
||||
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
|
||||
<div class="header <%= "op" if c.author.is?(c.blogpost.author) %>">
|
||||
<%= render partial: "users/username", locals: { user: c.author } %> <time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%m"), [c.blogpost, c] %></time>
|
||||
<%= link_to(image_tag(c.author.avatar_url(64), class: "avatar"), c.author, title: c.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: c.author } %>
|
||||
<time><%= link_to c.created_at.strftime("%e. %b %Y, %H:%M"), "#comment-#{c.id}" %></time>
|
||||
|
||||
<%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c), class: "editlink" if (mod? || c.author.is?(current_user)) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<% if current_user %>
|
||||
<h3>New comment</h3>
|
||||
<%= simple_form_for [@post, @comment] do |f| %>
|
||||
<p><blockquote>> quote</blockquote> | _underline_ | <i>*italic*</i> | <b>**bold**</b> | <code>`code`</code> | <mark>==mark==</mark> | <a>[link](https://example.com)</a>
|
||||
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment", input_html: {class: "comment"} %>
|
||||
<%= f.submit class: "btn blue" %>
|
||||
<%= form_for [@post, @comment] do |f| %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Comment", class: "comment" %>
|
||||
<p><%= f.submit class: "btn blue" %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -1,7 +1,8 @@
|
||||
<h1>Edit comment</h1>
|
||||
|
||||
<%= simple_form_for [@comment.blogpost, @comment] do |f| %>
|
||||
<%= f.input :content, label: false, as: "text", placeholder: "Comment" %>
|
||||
<%= form_for [@comment.blogpost, @comment] do |f| %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Comment" %>
|
||||
<p><%= f.submit "Update Comment", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete comment", [@comment.blogpost, @comment] , method: "delete", data: {confirm: "Delete comment forever?"}, class: "btn red right" %></p>
|
||||
@@ -32,6 +32,6 @@
|
||||
<td><%= f.select :role_write_id, role_selection, include_blank: false %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p><%= f.submit "Update group", class: "btn blue" %></p>
|
||||
<p><%= f.submit "Update group", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete group", @post, :method => "delete", data: {confirm: "Delete group?\nForums + Threads will not be accessible!"}, class: "btn red right" %></p>
|
||||
@@ -1,15 +1,15 @@
|
||||
<div id="forum_groups">
|
||||
<% @groups.each do |group| %>
|
||||
<div class="item-group" id="forum-<%= group.id %>">
|
||||
<div class="item-group" id="group-<%= group.id %>">
|
||||
<div class="header">
|
||||
<%= group.name %>
|
||||
<%= link_to "edit", edit_forumgroup_path(group), class: "editlink" if admin? %>
|
||||
</div>
|
||||
|
||||
<div class="items bold">
|
||||
<% group.forums.each do |f| %>
|
||||
<% group.forums.sort_by{ |f| f.position || 0 }.each do |f| %>
|
||||
<% if f.can_read?(current_user) %>
|
||||
<%= link_to f.name, f, class: "item" %>
|
||||
<%= link_to f.name, f, id: "forum-#{f.id}", class: "item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -21,5 +21,5 @@
|
||||
<% if admin? %>
|
||||
<%= link_to "New group", new_forumgroup_path, class: "btn blue" %>
|
||||
<% elsif mod? %>
|
||||
<%= link_to "New group", nil, class: "btn blue", disabled: true %>
|
||||
<%= link_to "New group", "#", class: "btn blue", disabled: true %>
|
||||
<% end %>
|
||||
@@ -7,9 +7,9 @@
|
||||
<div id="forum_groups">
|
||||
<% @threads.each do |thread| %>
|
||||
<div class="item-group with-avatar" id="thread-<%= thread.id %>">
|
||||
<%= link_to(image_tag(thread.author.avatar_url(64), class: "avatar"), thread.author, title: thread.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: thread.author } %> <time><%= link_to thread.created_at.strftime("%e. %b %Y, %H:%m"), thread %></time>
|
||||
<%= link_to(image_tag(thread.author.avatar_url(64), class: "avatar"), thread.author, title: thread.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: thread.author } %> <time><%= link_to thread.created_at.strftime("%e. %b %Y, %H:%M"), thread %></time>
|
||||
<span class="comment-counter">
|
||||
<%= link_to pluralize(thread.replies.count, "Reply"), thread %>
|
||||
</span>
|
||||
|
||||
@@ -11,12 +11,21 @@
|
||||
<td><%= f.label :locked %></td>
|
||||
<td><%= f.check_box :locked %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= f.label :forum_id, "Move thread" %></td>
|
||||
<%
|
||||
forums = []
|
||||
Forum.all.sort_by{ |f| f.forumgroup.position || 0 }.each do |f|
|
||||
forums << ["#{f.forumgroup.name} → #{f.name}", f.id]
|
||||
end
|
||||
%>
|
||||
<td><%= f.select :forum_id, forums %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<div id="form_inputs">
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
</div>
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<p><%= f.submit "Update thread", class: "btn blue" %></p>
|
||||
<p><%= f.submit "Update thread", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<%= button_to "Delete thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %>
|
||||
@@ -13,9 +13,8 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<div id="form_inputs">
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
</div>
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<%= f.hidden_field :forum_id %>
|
||||
<p><%= f.submit "Create thread", class: "btn blue" %></p>
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
<%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread %>
|
||||
<div class="item-group thread with-avatar" id="thread-<%= @thread.id %>">
|
||||
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%m"), p %></time>
|
||||
<%= link_to(image_tag(@thread.author.avatar_url(64), class: "avatar"), @thread.author, title: @thread.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: @thread.author } %> <time><%= link_to @thread.created_at.strftime("%e. %b %Y, %H:%M"), p %></time>
|
||||
<%= link_to "edit", edit_forumthread_path( @thread), class: "editlink" if (@thread.author.is?(current_user) || mod?) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
<% if @thread.edited? %>
|
||||
<div class="item edited">
|
||||
Last edited <time><%= @thread.updated_at.strftime("%e. %b %Y, %H:%M") %></time> by <%= link_to @thread.editor.name, @thread.editor %>.
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="item content">
|
||||
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
|
||||
<%= render_md(@thread.content).html_safe %>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<h1>Edit Info</h1>
|
||||
<%= form_for @info do |f|%>
|
||||
<%= f.text_field :title, :label => false %>
|
||||
<%= f.text_area :content, :label => false, input_html: {class: "full-width vertical"} %>
|
||||
<%= f.text_field :title%>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, class: "vertical" %>
|
||||
<p><%= f.submit "Update Info", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete Info", @info, method: "delete", data: {confirm: "Delete Info forever?"}, class: "btn red right" %></p>
|
||||
@@ -1,9 +1,9 @@
|
||||
<h1>Info</h1>
|
||||
<% if mod? %>
|
||||
<%= link_to "New Info", new_info_path, class: "btn blue" %>
|
||||
<% end %>
|
||||
<ul>
|
||||
<% @info.each do |info| %>
|
||||
<li><%= link_to info.title, info %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if mod? %>
|
||||
<%= link_to "New Info", new_info_path, class: "btn blue" %>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -1,6 +1,7 @@
|
||||
<h1>New Info</h1>
|
||||
<%= form_for @info, url: info_index_path do |f|%>
|
||||
<%= f.text_field :title, placeholder: "Title" %>
|
||||
<%= f.text_area :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Text", class: "vertical" %>
|
||||
<p><%= f.submit "Create Info", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
@@ -1,3 +1,5 @@
|
||||
<%= link_to "Info", info_index_path %> → <%= @info.title %>
|
||||
<%= link_to "Edit Info", edit_info_path(@info), class: "btn blue right" %>
|
||||
<div class="clear"></div>
|
||||
<h1><%= @info.title %></h1>
|
||||
<div class="post"><%= render_md(@info.content).html_safe %></div>
|
||||
12
app/views/layouts/_footer.html.erb
Normal file
12
app/views/layouts/_footer.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<% users = User.select{|u| u.online?} %>
|
||||
<div id="footer">
|
||||
<div id="online-users">
|
||||
<p title="Seen within the last 5 minutes">Users currently online: <%= users.length %></p>
|
||||
<% users.each do |u| %>
|
||||
<%= render partial: "users/username", locals: { user: u } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="note">
|
||||
Website made by <a href="/users/2">Redstone Sheep</a> with design by <a href="/users/12">ColoArtz</a>.
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,11 +11,12 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="mobile-info">We don't have a mobile style yet. It might look shitty.<br>Tip: Hold your device in landscape mode.</div>
|
||||
<%= render "/layouts/head" %>
|
||||
<%= render partial: "/layouts/head" %>
|
||||
<div id="main-content">
|
||||
<%= "<div id='alert' class='flash'>#{alert}</div>".html_safe if alert %>
|
||||
<%= "<div id='notice' class='flash'>#{notice}</div>".html_safe if notice %>
|
||||
<%= "<div class='flash alert'>#{alert}</div>".html_safe if alert %>
|
||||
<%= "<div class='flash notice'>#{notice}</div>".html_safe if notice %>
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= render partial: "/layouts/footer" %>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,29 +1,39 @@
|
||||
<p><%= @user.name %> has registered on redstoner.</p>
|
||||
<p>
|
||||
<table style="border: 1px solid black; border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="border:1px solid black;">IGN</td>
|
||||
<td style="border:1px solid black;"><%= @user.ign %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">email</td>
|
||||
<td style="border:1px solid black;"><%= @user.email %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">Time</td>
|
||||
<td style="border:1px solid black;"><%= @user.created_at %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">IP</td>
|
||||
<td style="border:1px solid black;"><%= @user.last_ip %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<% if @mcpw %>
|
||||
<p>
|
||||
<font color="red">
|
||||
<b>USER IS AN IDIOT!</b>
|
||||
</font>
|
||||
</p>
|
||||
<% end %>
|
||||
<h1>'<%= @user.name %>' has registered on redstoner.</h1>
|
||||
<table style="border: 1px solid black; border-collapse:collapse;">
|
||||
<tr>
|
||||
<td style="border:1px solid black;">IGN</td>
|
||||
<td style="border:1px solid black;"><%= @user.ign %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">UUID</td>
|
||||
<td style="border:1px solid black;"><%= @user.uuid %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">email</td>
|
||||
<td style="border:1px solid black;"><%= @user.email %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">Time</td>
|
||||
<td style="border:1px solid black;"><%= @user.created_at.strftime("%e. %b %Y, %H:%M") %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">Role</td>
|
||||
<td style="border:1px solid black;"><%= @user.role %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">IP</td>
|
||||
<td style="border:1px solid black;"><%= @user.last_ip %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border:1px solid black;">Idiot</td>
|
||||
<% if @mcpw %>
|
||||
<td style="border:3px solid red; color: red; font-weight: bold">YES! (used his mc pass) >_<</td>
|
||||
<% else %>
|
||||
<td style="border:1px solid black;">no</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<% debug = @user.attributes.dup %>
|
||||
<% debug.delete("password_digest") %>
|
||||
<p><small style="font-size: 0.7em; color: #aaa;">Debug info:<br><%= debug %></small>
|
||||
@@ -3,22 +3,17 @@
|
||||
Hi <%= @user.name %>!
|
||||
|
||||
<p>Thank you for registering on Redstoner.com!</p>
|
||||
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false) %> your email address.</p>
|
||||
<p>To use your account, you need to <%= link_to "confirm", confirm_user_path(@user, code: @user.email_token, only_path: false), style: "text-decoration: none; color: #4096EE;" %> your email address.</p>
|
||||
|
||||
<div>
|
||||
|
||||
<% if @mcpw %>
|
||||
<div>
|
||||
<p>
|
||||
<font color="red">
|
||||
<b>NEVER USE THE SAME PASSWORD TWICE!</b>
|
||||
</font>
|
||||
</p>
|
||||
<p>
|
||||
<font color="red">
|
||||
You used your minecraft password on our website. <b>Do not do that</b>. It's just stupid.
|
||||
</font>
|
||||
</p>
|
||||
<div style="background: #500; color: #f00; padding: 0.5em 1em;">
|
||||
<h2>WARNING!</h2>
|
||||
<p>Never use the same password on different sites, that is how accers gain access to accounts.</p>
|
||||
<p>You have used your minecraft password on our website.<br>
|
||||
<b>Don't do that</b>! It's stupid.</p>
|
||||
<p>If you are using this password elsewhere, change it. Now.</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -30,7 +25,7 @@
|
||||
</div>
|
||||
<p></p>
|
||||
|
||||
<p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_path(role: "staff", only_path: false) %> in-game.</p>
|
||||
<p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_path(role: "staff", only_path: false), style: "text-decoration: none; color: #4096EE;" %> in-game.</p>
|
||||
<p>Your Redstoner team</p>
|
||||
|
||||
</div>
|
||||
@@ -38,6 +33,11 @@
|
||||
<div style="background: none repeat scroll 0% 0% rgb(68, 68, 68); width: 100%; padding: 2em; color: rgb(255, 255, 255); margin:auto; text-align: center;">
|
||||
<p><i>If you did not sign up on redstoner.com you can safely ignore this email!</i>
|
||||
</p>
|
||||
<p>You can contact us via: <%= link_to "Website", "root_path" %> | <%= link_to "Twitter", "https://twitter.com/RedstonerServer" %> | <%= link_to "Google+", "https://google.com/+Redstoner" %> | <%= link_to "Email", "mailto:redstonerserver+website@gmail.com" %></p>
|
||||
<p>You can contact us via:
|
||||
<%= link_to "Website", "root_path", style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Twitter", "https://twitter.com/RedstonerServer", style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Google+", "https://google.com/+Redstoner", style: "text-decoration: none; color: #4096EE;" %> |
|
||||
<%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,21 +24,30 @@
|
||||
<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) %>">
|
||||
|
||||
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||
<% if current_user %>
|
||||
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
||||
<% else %>
|
||||
<input name="custom" type="text" placeholder="Your Minecraft name">
|
||||
<% end %>
|
||||
<input value="_s-xclick" name="cmd" type="hidden">
|
||||
<input value="HPWLQLL87GTHC" name="hosted_button_id" type="hidden">
|
||||
<input value="Donate" name="Donate" type="submit" class="btn blue">
|
||||
<input value="Donate" name="Donate" type="submit" class="btn dark donate paypal">
|
||||
</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) %>">
|
||||
<form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr">
|
||||
<% if current_user %>
|
||||
<input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>">
|
||||
<% else %>
|
||||
<input name="custom" type="text" placeholder="Your Minecraft name">
|
||||
<% end %>
|
||||
<input value="_s-xclick" name="cmd" type="hidden">
|
||||
<input value="SW8TJLDK9FX3W" name="hosted_button_id" type="hidden">
|
||||
<input value="Donate" name="Donate" type="submit" class="btn blue">
|
||||
<input value="Donate" name="Donate" type="submit" class="btn dark donate paypal">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,4 +1,3 @@
|
||||
<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>
|
||||
<h1>Redstoner</h1>
|
||||
<p>We need some text here</p>
|
||||
<p>Any suggestions?</p>
|
||||
@@ -1,7 +1,9 @@
|
||||
<div class="item-group thread-reply with-avatar" id="reply-<%= reply.id %>">
|
||||
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
||||
<div class="header">
|
||||
<%= render partial: "users/username", locals: { user: reply.author } %> <time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%m"), "#reply-#{reply.id}" %></time>
|
||||
<%= link_to(image_tag(reply.author.avatar_url(64), class: "avatar"), reply.author, title: reply.author.ign) %>
|
||||
<%= render partial: "users/username", locals: { user: reply.author } %>
|
||||
<time><%= link_to reply.created_at.strftime("%e. %b %Y, %H:%M"), "#reply-#{reply.id}" %></time>
|
||||
|
||||
<%= link_to "edit", edit_forumthread_threadreply_path(reply.thread, reply), class: "editlink" if mod? || reply.thread.author.is?(current_user) %>
|
||||
</div>
|
||||
<div class="items">
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<%= link_to @reply.thread.forum.group, forumgroup_path(@reply.thread.forum.group) %> → <%= link_to @reply.thread.forum, @reply.thread.forum %> → <%= link_to @reply.thread %> → Edit reply
|
||||
<h1>Edit reply</h1>
|
||||
<%= form_for [@reply.thread, @reply] do |f| %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :content, placeholder: "Text" %>
|
||||
<p><%= f.submit "Reply", class: "btn blue" %></p>
|
||||
<% end %>
|
||||
<p><%= f.submit "Reply", class: "btn blue left" %></p>
|
||||
<% end %>
|
||||
<p><%= button_to "Delete reply", [@reply.thread, @reply], method: "delete", data: {confirm: "Delete reply forever?"}, class: "btn red right" %></p>
|
||||
@@ -1,13 +1,8 @@
|
||||
<h1>Change password</h1>
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<div id="form_labels">
|
||||
|
||||
</div>
|
||||
<div id="form_inputs">
|
||||
<%= f.input :current_password, :label => false %>
|
||||
<%= f.input :email, :label => false %>
|
||||
<%= f.input :password, :label => false %>
|
||||
<%= f.input :password_confirmation, :label => false %>
|
||||
</div>
|
||||
<%= form_for @user do |f| %>
|
||||
<%= f.text_field :current_password %>
|
||||
<%= f.text_field :email %>
|
||||
<%= f.text_field :password %>
|
||||
<%= f.text_field :password_confirmation %>
|
||||
<% end %>
|
||||
@@ -1,34 +1,27 @@
|
||||
<% def can_edit?; (@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role); end %>
|
||||
<%
|
||||
def can_edit?
|
||||
(@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role)
|
||||
end
|
||||
%>
|
||||
|
||||
<%= link_to (@user.is?(current_user) ? "Your profile" : @user.name), current_user %> → Edit
|
||||
<h1>Edit profile</h1>
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<%= form_for @user do |f| %>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><%= image_tag @user.avatar_url(128), :class => "user-avatar avatar", :alt => "avatar" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Display name</td>
|
||||
<td>
|
||||
<%= f.input :name, :label => false, disabled: !can_edit? %>
|
||||
<%= f.text_field :name, disabled: !can_edit? %>
|
||||
</td>
|
||||
</tr>
|
||||
<% if mod? %>
|
||||
<tr>
|
||||
<td>In-game name</td>
|
||||
<td>
|
||||
<%= f.input :ign, :label => false, disabled: !(mod? && current_user.role >= @user.role) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Role</td>
|
||||
<td>
|
||||
<% if mod? && current_user.role >= @user.role %>
|
||||
<%= f.association :role, :label => false, :collection => Role.all_to(current_user.role), :include_blank => false %>
|
||||
<% else %>
|
||||
<%= f.input :role, label: false, disabled: true %>
|
||||
<%= f.select :role, Role.all_to(current_user.role) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -36,36 +29,39 @@
|
||||
<tr>
|
||||
<td>Skype username</td>
|
||||
<td>
|
||||
<%= f.input :skype, label: false, placeholder: "Skype username", disabled: !can_edit? %>
|
||||
<%= f.text_field :skype, placeholder: "Skype username", disabled: !can_edit? %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Show Skype to</td>
|
||||
<td>
|
||||
<%= f.input :skype_public, label: false, as: :select, collection: [["Staff only", false], ["All users", true]], include_blank: false, input_html: { disabled: !can_edit? } %>
|
||||
<%= f.select :skype_public, [["Staff only", false], ["All users", true]], {}, { disabled: !can_edit? } %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>YouTube username</td>
|
||||
<td>
|
||||
<%= f.input :youtube, :label => false, placeholder: "YouTube username", disabled: !can_edit? %>
|
||||
<%= f.text_field :youtube, placeholder: "YouTube username", disabled: !can_edit? %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Twitter username</td>
|
||||
<td>
|
||||
<%= f.input :twitter, :label => false, placeholder: "Twitter username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)) %>
|
||||
<%= f.text_field :twitter, placeholder: "Twitter username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)) %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>About you</td>
|
||||
<td>
|
||||
<%= f.input :about, :label => false, :input_html => {:class => "vertical"}, placeholder: "Tell us something about you...", disabled: !can_edit? %>
|
||||
<%= render partial: "mdhelp" %>
|
||||
<%= f.text_area :about, class: "vertical", placeholder: "Tell us something about you...", disabled: !can_edit? %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= f.submit "Save profile", class: "btn blue", disabled: (!@user.confirmed? && @user.is?(current_user)) %>
|
||||
|
||||
<p><%= f.submit "Save profile", class: "btn blue", disabled: (!@user.confirmed? && @user.is?(current_user)) %></p>
|
||||
|
||||
<% if !@user.confirmed? %>
|
||||
<% if @user.is?(current_user) %>
|
||||
<span class='red-alert'>Please confirm your email adress first!</span>
|
||||
@@ -73,5 +69,4 @@
|
||||
<span class='red-alert'>This user has not confirmed his email!</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to "Cancel", @user, class: "btn red right" %>
|
||||
<% end %>
|
||||
@@ -11,6 +11,7 @@
|
||||
<%= link_to "revert", unbecome_users_path, :class => "btn blue" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<% if @user.banned? %>
|
||||
<span class="user-banned">This user is banned!</span>
|
||||
@@ -63,7 +64,7 @@
|
||||
<% end %>
|
||||
<tr>
|
||||
<td>Joined</td>
|
||||
<td><%= @user.created_at.strftime("%e. %b %Y, %H:%m") %></td>
|
||||
<td><%= @user.created_at.strftime("%e. %b %Y, %H:%M") %></td>
|
||||
</tr>
|
||||
<% if mod? || @user.is?(current_user) %>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user