denny/ShinyCMS

View on GitHub
root/admin/menus/other.tt

Summary

Maintainability
Test Coverage
            [%- IF c.user.has_role( 'Shared Content Editor' )
                OR c.user.has_role( 'Discussion Admin'      )
                OR c.user.has_role( 'File Admin'            )
                OR c.user.has_role( 'Fileserver Admin'      ) -%]
            <li id="Other" class="nav-title">Other</li>

            [% IF c.user.has_role( 'Shared Content Editor' )
                 OR c.user.has_role( 'Shared Content Admin'  ) -%]
            <li class="nav-item">
              <a class="nav-link" href="[% c.uri_for( '/admin/shared' ) %]" title="Shared content">
                <i class="nav-icon fa fa-pencil-square-o"></i> Shared content</a>
            </li>
            [% END -%]
            [%- IF c.user.has_role( 'Discussion Admin' ) %]
            <li class="nav-item">
              <a class="nav-link" href="[% c.uri_for( '/admin/spam' ) %]" title="Manage spam comments">
                <i class="nav-icon fa fa-comments-o"></i> Manage spam</a>
            </li>
            [%- END -%]
            [%- IF c.user.has_role( 'File Admin' ) %]
            <li class="nav-item">
              <a class="nav-link" href="[% c.uri_for( '/admin/filemanager' ) %]" title="Browse files">
                <i class="nav-icon fa fa-files-o"></i> View files</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="[% c.uri_for( '/admin/filemanager/upload-file' ) %]" title="Upload a file">
                <i class="nav-icon fa fa-upload"></i> Upload file</a>
            </li>
            [% END -%]
            [%- IF c.user.has_role( 'Fileserver Admin' ) %]
            <li class="nav-item">
              <a class="nav-link" href="[% c.uri_for( '/admin/fileserver' ) %]" title="Restricted file access logs">
                <i class="nav-icon fa fa-files-o"></i> Fileserver logs</a>
            </li>
            [%- END -%]
            [%- END %]