- in_section :people - content_for :title do #{@segment.name} List Segment - content_for :header do %h1 List Segment: = @segment.name .row .span4 %h3 Details .details-long= @segment.description.html_safe %ul.in-table %li.dropdown#bulkactions =icon_link_to('Work with...', "#menu#bulkactions", 'icon-asterisk', 'dropdown-toggle dropdown btn', '') %ul.dropdown-menu %li =link_to "Tag all", "#tag-modal", 'data-toggle' => 'modal', :rel => "tooltip", :data => {:toggle => "modal", "original-title" => "Give all of the people in this list segment the same tag.", :trigger => "hover", :placement => "right"} %li =link_to "Log action", "#bulk-action-modal", :id => 'bulk-action-link', 'data-toggle' => 'modal' %li = link_to "Delete this list segment", @segment, :method => :delete, :data => {:confirm => "Are you sure you want to delete #{@segment.name}?"} %li = link_to 'Export all to CSV', segment_path(@segment, :format => :csv), :class => "artfully-tooltip", :rel => "tooltip", :data => {"original-title" => "To view all the data on patrons in this segment, including mailing address and phone numbers, export this segment to a CSV file.", :trigger => "hover", :placement => "right"} -with_kit(:membership) do %li =link_to "Comp memberships", new_segment_membership_comp_path(@segment), :id => 'comp-memberships-link' .span8 %table.table.people-list %tbody - @people.each do |person| %tr %td.name= link_to_person person %td.email= person.email %td.tag-cell %ul.detailed-list.tags.pull-right{:id => "people-people-tags"} - person.tag_list.each do |tag| %li.tag.rounder= tag - if @people.present? = will_paginate @people, :inner_window => 2, :outer_window => 0 #tag-modal.modal = form_tag tag_segment_path(@segment), :onsubmit => "return validateTag()" do .modal-header .close{"data-dismiss" => "modal"} × %h3 Tag everyone in #{@segment.name} .modal-body -# = text_field_tag :name, "", :placeholder => "tag-name", :required => "required" =text_field_tag :name, "", :id=>"new-tag-field", :required => "required", :class => "typeahead", "data-provide"=>"typeahead", :autocomplete => 'off', "data-items"=>"5", "data-source"=>"[" + @tags_string.html_safe + "]" .tag-error %p This tag will be applied to people that are currently in this list segment. Any future additions/deletions to this list will not be automatically tagged. .modal-footer = submit_tag "Save", :class => "btn" #bulk-action-modal.action-form.modal = render :partial => 'actions/modal', :locals => {:action => Action.for_organization(current_user.current_organization), :target => @segment}