porom/views/topics/topics.etlua
2025-05-18 15:56:29 +03:00

17 lines
352 B
Plaintext

<h1>Topics</h1>
<% if #topic_list == 0 then %>
<p>There are no topics.</p>
<% else %>
<ul>
<% for i, v in ipairs(topic_list) do %>
<li>
<a href=<%= v.slug %>><%= v.name %></a> - <%= v.description %>
</li>
<% end %>
<% end %>
</ul>
<% if user:is_admin() then %>
<a href="<%= url_for("topic_create") %>">Create new topic</a>
<% end %>