mixin privacyEditor(typeName)
  .g-public-container
    .radio
      label
        input#g-access-private(type="radio", name="privacy",
                               checked=(public ? undefined : "checked"))
        i.icon-lock
        | #[b Private] &mdash; Access is required to view this #{typeName}
    .radio
      label
        input#g-access-public(type="radio", name="privacy",
                              checked=(public ? "checked" : undefined))
        i.icon-globe
        | #[b Public] &mdash; Anyone can view this #{typeName}


mixin permissionsEditor
  .g-permissions-editor
    .g-ac-list-title #[i.icon-key-1]  Permissions
    .g-ac-list
      #g-ac-list-groups
      #g-ac-list-users

    .g-grant-access-container
      form(role="form")
        .form-group
          label(for="addAccess") Grant access to another group or user
          .g-search-field-container


mixin recurseOption(typeName)
  .g-recursive-container
    .radio
      label
        input#g-apply-nonrecursive(type="radio" name="recurse" checked="checked")
        | Apply permissions only to this #{typeName}, not its subfolders
    .radio
      label
        input#g-apply-recursive(type="radio" name="recurse")
        | Also set permissions on all subfolders to match this #{typeName}'s permissions


mixin saveAccessButton
  button.g-save-access-list.btn.btn-small.btn-primary #[i.icon-ok]  Save
