This commit is contained in:
jomo
2013-10-14 02:40:44 +02:00
parent acd4c5198f
commit 7c578874c9
17 changed files with 101 additions and 75 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
<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.input :content, :label => false, input_html: {class: "full-width vertical"} %>
<%= f.submit "Update Post", :id => "edit_create_post" %>
<%= f.submit "Update Post", :id => "edit_create_post", class: "btn blue" %>
<% end %>
<div id="delete_post">
<%= button_to "Delete post", @post, :method => "delete", :confirm => "Delete post + comments forever?" %>
<%= button_to "Delete post", @post, :method => "delete", :confirm => "Delete post + comments forever?", class: "btn red" %>
</div>
+1 -1
View File
@@ -15,5 +15,5 @@
</div>
</div>
<% end %>
<%= button_to 'Make new Post', new_blogpost_path, method: "get" if mod? %>
<%= button_to 'Make new Post', new_blogpost_path, method: "get", class: "btn blue" if mod? %>
</div>
+4 -3
View File
@@ -1,6 +1,7 @@
<h1>New 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.input :content, :label => false, input_html: {class: "full-width vertical"} %>
<%= f.submit "Update Post", :id => "edit_create_post" %>
<%= f.input :title, placeholder: "Title" %>
<%= f.input :content, placeholder: "Text", input_html: {class: "full-width vertical"} %>
<%= f.submit "Create Post", id: "edit_create_post", class: "btn blue" %>
<% end %>
+2 -2
View File
@@ -1,7 +1,7 @@
<% if current_user %>
<h3>New comment</h3>
<%= simple_form_for [@post, @comment] do |f| %>
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment" %>
<%= f.submit %>
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment", input_html: {class: "comment"} %>
<%= f.submit class: "btn blue" %>
<% end %>
<% end %>
+2 -2
View File
@@ -2,8 +2,8 @@
<%= simple_form_for [@comment.blogpost, @comment] do |f| %>
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment" %>
<%= f.submit "Update Comment", :id => "edit_create_comment" %>
<%= f.submit "Update Comment", :id => "edit_create_comment", class: "btn blue" %>
<% end %>
<div id="delete_comment">
<%= button_to "Delete comment", [@comment.blogpost, @comment] , :method => "delete", :confirm => "Delete comment forever?" %>
<%= button_to "Delete comment", [@comment.blogpost, @comment] , :method => "delete", :confirm => "Delete comment forever?", class: "btn red" %>
</div>
+4 -8
View File
@@ -16,14 +16,10 @@
<div class="clear"></div>
<div id="menu">
<ul>
<%= link_to root_path do %>
<li>Home</li>
<% end %>
<li>Info</li>
<%= link_to forumgroups_path do %>
<li>Forums</li>
<% end %>
<li>Donate</li>
<%= link_to root_path do %><li>Home</li><% end %>
<%= link_to root_path do %><li>Info</li><% end %>
<%= link_to forumgroups_path do %><li>Forums</li><% end %>
<%= link_to root_path do %><li>Donate</li><% end %>
</ul>
<div class="clear"></div>
</div>
+2 -1
View File
@@ -2,13 +2,14 @@
<html>
<head>
<title>Redstoner</title>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<%= stylesheet_link_tag "application", :media => "all" %>
<%= csrf_meta_tags %>
<%= favicon_link_tag "favicon.ico" %>
<%= javascript_include_tag "application" %>
</head>
<body>
<div id="mobile-info">Sorry, we don't have a mobile style yet. It's all ugly for now.</div>
<div id="mobile-info">We don't have a mobile style yet. It might look shitty.<br>Tip: Turn your device to landscape.</div>
<%= render "/layouts/head" %>
<div id="main-content">
<%= "<div id='alert' class='flash'>#{alert}</div>".html_safe if alert %>
+1 -1
View File
@@ -63,6 +63,6 @@
</table>
<%= f.submit "Save profile", disabled: @user.unconfirmed? %>
<% if @user.unconfirmed? %>
<span class='red'>Please confirm your email adress first.</span>
<span class='red-alert'>Please confirm your email adress first.</span>
<% end %>
<% end %>
+3 -3
View File
@@ -2,13 +2,13 @@
<h1><%= @user.name %></h1>
<% if @user.is?(current_user) || (mod? && current_user.role >= @user.role) %>
<div class="profile-action" ><%= link_to "edit profile", edit_user_path(@user), :class => "btn-blue" %></div>
<div class="profile-action" ><%= link_to "edit profile", edit_user_path(@user), :class => "btn blue" %></div>
<% end %>
<div class="profile-action" >
<% if !session[:original_user_id] && admin? %>
<%= link_to "become this user", become_user_path(@user), :class => "btn-blue" %>
<%= link_to "become this user", become_user_path(@user), :class => "btn blue" %>
<% elsif session[:original_user_id] %>
<%= link_to "revert", unbecome_users_path, :class => "btn-blue" %>
<%= link_to "revert", unbecome_users_path, :class => "btn blue" %>
<% end %>
</div>