Sha256: 30bab4bdcaad7b73f2a1b43f25cf0731336e2879e223c9fe4d5b0b741eb27a43

Contents?: true

Size: 1.67 KB

Versions: 5

Compression:

Stored size: 1.67 KB

Contents

- edit ||= false
- model = entity.class.name.downcase
- collapsed = session[:entity_permissions].nil?
= subtitle :entity_permissions, collapsed, t(:permissions)
.section
  %small#entity_permissions_intro{ hidden_if(!collapsed) }
    = get_default_permissions_intro(entity.access, t("#{model}_small")) unless edit
  #entity_permissions{ hidden_if(collapsed) }
    .radio_box
      = f.radio_button :access, "Private", :onclick => "$('people').hide()"
      = f.label :access_private, t(:keep_private), :style => "cursor:pointer"
    .radio_box
      = f.radio_button :access, "Public", :onclick => "$('people').hide()"
      = f.label :access_public, t(:make_public), :style => "cursor:pointer"
    .radio_box
      = f.radio_button :access, "Shared", :onclick => "$('people').show()"
      = f.label :access_shared, t(:share_with), :style => "cursor:pointer"

    #people{ hidden_if(entity.access != "Shared") }
      %table
        %tr
          %td
            = f.label :user_ids, "#{t(:users)}:"
            %br
            = f.select :user_ids, user_options, {}, :multiple => true
            :javascript
              new Chosen($('#{model}_user_ids'));

        %tr
          %td
            = f.label :group_ids, "#{t(:groups)}:"
            %br
            = f.select :group_ids, group_options, {}, :multiple => true
            :javascript
              new Chosen($('#{model}_group_ids'));

    - if !edit and entity.is_a?(Lead)
      .radio_box
        = f.radio_button :access, t(:campaign), :onclick => "$('people').hide(); $('lead_access_campaign').value = 'Campaign'", :disabled => true
        %font{ :id => :copy_permissions, :color => :grey }
          = t(:copy_permissions, t(:campaign_small))

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fat_free_crm-0.12.3 app/views/entities/_permissions.html.haml
fat_free_crm-0.12.2 app/views/entities/_permissions.html.haml
fat_free_crm-0.12.1 app/views/entities/_permissions.html.haml
fat_free_crm-0.12.0 app/views/entities/_permissions.html.haml
fat_free_crm-0.11.4 app/views/entities/_permissions.html.haml