<%: func InfoList(infoList []map[string]string, menuList []menu.MenuItem, thead []string, paginator map[string]interface{}, title string, description string, user auth.User, buffer *bytes.Buffer) %> <%~ "info.html" %> <%@ header { %>

<%= title %> <%= description %>

<% } %> <%@ menuPart { %> <% for _, list := range menuList { %> <%+ "sidebar.html" %> <% } %> <% } %> <%@ adminPanel { %> User Image <% } %> <%@ adminName { %>

<%= user.Name %>

<% } %> <%@ newUrl { %> <% } %> <%@ thead { %> <% for _, head := range thead { %> <%= head %> <% } %> 操作 <% } %> <%@ deletePart { %> $.ajax({ method: 'post', url: '<%= paginator["delete_url"].(string) %>', data: { id: id }, success: function (data) { $.pjax.reload('#pjax-container'); if (typeof data === 'object') { if (data.status) { swal(data.message, '', 'success'); } else { swal(data.message, '', 'error'); } } }, error: function (data) { swal("删除失败", '', 'error'); } }); <% } %> <%@ list { %> <% for _, info := range infoList { %> <% for _, head := range thead { %> <%==s info[head] %> <% } %> <% } %> <% } %> <%@ footer { %> <% } %>