kit_cms 2.3.20 → 2.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/images/kit/toolbar/smile.png +0 -0
 - data/app/assets/images/kit/toolbar/wink.gif +0 -0
 - data/app/assets/images/kit/toolbar/wink.png +0 -0
 - data/app/assets/javascripts/codemirror/editor.js +55 -17
 - data/app/assets/javascripts/codemirror/jquery.js +0 -1
 - data/app/assets/javascripts/codemirror/ruby.js +196 -0
 - data/app/assets/javascripts/jquery.js +3036 -2838
 - data/app/assets/javascripts/kit/utilities.js +655 -586
 - data/app/assets/stylesheets/codemirror/style.css +1 -1
 - data/app/assets/stylesheets/codemirror/theme.css +23 -3
 - data/app/assets/stylesheets/kit/calendar.css +6 -1
 - data/app/assets/stylesheets/kit/cms/cms.css +36 -0
 - data/app/assets/stylesheets/kit/forums.css +5 -1
 - data/app/assets/stylesheets/kit/kit.css +3 -1
 - data/app/controllers/account_controller.rb +306 -0
 - data/app/controllers/ad_controller.rb +2 -0
 - data/app/controllers/admin/ad_units_controller.rb +1 -1
 - data/app/controllers/admin/ad_zones_controller.rb +15 -0
 - data/app/controllers/admin/ads_controller.rb +5 -0
 - data/app/controllers/admin/block_controller.rb +1 -65
 - data/app/controllers/admin/blocks_controller.rb +2 -0
 - data/app/controllers/admin/content_controller.rb +3 -1
 - data/app/controllers/admin/dashboard_controller.rb +28 -4
 - data/app/controllers/admin/dj_controller.rb +45 -0
 - data/app/controllers/admin/help_controller.rb +1 -1
 - data/app/controllers/admin/html_asset_controller.rb +0 -12
 - data/app/controllers/admin/q_controller.rb +120 -0
 - data/app/controllers/admin/user_controller.rb +4 -4
 - data/app/controllers/api_controller.rb +34 -0
 - data/app/controllers/calendar_controller.rb +1 -1
 - data/app/controllers/form_controller.rb +3 -3
 - data/app/controllers/forum_controller.rb +39 -29
 - data/app/controllers/kit_controller.rb +42 -15
 - data/app/controllers/pages_controller.rb +25 -5
 - data/app/controllers/q_controller.rb +235 -0
 - data/app/controllers/repo_controller.rb +7 -0
 - data/app/controllers/user_controller.rb +14 -10
 - data/app/controllers/utility_controller.rb +1 -1
 - data/app/helpers/account_helper.rb +47 -0
 - data/app/helpers/admin/layouts_helper.rb +8 -0
 - data/app/helpers/admin/page_templates_helper.rb +8 -0
 - data/app/helpers/ads_helper.rb +11 -12
 - data/app/helpers/calendar_helper.rb +6 -2
 - data/app/helpers/form_data_helper.rb +1 -1
 - data/app/helpers/form_helper.rb +8 -0
 - data/app/helpers/forum_helper.rb +5 -1
 - data/app/helpers/kit_helper.rb +65 -35
 - data/app/helpers/kit_modules_helper.rb +4 -0
 - data/app/helpers/user_helper.rb +0 -28
 - data/app/jobs/page_link_job.rb +34 -0
 - data/app/jobs/queue_job.rb +134 -0
 - data/app/mailers/notification.rb +10 -0
 - data/app/mailers/queue_mailer.rb +13 -0
 - data/app/models/ad.rb +6 -6
 - data/app/models/ad_unit.rb +1 -1
 - data/app/models/ad_zone.rb +4 -0
 - data/app/models/block.rb +1 -1
 - data/app/models/delayed_job.rb +3 -0
 - data/app/models/form.rb +16 -4
 - data/app/models/html_asset.rb +19 -4
 - data/app/models/html_asset_usage.rb +3 -0
 - data/app/models/html_assetable.rb +4 -0
 - data/app/models/layout.rb +36 -6
 - data/app/models/newsletter.rb +1 -1
 - data/app/models/page.rb +36 -2
 - data/app/models/page_link.rb +5 -0
 - data/app/models/page_template.rb +22 -2
 - data/app/models/preference.rb +1 -1
 - data/app/models/q_event.rb +12 -0
 - data/app/models/q_klass.rb +5 -0
 - data/app/models/q_message.rb +9 -0
 - data/app/models/q_publisher.rb +35 -0
 - data/app/models/q_subscription.rb +7 -0
 - data/app/models/q_user.rb +29 -0
 - data/app/models/q_users_method.rb +6 -0
 - data/app/models/q_users_publisher.rb +6 -0
 - data/app/models/user.rb +127 -19
 - data/app/models/user_login.rb +4 -0
 - data/app/validators/email_validator.rb +14 -0
 - data/app/views/account/_edit.html.haml +40 -0
 - data/app/views/account/_edit_intro.html.haml +3 -0
 - data/app/views/account/_forgotten.html.haml +20 -0
 - data/app/views/account/_forgotten_intro.html.haml +5 -0
 - data/app/views/account/_sign_in.html.haml +31 -0
 - data/app/views/account/_sign_in_intro.html.haml +4 -0
 - data/app/views/account/_sign_up.html.haml +51 -0
 - data/app/views/account/_sign_up_intro.html.haml +4 -0
 - data/app/views/account/edit.html.haml +1 -0
 - data/app/views/account/forgotten.html.haml +1 -0
 - data/app/views/account/sign_in.html.haml +2 -0
 - data/app/views/account/sign_up.html.haml +1 -0
 - data/app/views/ad/_buy.html.haml +2 -1
 - data/app/views/admin/ad_zones/_form.html.haml +1 -1
 - data/app/views/admin/ad_zones/show.html.haml +2 -0
 - data/app/views/admin/blocks/_form.html.haml +11 -1
 - data/app/views/admin/dashboard/broken_links.html.haml +9 -0
 - data/app/views/admin/dashboard/system.html.haml +11 -0
 - data/app/views/admin/dj/index.html.haml +43 -0
 - data/app/views/admin/form/_form.html.haml +15 -10
 - data/app/views/admin/group/index.html.haml +1 -1
 - data/app/views/admin/help/edit.html.haml +1 -1
 - data/app/views/admin/html_asset/show.html.haml +9 -2
 - data/app/views/admin/layouts/show.html.haml +10 -16
 - data/app/views/admin/page_templates/_form.html.haml +9 -17
 - data/app/views/admin/page_templates/show.html.haml +5 -4
 - data/app/views/admin/q/events.html.haml +26 -0
 - data/app/views/admin/q/index.html.haml +28 -0
 - data/app/views/admin/q/klasses.html.haml +61 -0
 - data/app/views/admin/q/messages.html.haml +37 -0
 - data/app/views/admin/q/show.html.haml +98 -0
 - data/app/views/admin/q/subscriptions.html.haml +26 -0
 - data/app/views/admin/q/users.html.haml +27 -0
 - data/app/views/admin/snippet/edit.html.erb +1 -1
 - data/app/views/admin/snippet/new.html.erb +1 -1
 - data/app/views/admin/stylesheet/show.html.haml +1 -1
 - data/app/views/admin/user/index.html.erb +15 -6
 - data/app/views/admin/user/view.html.erb +5 -4
 - data/app/views/admin/views/_form.html.haml +3 -3
 - data/app/views/calendar/_buy_tickets.html.haml +1 -1
 - data/app/views/calendar/_calendar_entry.html.haml +1 -1
 - data/app/views/calendar/_month.html.haml +7 -7
 - data/app/views/form/_show.html.haml +1 -1
 - data/app/views/forum/_add_post.html.haml +7 -8
 - data/app/views/forum/_mod_thread.js.erb +46 -6
 - data/app/views/forum/_post_moderation.html.haml +2 -1
 - data/app/views/forum/_post_preview.html.haml +1 -9
 - data/app/views/forum/_post_scripts.js.erb +29 -5
 - data/app/views/forum/fetch_raw.html.haml +1 -0
 - data/app/views/forum/moderate.html.haml +1 -0
 - data/app/views/forum/topic_index.html.haml +4 -0
 - data/app/views/notification/{event.txt.erb → event.text.erb} +0 -0
 - data/app/views/notification/forgotten_password.text.erb +2 -0
 - data/app/views/pages/content_edit.html.haml +1 -1
 - data/app/views/pages/info.html.erb +13 -2
 - data/app/views/pages/links.html.haml +63 -0
 - data/app/views/user/edit_profile.html.haml +1 -1
 - data/app/views/utility/_cm_editor.html.erb +13 -10
 - data/app/views/utility/_cm_toolbar_markdown.html.haml +8 -1
 - data/app/views/utility/_menu.html.haml +4 -0
 - data/app/views/utility/mercury_html.html.haml +1 -0
 - data/config/initializers/elastic_search.rb +6 -3
 - data/config/initializers/extend_controller.rb +3 -0
 - data/config/initializers/string.rb +9 -6
 - data/config/initializers/warden.rb +49 -0
 - data/config/locales/en.yml +29 -1
 - data/config/routes.rb +35 -2
 - data/lib/kit_cms.rb +7 -2
 - data/lib/tasks/kit.rake +90 -2
 - metadata +139 -27
 - data/app/controllers/user/confirmations_controller.rb +0 -11
 - data/app/controllers/user/passwords_controller.rb +0 -13
 - data/app/controllers/user/registrations_controller.rb +0 -110
 - data/app/controllers/user/sessions_controller.rb +0 -33
 - data/app/controllers/user/unlocks_controller.rb +0 -13
 - data/app/views/devise/_links.erb +0 -25
 - data/app/views/devise/confirmations/new.html.erb +0 -12
 - data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
 - data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
 - data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
 - data/app/views/devise/passwords/edit.html.erb +0 -16
 - data/app/views/devise/passwords/new.html.erb +0 -12
 - data/app/views/devise/registrations/edit.html.erb +0 -28
 - data/app/views/devise/registrations/new.html.erb +0 -18
 - data/app/views/devise/sessions/new.html.erb +0 -18
 - data/app/views/devise/shared/_links.erb +0 -25
 - data/app/views/devise/unlocks/new.html.erb +0 -12
 - data/app/views/pages/links.html.erb +0 -8
 - data/app/views/user/shared/_links.erb +0 -25
 - data/config/initializers/devise.rb +0 -196
 - data/config/initializers/devise_extender.rb +0 -39
 
| 
         @@ -55,7 +55,7 @@ 
     | 
|
| 
       55 
55 
     | 
    
         
             
                    = f.label :priority
         
     | 
| 
       56 
56 
     | 
    
         
             
                    = f.text_field :priority
         
     | 
| 
       57 
57 
     | 
    
         
             
                    .field_help
         
     | 
| 
       58 
     | 
    
         
            -
                      Optional, unless using URL Pattern, then mandatory.  If this zone uses a URL pattern and other zones also have patterns that match the current URL, the zone with the  
     | 
| 
      
 58 
     | 
    
         
            +
                      Optional, unless using URL Pattern, then mandatory.  If this zone uses a URL pattern and other zones also have patterns that match the current URL, the zone with the greatest priority figure will be used (e.g. a priority of 9 won't be shown if a priority of 10 exists)
         
     | 
| 
       59 
59 
     | 
    
         | 
| 
       60 
60 
     | 
    
         | 
| 
       61 
61 
     | 
    
         
             
                  %li
         
     | 
| 
         @@ -41,6 +41,8 @@ 
     | 
|
| 
       41 
41 
     | 
    
         
             
              %p
         
     | 
| 
       42 
42 
     | 
    
         
             
                = icon_to "Edit", edit_admin_ad_zone_path(@ad_zone)
         
     | 
| 
       43 
43 
     | 
    
         
             
                = link_to "Destroy", [:admin, @ad_zone], :confirm => 'Are you sure?', :method => :delete, :class=>"action"
         
     | 
| 
      
 44 
     | 
    
         
            +
                
         
     | 
| 
      
 45 
     | 
    
         
            +
                = link_to "Create Block For This Ad Zone", "/admin/ad_zone/#{@ad_zone.id}/create_block", :class=>"action", :method=>:post
         
     | 
| 
       44 
46 
     | 
    
         | 
| 
       45 
47 
     | 
    
         
             
              %p
         
     | 
| 
       46 
48 
     | 
    
         
             
                = icon_to "Ad Zones", admin_ad_zones_path
         
     | 
| 
         @@ -24,7 +24,17 @@ 
     | 
|
| 
       24 
24 
     | 
    
         
             
                %a(name='editor')
         
     | 
| 
       25 
25 
     | 
    
         
             
                %p
         
     | 
| 
       26 
26 
     | 
    
         
             
                  = f.label :body
         
     | 
| 
       27 
     | 
    
         
            -
                  = cm_editor(' 
     | 
| 
      
 27 
     | 
    
         
            +
                  = cm_editor('block[body]', {:mode=>'xml'})
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                - if Preference.get_cached(_sid, "cms_server")=='true'
         
     | 
| 
      
 30 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 31 
     | 
    
         
            +
                    = f.label "Share in CMS Repo"
         
     | 
| 
      
 32 
     | 
    
         
            +
                    = f.check_box :repo
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 35 
     | 
    
         
            +
                    = f.label "Repo Tags"
         
     | 
| 
      
 36 
     | 
    
         
            +
                    = f.text_field :repo_tags
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       28 
38 
     | 
    
         
             
                %p
         
     | 
| 
       29 
39 
     | 
    
         
             
                  = kit_submit "Save"
         
     | 
| 
       30 
40 
     | 
    
         
             
                  = kit_submit "Save And Edit Again"
         
     | 
| 
         @@ -63,4 +63,15 @@ 
     | 
|
| 
       63 
63 
     | 
    
         
             
                        = best_in_place pref, :value, :path=>"/admin/system/#{pref.name}"
         
     | 
| 
       64 
64 
     | 
    
         
             
                    %td(nowrap)= pref.updated_at.to_formatted_s(:short)
         
     | 
| 
       65 
65 
     | 
    
         | 
| 
      
 66 
     | 
    
         
            +
              - if is_admin?
         
     | 
| 
      
 67 
     | 
    
         
            +
                %h4 New Preference Setting
         
     | 
| 
      
 68 
     | 
    
         
            +
                = form_for @preference, :url=>"/admin/system" do |f|
         
     | 
| 
      
 69 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 70 
     | 
    
         
            +
                    %label Name
         
     | 
| 
      
 71 
     | 
    
         
            +
                    = f.text_field :name
         
     | 
| 
      
 72 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 73 
     | 
    
         
            +
                    %label Value
         
     | 
| 
      
 74 
     | 
    
         
            +
                    = f.text_field :value
         
     | 
| 
      
 75 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 76 
     | 
    
         
            +
                    = f.submit "Create"
         
     | 
| 
       66 
77 
     | 
    
         | 
| 
         @@ -0,0 +1,43 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do 
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1 Delayed Jobs Queue
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              %h3 
         
     | 
| 
      
 6 
     | 
    
         
            +
                Status:
         
     | 
| 
      
 7 
     | 
    
         
            +
                = @running ? "Running [ #{@pid} ]" : "NOT Running"
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              - if @running
         
     | 
| 
      
 10 
     | 
    
         
            +
                = icon_to "Stop Process", "/admin/dj?process=stop", false, :method=>:post
         
     | 
| 
      
 11 
     | 
    
         
            +
                = icon_to "Restart Process", "/admin/dj?process=restart", false, :method=>:post
         
     | 
| 
      
 12 
     | 
    
         
            +
              - else
         
     | 
| 
      
 13 
     | 
    
         
            +
                = icon_to "Start Process", "/admin/dj?process=start", false,:method=>:post
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              %table.loosen
         
     | 
| 
      
 16 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 17 
     | 
    
         
            +
                  %th ID
         
     | 
| 
      
 18 
     | 
    
         
            +
                  %th Created
         
     | 
| 
      
 19 
     | 
    
         
            +
                  %th Priority
         
     | 
| 
      
 20 
     | 
    
         
            +
                  %th Attempts
         
     | 
| 
      
 21 
     | 
    
         
            +
                  %th 
         
     | 
| 
      
 22 
     | 
    
         
            +
                    Run At
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %br
         
     | 
| 
      
 24 
     | 
    
         
            +
                    Click to run now
         
     | 
| 
      
 25 
     | 
    
         
            +
                  %th(nowrap) Failed At
         
     | 
| 
      
 26 
     | 
    
         
            +
                  %th Queue
         
     | 
| 
      
 27 
     | 
    
         
            +
                - @delayed_jobs.each do |job|
         
     | 
| 
      
 28 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 29 
     | 
    
         
            +
                    %td
         
     | 
| 
      
 30 
     | 
    
         
            +
                      = job.id
         
     | 
| 
      
 31 
     | 
    
         
            +
                      = link_to "Delete", "/admin/dj?delete=#{job.id}", :method=>:post
         
     | 
| 
      
 32 
     | 
    
         
            +
                    %td= job.created_at
         
     | 
| 
      
 33 
     | 
    
         
            +
                    %td= job.priority
         
     | 
| 
      
 34 
     | 
    
         
            +
                    %td= job.attempts
         
     | 
| 
      
 35 
     | 
    
         
            +
                    %td= link_to job.run_at, "/admin/dj?id=#{job.id}", :method=>:post
         
     | 
| 
      
 36 
     | 
    
         
            +
                    %td= job.failed_at
         
     | 
| 
      
 37 
     | 
    
         
            +
                    %td= job.queue
         
     | 
| 
      
 38 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 39 
     | 
    
         
            +
                    %td(colspan='7')= truncate(job.handler, :length=>800)
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - if job.last_error
         
     | 
| 
      
 41 
     | 
    
         
            +
                    %tr
         
     | 
| 
      
 42 
     | 
    
         
            +
                      %td(colspan='7')= truncate(job.last_error, :length=>800)
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
         @@ -52,19 +52,24 @@ 
     | 
|
| 
       52 
52 
     | 
    
         
             
                    .field_help
         
     | 
| 
       53 
53 
     | 
    
         
             
                      Include new and updated entries in system activity log
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
     | 
    
         
            -
                   
     | 
| 
       56 
     | 
    
         
            -
                     
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                      = f.select :layout, options_from_collection_for_select(Layout.sys(_sid).order(:name).all, 'name', 'name')
         
     | 
| 
      
 55 
     | 
    
         
            +
                  %li.advanced
         
     | 
| 
      
 56 
     | 
    
         
            +
                    = f.label "Layout"
         
     | 
| 
      
 57 
     | 
    
         
            +
                    = f.select :layout_id, options_from_collection_for_select(Layout.sys(_sid).order(:name).all, 'id', 'name', @form.layout_id)
         
     | 
| 
       59 
58 
     | 
    
         | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
      
 59 
     | 
    
         
            +
                    .field_help
         
     | 
| 
      
 60 
     | 
    
         
            +
                      The layout to use for this form when rendering it as a page.
         
     | 
| 
       62 
61 
     | 
    
         | 
| 
       63 
62 
     | 
    
         
             
                  %li.advanced
         
     | 
| 
       64 
     | 
    
         
            -
                     
     | 
| 
       65 
     | 
    
         
            -
                     
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
                       
     | 
| 
      
 63 
     | 
    
         
            +
                    %label CSS
         
     | 
| 
      
 64 
     | 
    
         
            +
                    - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"css").each do |ha|
         
     | 
| 
      
 65 
     | 
    
         
            +
                      = ha.name
         
     | 
| 
      
 66 
     | 
    
         
            +
                      = check_box_tag "form[html_asset_ids][]", ha.id, form_asset_selected(ha)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  %li.advanced
         
     | 
| 
      
 68 
     | 
    
         
            +
                    %label Javascript
         
     | 
| 
      
 69 
     | 
    
         
            +
                    - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"js").each do |ha|
         
     | 
| 
      
 70 
     | 
    
         
            +
                      = ha.name
         
     | 
| 
      
 71 
     | 
    
         
            +
                      = check_box_tag "form[html_asset_ids][]", ha.id, form_asset_selected(ha)
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
       68 
73 
     | 
    
         | 
| 
       69 
74 
     | 
    
         
             
                  %li.advanced
         
     | 
| 
       70 
75 
     | 
    
         
             
                    = f.label "Class"
         
     | 
| 
         @@ -8,7 +8,7 @@ 
     | 
|
| 
       8 
8 
     | 
    
         
             
                = f.submit "Save"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              %ul
         
     | 
| 
       11 
     | 
    
         
            -
                -  
     | 
| 
      
 11 
     | 
    
         
            +
                - @groups.each do |group|
         
     | 
| 
       12 
12 
     | 
    
         
             
                  %li(class='clearfix' style="margin-top: 5px;")
         
     | 
| 
       13 
13 
     | 
    
         
             
                    = link_to group.name, "/admin/user?grp_id=#{group.id}", :style=>"margin-right: 20px;"
         
     | 
| 
       14 
14 
     | 
    
         
             
                    = link_to "Delete", "/admin/group/#{group.id}", :method=>:delete, :class=>"action"
         
     | 
| 
         @@ -16,7 +16,14 @@ 
     | 
|
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
                    %li 
         
     | 
| 
       18 
18 
     | 
    
         
             
                      %label Used By:
         
     | 
| 
       19 
     | 
    
         
            -
                       
     | 
| 
      
 19 
     | 
    
         
            +
                      Layouts:
         
     | 
| 
      
 20 
     | 
    
         
            +
                      = @html_asset.layouts.pluck(:name).join(', ')
         
     | 
| 
      
 21 
     | 
    
         
            +
                      %br
         
     | 
| 
      
 22 
     | 
    
         
            +
                      Page Templates: 
         
     | 
| 
      
 23 
     | 
    
         
            +
                      = @html_asset.page_templates.pluck(:name).join(', ')
         
     | 
| 
      
 24 
     | 
    
         
            +
                      %br
         
     | 
| 
      
 25 
     | 
    
         
            +
                      Forms:
         
     | 
| 
      
 26 
     | 
    
         
            +
                      = @html_asset.forms.pluck(:title).join(', ')
         
     | 
| 
       20 
27 
     | 
    
         
             
                    %li
         
     | 
| 
       21 
28 
     | 
    
         
             
                      %label Last Updated By:
         
     | 
| 
       22 
29 
     | 
    
         
             
                      = @html_asset.user.email rescue ''
         
     | 
| 
         @@ -31,7 +38,7 @@ 
     | 
|
| 
       31 
38 
     | 
    
         
             
                      = flash[:notice]
         
     | 
| 
       32 
39 
     | 
    
         | 
| 
       33 
40 
     | 
    
         
             
                  %a(name='editor')
         
     | 
| 
       34 
     | 
    
         
            -
                  = cm_editor( 
     | 
| 
      
 41 
     | 
    
         
            +
                  = cm_editor("html_asset[body]", {:mode=>@html_asset.file_type, :show_toolbar=>false})
         
     | 
| 
       35 
42 
     | 
    
         | 
| 
       36 
43 
     | 
    
         
             
                  %p
         
     | 
| 
       37 
44 
     | 
    
         
             
                    = render :partial=>"utility/design_history", :locals=>{:object=>@html_asset}
         
     | 
| 
         @@ -23,24 +23,18 @@ 
     | 
|
| 
       23 
23 
     | 
    
         
             
                      %label Updated:
         
     | 
| 
       24 
24 
     | 
    
         
             
                      = @layout.updated_at
         
     | 
| 
       25 
25 
     | 
    
         
             
                    %li
         
     | 
| 
       26 
     | 
    
         
            -
                      %label  
     | 
| 
       27 
     | 
    
         
            -
                       
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                       
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
                      = f.text_field :javascripts
         
     | 
| 
       36 
     | 
    
         
            -
                      %br
         
     | 
| 
       37 
     | 
    
         
            -
                      Existing javascripts:
         
     | 
| 
       38 
     | 
    
         
            -
                      = HtmlAsset.where(:file_type=>"js").sys(_sid).order(:name).all.collect {|s| s.name}.join(", ")
         
     | 
| 
       39 
     | 
    
         
            -
                      .dehighlight
         
     | 
| 
       40 
     | 
    
         
            -
                        Comma separated list of javascripts to include.  If left blank it will default to none.
         
     | 
| 
      
 26 
     | 
    
         
            +
                      %label CSS
         
     | 
| 
      
 27 
     | 
    
         
            +
                      - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"css").each do |ha|
         
     | 
| 
      
 28 
     | 
    
         
            +
                        = ha.name
         
     | 
| 
      
 29 
     | 
    
         
            +
                        = check_box_tag "layout[html_asset_ids][]", ha.id, layout_asset_selected(ha)
         
     | 
| 
      
 30 
     | 
    
         
            +
                    %li
         
     | 
| 
      
 31 
     | 
    
         
            +
                      %label Javascript
         
     | 
| 
      
 32 
     | 
    
         
            +
                      - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"js").each do |ha|
         
     | 
| 
      
 33 
     | 
    
         
            +
                        = ha.name
         
     | 
| 
      
 34 
     | 
    
         
            +
                        = check_box_tag "layout[html_asset_ids][]", ha.id, layout_asset_selected(ha)
         
     | 
| 
       41 
35 
     | 
    
         
             
                    %li
         
     | 
| 
       42 
36 
     | 
    
         
             
                      %label Body
         
     | 
| 
       43 
     | 
    
         
            -
                      = cm_editor(' 
     | 
| 
      
 37 
     | 
    
         
            +
                      = cm_editor('layout[body]', {:mode=>'html'})
         
     | 
| 
       44 
38 
     | 
    
         | 
| 
       45 
39 
     | 
    
         
             
                    %li(style="margin-top: 10px;")
         
     | 
| 
       46 
40 
     | 
    
         
             
                      = render :partial=>"utility/design_history", :locals=>{:object=>@layout}
         
     | 
| 
         @@ -43,27 +43,19 @@ 
     | 
|
| 
       43 
43 
     | 
    
         
             
                      If this template has an equivalent version for mobile devices, select it here.  As such, practically this is mutually exclusive with the "For mobile devices" option above.
         
     | 
| 
       44 
44 
     | 
    
         
             
                %p
         
     | 
| 
       45 
45 
     | 
    
         
             
                  = f.label :body
         
     | 
| 
       46 
     | 
    
         
            -
                  = cm_editor(' 
     | 
| 
      
 46 
     | 
    
         
            +
                  = cm_editor('page_template[body]', {:mode=>'xml'})
         
     | 
| 
       47 
47 
     | 
    
         
             
                  .field_help
         
     | 
| 
       48 
48 
     | 
    
         
             
                    The content of the template.  
         
     | 
| 
       49 
49 
     | 
    
         
             
                %p
         
     | 
| 
       50 
     | 
    
         
            -
                   
     | 
| 
       51 
     | 
    
         
            -
                   
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
                  = HtmlAsset.sys(_sid).order(:name).where(:file_type=>"css").all.collect {|s| s.name}.join(", ")
         
     | 
| 
       55 
     | 
    
         
            -
                  .field_help
         
     | 
| 
       56 
     | 
    
         
            -
                    Comma separated list of stylesheets to include.  If left blank it will default to the standard 'application'. Do not use a file extension.
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
      
 50 
     | 
    
         
            +
                  %label CSS
         
     | 
| 
      
 51 
     | 
    
         
            +
                  - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"css").each do |ha|
         
     | 
| 
      
 52 
     | 
    
         
            +
                    = ha.name
         
     | 
| 
      
 53 
     | 
    
         
            +
                    = check_box_tag "page_template[html_asset_ids][]", ha.id, page_template_asset_selected(ha)
         
     | 
| 
       58 
54 
     | 
    
         
             
                %p
         
     | 
| 
       59 
     | 
    
         
            -
                   
     | 
| 
       60 
     | 
    
         
            -
                   
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                  = HtmlAsset.sys(_sid).order(:name).where(:file_type=>"js").all.collect {|s| s.name}.join(", ")
         
     | 
| 
       64 
     | 
    
         
            -
                  .field_help
         
     | 
| 
       65 
     | 
    
         
            -
                    Comma separated list of javascripts to include.  If left blank it will default to none. Do not use a file extension.
         
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
      
 55 
     | 
    
         
            +
                  %label Javascript
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - HtmlAsset.sys(_sid).order(:name).where(:file_type=>"js").each do |ha|
         
     | 
| 
      
 57 
     | 
    
         
            +
                    = ha.name
         
     | 
| 
      
 58 
     | 
    
         
            +
                    = check_box_tag "page_template[html_asset_ids][]", ha.id, page_template_asset_selected(ha)
         
     | 
| 
       67 
59 
     | 
    
         | 
| 
       68 
60 
     | 
    
         
             
                %p
         
     | 
| 
       69 
61 
     | 
    
         
             
                  = kit_submit "Save"
         
     | 
| 
         @@ -60,19 +60,20 @@ 
     | 
|
| 
       60 
60 
     | 
    
         
             
                %strong Stylesheets
         
     | 
| 
       61 
61 
     | 
    
         
             
                %br
         
     | 
| 
       62 
62 
     | 
    
         
             
                Layout:
         
     | 
| 
       63 
     | 
    
         
            -
                =  
     | 
| 
      
 63 
     | 
    
         
            +
                = @page_template.layout.html_assets.where(:file_type=>"css").pluck(:name).join(", ")
         
     | 
| 
       64 
64 
     | 
    
         
             
                %br
         
     | 
| 
       65 
65 
     | 
    
         
             
                Template:
         
     | 
| 
       66 
     | 
    
         
            -
                =  
     | 
| 
      
 66 
     | 
    
         
            +
                = @page_template.html_assets.where(:file_type=>"css").pluck(:name).join(", ")
         
     | 
| 
       67 
67 
     | 
    
         | 
| 
       68 
68 
     | 
    
         
             
              %p
         
     | 
| 
       69 
69 
     | 
    
         
             
                %strong Javascripts
         
     | 
| 
       70 
70 
     | 
    
         
             
                %br
         
     | 
| 
       71 
71 
     | 
    
         
             
                Layout:
         
     | 
| 
       72 
     | 
    
         
            -
                =  
     | 
| 
      
 72 
     | 
    
         
            +
                = @page_template.layout.html_assets.where(:file_type=>"js").pluck(:name).join(", ")
         
     | 
| 
       73 
73 
     | 
    
         
             
                %br
         
     | 
| 
       74 
74 
     | 
    
         
             
                Template:
         
     | 
| 
       75 
     | 
    
         
            -
                =  
     | 
| 
      
 75 
     | 
    
         
            +
                = @page_template.html_assets.where(:file_type=>"js").pluck(:name).join(", ")
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
       76 
77 
     | 
    
         | 
| 
       77 
78 
     | 
    
         
             
              %p
         
     | 
| 
       78 
79 
     | 
    
         
             
                %strong= icon_to "Terms: ", "/admin/page_template_terms?page_template_id=#{@page_template.id}", false, :style=>"margin-right: 20px;"
         
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon= "Notification Queue '#{@publisher.name}' Events"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style='margin: 20px 0;')
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to "Notification Queue", "/admin/q/#{@publisher.id}"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              - events = @publisher.q_events.order("id desc").page(params[:e_page]).per(100)
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              = paginate events, :params_name=>:e_page
         
     | 
| 
      
 11 
     | 
    
         
            +
              %table.loosen_more
         
     | 
| 
      
 12 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 13 
     | 
    
         
            +
                  %th Topic
         
     | 
| 
      
 14 
     | 
    
         
            +
                  %th Occurred 
         
     | 
| 
      
 15 
     | 
    
         
            +
                  %th Processed
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %th Class
         
     | 
| 
      
 17 
     | 
    
         
            +
                  %th Data
         
     | 
| 
      
 18 
     | 
    
         
            +
                - events.each do |e|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 20 
     | 
    
         
            +
                    %td= e.topic
         
     | 
| 
      
 21 
     | 
    
         
            +
                    %td= time_ago_in_words e.created_at
         
     | 
| 
      
 22 
     | 
    
         
            +
                    %td= time_ago_in_words e.processed_at rescue ''
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %td= e.klass
         
     | 
| 
      
 24 
     | 
    
         
            +
                    %td= field_reveal(e.data, 250)
         
     | 
| 
      
 25 
     | 
    
         
            +
              = paginate events, :param_name=>:e_page
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do 
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon Notification Queue Publishers
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style="margin: 20px 0;")
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to_show "Create", "create"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              #create(style="display: none;")
         
     | 
| 
      
 9 
     | 
    
         
            +
                = form_for @q_publisher, :url=>"/admin/q" do |f|
         
     | 
| 
      
 10 
     | 
    
         
            +
                  %label Name:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  = f.text_field :name
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                  = kit_submit "Create"
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              %table.loosen
         
     | 
| 
      
 16 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 17 
     | 
    
         
            +
                  %th Name
         
     | 
| 
      
 18 
     | 
    
         
            +
                  %th Authentication Method
         
     | 
| 
      
 19 
     | 
    
         
            +
                  %th Authentication ID
         
     | 
| 
      
 20 
     | 
    
         
            +
                  %th Delete
         
     | 
| 
      
 21 
     | 
    
         
            +
                - @publishers.each do |publisher|
         
     | 
| 
      
 22 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %td= link_to publisher.name, "/admin/q/#{publisher.id}"
         
     | 
| 
      
 24 
     | 
    
         
            +
                    %td= publisher.auth_method
         
     | 
| 
      
 25 
     | 
    
         
            +
                    %td= publisher.auth_id
         
     | 
| 
      
 26 
     | 
    
         
            +
                    %td= button_to "Delete", "/admin/q/#{publisher.id}", :method=>:delete, :confirm=>"Are you sure?"
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,61 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon= "Notification Queue '#{@publisher.name}' Classes"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style='margin: 20px 0;')
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to "Notification Queue", "/admin/q/#{@publisher.id}"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              = icon_to_show 'Create', 'create' unless params[:klass_id]
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              #create.klass(style="#{'display: none;' unless params[:klass_id]}")
         
     | 
| 
      
 11 
     | 
    
         
            +
                = form_for @q_klass, :url=>"/admin/q/#{@publisher.id}/klasses" do |f|
         
     | 
| 
      
 12 
     | 
    
         
            +
                  = f.hidden_field :id if @q_klass.id
         
     | 
| 
      
 13 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 14 
     | 
    
         
            +
                    %label Name:
         
     | 
| 
      
 15 
     | 
    
         
            +
                    = f.text_field :name
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 18 
     | 
    
         
            +
                    %label Method:
         
     | 
| 
      
 19 
     | 
    
         
            +
                    = f.select :notification_method, options_for_select(["twitter", "email"])
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 22 
     | 
    
         
            +
                    %label Heading 1 (h1) Code:
         
     | 
| 
      
 23 
     | 
    
         
            +
                    - @q_klass.h1_code ||= ''
         
     | 
| 
      
 24 
     | 
    
         
            +
                    = cm_editor('q_klass[h1_code]', {:mode=>'ruby'})
         
     | 
| 
      
 25 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 26 
     | 
    
         
            +
                    %label Heading 2 (h2) Code:
         
     | 
| 
      
 27 
     | 
    
         
            +
                    - @q_klass.h2_code ||= ''
         
     | 
| 
      
 28 
     | 
    
         
            +
                    = cm_editor('q_klass[h2_code]', {:mode=>'ruby'})
         
     | 
| 
      
 29 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 30 
     | 
    
         
            +
                    %label Message Code:
         
     | 
| 
      
 31 
     | 
    
         
            +
                    - @q_klass.message_code ||= ''
         
     | 
| 
      
 32 
     | 
    
         
            +
                    = cm_editor('q_klass[message_code]', {:mode=>'ruby'})
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  %p
         
     | 
| 
      
 35 
     | 
    
         
            +
                    = kit_submit "Save"
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
              - klasses = @publisher.q_klasses.order("id desc").page(params[:page]).per(100)
         
     | 
| 
      
 38 
     | 
    
         
            +
              
         
     | 
| 
      
 39 
     | 
    
         
            +
              = paginate klasses, :param_name=>:page
         
     | 
| 
      
 40 
     | 
    
         
            +
              
         
     | 
| 
      
 41 
     | 
    
         
            +
              %table.loosen_more
         
     | 
| 
      
 42 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 43 
     | 
    
         
            +
                  %th Name
         
     | 
| 
      
 44 
     | 
    
         
            +
                  %th Method
         
     | 
| 
      
 45 
     | 
    
         
            +
                  %th h1 Code
         
     | 
| 
      
 46 
     | 
    
         
            +
                  %th h2 Code
         
     | 
| 
      
 47 
     | 
    
         
            +
                - klasses.each do |k|
         
     | 
| 
      
 48 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 49 
     | 
    
         
            +
                    %td= link_to k.name, "/admin/q/#{@publisher.id}/klasses/#{k.id}"
         
     | 
| 
      
 50 
     | 
    
         
            +
                    %td= k.notification_method
         
     | 
| 
      
 51 
     | 
    
         
            +
                    %td
         
     | 
| 
      
 52 
     | 
    
         
            +
                      %pre
         
     | 
| 
      
 53 
     | 
    
         
            +
                        = k.h1_code
         
     | 
| 
      
 54 
     | 
    
         
            +
                    %td
         
     | 
| 
      
 55 
     | 
    
         
            +
                      %pre
         
     | 
| 
      
 56 
     | 
    
         
            +
                        = k.h2_code
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
              = paginate klasses, :param_name=>:page
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,37 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon= "Notification Queue '#{@publisher.name}' Sent Notifications"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style='margin: 20px 0;')
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to "Notification Queue", "/admin/q/#{@publisher.id}"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              - sents = @publisher.q_messages.includes([:q_user, :q_event]).order("id desc").page(params[:page]).per(100)
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              = paginate sents
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              %table.loosen_more
         
     | 
| 
      
 13 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 14 
     | 
    
         
            +
                  %th User
         
     | 
| 
      
 15 
     | 
    
         
            +
                  %th Status
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %th Topic 
         
     | 
| 
      
 17 
     | 
    
         
            +
                  %th Sent
         
     | 
| 
      
 18 
     | 
    
         
            +
                  %th Destination
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
                  %th Message
         
     | 
| 
      
 21 
     | 
    
         
            +
                - sents.each do |s|
         
     | 
| 
      
 22 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %td(nowrap)= "#{s.q_user.email} [ #{s.q_user.id} ]"
         
     | 
| 
      
 24 
     | 
    
         
            +
                    %td(width="150")= s.status
         
     | 
| 
      
 25 
     | 
    
         
            +
                    %td= s.q_event.topic 
         
     | 
| 
      
 26 
     | 
    
         
            +
                    %td= time_ago_in_words s.created_at rescue ''
         
     | 
| 
      
 27 
     | 
    
         
            +
                    %td= s.destination
         
     | 
| 
      
 28 
     | 
    
         
            +
                    %td
         
     | 
| 
      
 29 
     | 
    
         
            +
                      = s.h1
         
     | 
| 
      
 30 
     | 
    
         
            +
                      %br
         
     | 
| 
      
 31 
     | 
    
         
            +
                      = s.h2
         
     | 
| 
      
 32 
     | 
    
         
            +
                      %br
         
     | 
| 
      
 33 
     | 
    
         
            +
                      = field_reveal(s.body, 500)
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
              = paginate sents
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
             
     |