<% if (typeof success_msg !== 'undefined' && success_msg && success_msg.length > 0) { %> <% } %> <% if (typeof error_msg !== 'undefined' && error_msg && error_msg.length > 0) { %> <% } %>
Daftar Artikel
<% if (searchQuery) { %> <% } %>
<% if (posts && posts.length > 0) { %> <% if (totalPosts > 0) { %>

Menampilkan <%= posts.length %> dari <%= totalPosts %> artikel

<% if (searchQuery) { %>

Hasil pencarian untuk: "<%= searchQuery %>"

<% } %>
<% } %>
<% posts.forEach((post, index) => { %> <% }); %>
No. Judul Game Tanggal Status Aksi
<%= index + 1 %>
<% if (post.featuredImage) { %> <%= post.title %> <% } else { %>
<% } %>
<%= post.title %>
<% // Fungsi untuk menghilangkan tag HTML function stripHtmlTags(html) { if (!html) return ''; return html.replace(/<\/?[^>]+(>|$)/g, ""); } const plainText = stripHtmlTags(post.content); %> <%= plainText.length > 100 ? plainText.substring(0, 100) + '...' : plainText %>
<%= post.category || 'Umum' %> <%= new Date(post.date || post.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'short', year: 'numeric' }) %>
<%= new Date(post.date || post.createdAt).toLocaleTimeString('id-ID', { hour: '2-digit', minute: '2-digit' }) %>
Published
<% if (userRole === 'admin' || userRole === 'editor' || (userRole === 'author' && post.author === user.username)) { %> <% } %> <% if (userRole === 'admin' || (userRole === 'author' && post.author === user.username)) { %> <% } %>
<% if (totalPages > 1) { %>
<% } %> <% } else { %>
Belum ada artikel

Mulai dengan membuat artikel pertama Anda!

Tambah Artikel
<% } %>