This commit is contained in:
jomo
2013-10-21 05:45:54 +02:00
parent 49b2231047
commit bfe9a1e6f5
14 changed files with 107 additions and 46 deletions

View File

@@ -0,0 +1 @@
<h1>Not yet</h1>

View File

@@ -3,6 +3,7 @@
<div class="group" id="forums-<%= group.id %>">
<div class="header">
<%= group.name %>
<%= link_to "edit", edit_forumgroup_path(group), class: "editlink" if admin? %>
</div>
<div class="forums">

View File

@@ -1,20 +1,12 @@
<%= link_to "Forums", forumgroups_path %> → <%= link_to @forum.group, "#{forumgroups_path}#forums-#{@forum.group.id}" %> → <%= link_to @forum %>
<%= link_to "Forums", forumgroups_path %> → <%= link_to @forum.group, @forum.group %> → <%= link_to @forum %>
<h1><%= @forum.name %></h1>
<%= link_to "New thread", new_forumthread_path, class: "btn blue" %>
<div id="forum_threads">
<% @threads.each do |thread| %>
<div class="group" id="thread-<%= thread.id %>">
<div class="header">
<%= thread.name %>
</div>
<div class="forums">
<% thread.forums.sort_by{|s| s[:position]}.each do |f| %>
<div class="forum">
<%= link_to f.name, f %>
</div>
<% end %>
</div>
</div>
<% end %>
</div>

View File

@@ -0,0 +1,18 @@
<%= link_to @forum.group, @forum.group %> → <%= link_to @forum, @forum %> → New thread
<h1>New thread</h1>
<%= simple_form_for @thread do |f|%>
<div id="form_labels">
<%= f.label :title %>
<%= f.label :sticky if mod? %>
<%= f.label :locked if mod? %>
<%= f.label :content, "Text" %>
</div>
<div id="form_inputs">
<%= 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" %>
</div>
<%= f.submit "Create forum", class: "btn blue" %><br>
Yea i know this is ugly :D
<% end %>

View File

@@ -10,7 +10,7 @@
</span>
<%= link_to image_tag(avatar_url(current_user.id, 32), :class => "avatar"), current_user %>
<% else %>
<%= link_to "Log in", login_path, :action => "new" %> | <%= link_to "Sign up", signup_path %>
<%= link_to "Log in", login_path(return_path: request.env['PATH_INFO']), action: "new" %> | <%= link_to "Sign up", signup_path %>
<% end %>
</div>
<div class="clear"></div>

View File

@@ -9,7 +9,7 @@
<%= javascript_include_tag "application" %>
</head>
<body>
<div id="mobile-info">We don't have a mobile style yet. It might look shitty.<br>Tip: Turn your device to landscape.</div>
<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" %>
<div id="main-content">
<%= "<div id='alert' class='flash'>#{alert}</div>".html_safe if alert %>