app/views/my/groups.html.haml

Summary

Maintainability
Test Coverage
.app.view-groups-index

  = render "application/header"

  .app-body
    .app-body-title
      .ui-body-title
        .ui-body-title-label
          %h1.title-xl
            %i.icon-privacy-group
            = _("My workgroups")

        .ui-body-title-actions
          %a.primary-button#create-workgroup
            %i.icon-plus
            = _("New workgroup")

    .app-body-ui-container
      .bordered.ui-container.midtone.table.rounded-right.rounded-bottom

        = render :partial => "application/sidebar/my_archive"

        .app-body-content.table-cell.table-substance.ui-container

          - unless @workgroups.blank?
            = render :partial => "groups/wrapper", 
                       :locals => {:groups => @workgroups, 
                                   :title => _("Workgroups"),
                                   :as => :table,
                                   :actions => true,
                                   :resources => true,
                                   :id => "my_workgroups"}

          - unless @systemgroups.blank?
            = render :partial => "groups/wrapper", 
                       :locals => {:groups => @systemgroups, 
                                   :title => _("System groups"),
                                   :as => :table,
                                   :resources => true,
                                   :id => "my_systemgroups"}

          - unless @departmentgroups.blank?
            = render :partial => "groups/wrapper", 
                       :locals => {:groups => @departmentgroups, 
                                   :title => _("Department groups"),
                                   :as => :table,
                                   :resources => true,
                                   :id => "my_departmentgroups"}

  .app-footer-push
= render :partial => "application/footer"

:coffeescript
  jQuery -> new App.GroupsController.Index
    el: $(".app.view-groups-index")