Add timestamps to Topic. Add fields on topic list.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
class TopicsController < ApplicationController
|
||||
# include CommentableActions
|
||||
|
||||
before_action :set_community
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
<% topics.each do |topic| %>
|
||||
<div id="<%= dom_id(topic) %>">
|
||||
<%= link_to topic.title, community_topic_path(@community, topic) %>
|
||||
<br>
|
||||
<%= topic.author.name %>
|
||||
<br>
|
||||
<%= I18n.l topic.created_at %>
|
||||
<% if topic.author == current_user %>
|
||||
<%= link_to t("topic.edit"), edit_community_topic_path(@community.id, topic), class: 'button expanded' %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<div class="topic-new row">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= render "shared/back_link" %>
|
||||
<h1><%= t("topic.create") %></h1>
|
||||
|
||||
<%= render '/topics/form' %>
|
||||
|
||||
Reference in New Issue
Block a user