Skip to content

Instantly share code, notes, and snippets.

@smpallen99
Created May 15, 2017 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smpallen99/7f56d885676da95630fc1d26ed2e2623 to your computer and use it in GitHub Desktop.
Save smpallen99/7f56d885676da95630fc1d26ed2e2623 to your computer and use it in GitHub Desktop.
Example of ExAdminRedux theme templates
/ web/templates/admin/material_bootstrap/generators/index.html.eex
/ Example of a the default theme resource index page. This is an template for the generator that
/ creates the the end view template. Creating a theme will be as simple as generating a new version
/ of these files and editing them to match your theme.
/ A second level of templates like this will be available per resource so you can customize the pages
/ for each resource.
.container-fluid
.row
.col-md-12
.card
.card-header.card-header-icon data-background="purple"
i.material-icons assignment
.card-content
h4.card-title <%= @resource_module.card_title() %>
.toolbar <%= @resource_module.tool_bar() %>
.material-datatables
table#datatables.table.table-striped.table-no-bordered-table-hover cellspacing="0" width="100%" style="width:100%"
thead
tr
<%= for name <- @resource_module.index_columns() do %>
th <%= name %>
<% end %>
th.disable-sorting.text-right Actions
tfoot
tr
<%= for name <- @resource_module.index_columns() do %>
th <%= name %>
<% end %>
th.text-right Actions
tbody
= for resource <- @resources do
tr
<%= for name <- @resource_module.index_columns() do %>
td= Map.get(resource, <%= ":#{name}" %>)
<% end %>
td class="text-right"
= link [to: ExAdmin.Utils.admin_resource_path(resource, :show), class: "btn btn-simple btn-info btn-icon info"] do
i.material-icons info
.ripple-container
= link [to: ExAdmin.Utils.admin_resource_path(resource, :destroy), class: "btn btn-simple btn-danger btn-icon remove"] do
i.material-icons close
.ripple-container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment