Growstuff/growstuff

View on GitHub
app/views/admin/index.html.haml

Summary

Maintainability
Test Coverage
- content_for :title, 'Admin'

- content_for :breadcrumbs do
  %li.breadcrumb-item.active= link_to 'Admin', admin_path

%h1 Manage #{ENV['GROWSTUFF_SITE_NAME']}

.row
  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'tablet-alt'
          Site admin
      .card-body
        %nav.nav#site_admin
          %li= link_to "Roles", admin_roles_path, class: 'nav-link'
          %li= link_to "Forums", forums_path, class: 'nav-link'
          %li= link_to "CMS", comfy_admin_cms_path, class: 'nav-link'
          %li= link_to t('.garden_types'), garden_types_path, class: 'nav-link'

  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'seedling'
          Crop data admin
      .card-body
        %nav.nav#crop_admin
          %li= link_to "Crop Wrangling", wrangle_crops_path, class: 'nav-link'
          %li= link_to "Alternate names", alternate_names_path, class: 'nav-link'
          %li= link_to "Scientific names", scientific_names_path, class: 'nav-link'
          %li= link_to "Plant parts", plant_parts_path, class: 'nav-link'

  .col-md-4
    .card
      .card-header
        %h2
          = icon 'fas', 'user'
          Member admin
      .card-body
        %nav.nav#member_admin
          %li= link_to "Newsletter subscribers", admin_newsletter_path, class: 'nav-link'
          %li= link_to "Members", admin_members_path, class: 'nav-link'