34 lines
724 B
Text
34 lines
724 B
Text
|
|
<div class="mainaboutbox">
|
|
<% if authenticated? %>
|
|
<%= link_to 'New Update', new_post_path %>
|
|
<% else %>
|
|
.
|
|
<% end %>
|
|
<div class="maininfo">
|
|
<h1>Recent Updates</h1>
|
|
|
|
<div class="posts">
|
|
<div class="postz">
|
|
<% @posts.each do |post| %>
|
|
|
|
<% if post.icon_image.attached? %>
|
|
<%= image_tag post.icon_image %>
|
|
<% else %>
|
|
🛸
|
|
<% end %> <%= time_ago_in_words(post.created_at) %> ago</p> <% if authenticated? %>
|
|
|
|
|
<%= link_to 'Edit', edit_post_path(post) %>
|
|
<%= link_to 'Destroy', post_path(post), data: {
|
|
turbo_method: :delete,
|
|
turbo_confirm: "Are you sureee?"
|
|
} %>
|
|
<% else %>
|
|
<% end %>
|
|
<%= post.text %>
|
|
<hr>
|
|
<% end %>
|
|
|
|
</div>
|
|
</div>
|
|
|