app/views/segments/show.html.haml in artfully_ose-1.0.0.rc4 vs app/views/segments/show.html.haml in artfully_ose-1.1.0.rc1
- old
+ new
@@ -1,20 +1,54 @@
- in_section :people
+- content_for :title do
+ #{@segment.name} List Segment
- content_for :header do
- %h1= @segment.name
+ %h1
+ List Segment:
+ = @segment.name
.row
.span4
- %h3 Export
- %p= "Export to this list segment to #{link_to('CSV', segment_path(@segment, :format => :csv))}.".html_safe
+ %h3 Details
+ .details-long= @segment.description.html_safe
+ %ul.in-table
+ %li.dropdown{:id => "#menu#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", new_segment_action_path(@segment, :format => :html, :type => :hear), :id => 'hear-action-link', "data-remote" => "true"
+ %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"}
+
.span8
%table.table.people-list
%tbody
- - @segment.people.each do |person|
+ - @people.each do |person|
%tr
- %td.name= link_to "#{person.first_name} #{person.last_name}", person_url(person)
+ %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()"
+ .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"
+
+#hear-action-modal.modal
\ No newline at end of file