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
 
| 
         @@ -0,0 +1,98 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              .auth
         
     | 
| 
      
 4 
     | 
    
         
            +
                %h1.notificationqueue_icon Notification Queue '#{@publisher.name}'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                .link(style='margin: 20px 0;')
         
     | 
| 
      
 7 
     | 
    
         
            +
                  = icon_to "Notification Queue Publishers", "/admin/q" if is_admin?
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                = icon_to_show "Create Event", "create" 
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                #create(style="display: none;")
         
     | 
| 
      
 12 
     | 
    
         
            +
                  = form_for @event, :url=>"/admin/q/#{@publisher.id}" do |f|
         
     | 
| 
      
 13 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 14 
     | 
    
         
            +
                      %label Topic
         
     | 
| 
      
 15 
     | 
    
         
            +
                      = f.text_field :topic
         
     | 
| 
      
 16 
     | 
    
         
            +
                    
         
     | 
| 
      
 17 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 18 
     | 
    
         
            +
                      %label Class
         
     | 
| 
      
 19 
     | 
    
         
            +
                      = f.select :klass, options_from_collection_for_select(@publisher.q_klasses.select("distinct name").all, :name, :name, @event.klass), :include_blank=>true
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 22 
     | 
    
         
            +
                      %label Data
         
     | 
| 
      
 23 
     | 
    
         
            +
                      = f.text_area :data
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 26 
     | 
    
         
            +
                      %label
         
     | 
| 
      
 27 
     | 
    
         
            +
                      = kit_submit "Create"
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                .advanced
         
     | 
| 
      
 30 
     | 
    
         
            +
                  %h3
         
     | 
| 
      
 31 
     | 
    
         
            +
                    Classes: 
         
     | 
| 
      
 32 
     | 
    
         
            +
                    = @publisher.q_klasses.count
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
                  = icon_to "Classes", "/admin/q/#{@publisher.id}/klasses"
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                %h3
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Sent:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  = @publisher.q_messages.count
         
     | 
| 
      
 39 
     | 
    
         
            +
                
         
     | 
| 
      
 40 
     | 
    
         
            +
                = icon_to "Sent", "/admin/q/#{@publisher.id}/messages" 
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                %h3 
         
     | 
| 
      
 43 
     | 
    
         
            +
                  Events:
         
     | 
| 
      
 44 
     | 
    
         
            +
                  = @publisher.q_events.count
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
                = icon_to "Events", "/admin/q/#{@publisher.id}/events" 
         
     | 
| 
      
 47 
     | 
    
         
            +
             
         
     | 
| 
      
 48 
     | 
    
         
            +
                %h3 
         
     | 
| 
      
 49 
     | 
    
         
            +
                  Subscriptions:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  = @publisher.q_subscriptions.count
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                = icon_to "Subscriptions", "/admin/q/#{@publisher.id}/subscriptions" 
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                %h3 
         
     | 
| 
      
 55 
     | 
    
         
            +
                  Users:
         
     | 
| 
      
 56 
     | 
    
         
            +
                  = @publisher.q_users.count
         
     | 
| 
      
 57 
     | 
    
         
            +
             
     | 
| 
      
 58 
     | 
    
         
            +
                = icon_to "Users", "/admin/q/#{@publisher.id}/users" 
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                .advanced(style="margin-top: 10px;")
         
     | 
| 
      
 61 
     | 
    
         
            +
                  = icon_to_show("Authentication", "auth") unless params[:auth]
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                  #auth(style='#{"display: none; " unless params[:auth]} margin-top: 10px;')
         
     | 
| 
      
 64 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 65 
     | 
    
         
            +
                      %label Name: 
         
     | 
| 
      
 66 
     | 
    
         
            +
                      = best_in_place @publisher, :name, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 67 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 68 
     | 
    
         
            +
                      %label EMail (sender): 
         
     | 
| 
      
 69 
     | 
    
         
            +
                      = best_in_place @publisher, :mail_from, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 70 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 71 
     | 
    
         
            +
                      %label Callback Auth URL:
         
     | 
| 
      
 72 
     | 
    
         
            +
                      = best_in_place @publisher, :callback_auth_url, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 73 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 74 
     | 
    
         
            +
                      %label Auth ID: 
         
     | 
| 
      
 75 
     | 
    
         
            +
                      = best_in_place @publisher, :auth_id, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 76 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 77 
     | 
    
         
            +
                      %label Method: 
         
     | 
| 
      
 78 
     | 
    
         
            +
                      = best_in_place @publisher, :auth_method, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 79 
     | 
    
         
            +
                      Typically: digest, token
         
     | 
| 
      
 80 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 81 
     | 
    
         
            +
                      %label Token: 
         
     | 
| 
      
 82 
     | 
    
         
            +
                      = best_in_place @publisher, :token, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 83 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 84 
     | 
    
         
            +
                      %label Auth Secret: 
         
     | 
| 
      
 85 
     | 
    
         
            +
                      = best_in_place @publisher, :auth_secret, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 86 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 87 
     | 
    
         
            +
                      %label Twitter Consumer Key:
         
     | 
| 
      
 88 
     | 
    
         
            +
                      = best_in_place @publisher, :twitter_consumer_key, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 89 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 90 
     | 
    
         
            +
                      %label Twitter Consumer Secret:
         
     | 
| 
      
 91 
     | 
    
         
            +
                      = best_in_place @publisher, :twitter_consumer_secret, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 92 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 93 
     | 
    
         
            +
                      %label Twitter OAuth Token:
         
     | 
| 
      
 94 
     | 
    
         
            +
                      = best_in_place @publisher, :twitter_oauth_token, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 95 
     | 
    
         
            +
                    %p
         
     | 
| 
      
 96 
     | 
    
         
            +
                      %label Twitter OAuth Token Scret:
         
     | 
| 
      
 97 
     | 
    
         
            +
                      = best_in_place @publisher, :twitter_oauth_token_secret, :path=>"/admin/q/#{@publisher.id}"
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,26 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon= "Notification Queue '#{@publisher.name}' Subscriptions"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style='margin: 20px 0;')
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to "Notification Queue", "/admin/q/#{@publisher.id}"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              - subscriptions = @publisher.q_subscriptions.includes(:q_user).order("id desc").page(params[:s_page]).per(100)
         
     | 
| 
      
 9 
     | 
    
         
            +
              
         
     | 
| 
      
 10 
     | 
    
         
            +
              %table.loosen_more
         
     | 
| 
      
 11 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 12 
     | 
    
         
            +
                  %th Topic
         
     | 
| 
      
 13 
     | 
    
         
            +
                  %th Created
         
     | 
| 
      
 14 
     | 
    
         
            +
                  %th User ID
         
     | 
| 
      
 15 
     | 
    
         
            +
                  %th Address
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %th Last Notification Sent
         
     | 
| 
      
 17 
     | 
    
         
            +
                  
         
     | 
| 
      
 18 
     | 
    
         
            +
                - subscriptions.each do |s|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 20 
     | 
    
         
            +
                    %td= s.topic
         
     | 
| 
      
 21 
     | 
    
         
            +
                    %td= time_ago_in_words(s.created_at) 
         
     | 
| 
      
 22 
     | 
    
         
            +
                    %td= s.q_user.email
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %td= s.q_user.methods
         
     | 
| 
      
 24 
     | 
    
         
            +
                    %td= time_ago_in_words(s.last_notification) rescue ''
         
     | 
| 
      
 25 
     | 
    
         
            +
              = paginate subscriptions, :param_name=>:s_page
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1,27 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            - content_for :main do
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              %h1.notificationqueue_icon= "Notification Queue '#{@client.name}' Users"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
              .link(style='margin: 20px 0;')
         
     | 
| 
      
 6 
     | 
    
         
            +
                = icon_to "Notification Queue", "/admin/q/#{@client.id}"
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
              - users = @client.q_users.order("id desc").page(params[:u_page]).per(100)
         
     | 
| 
      
 9 
     | 
    
         
            +
              
         
     | 
| 
      
 10 
     | 
    
         
            +
              = paginate users, :param_name=>:u_page
         
     | 
| 
      
 11 
     | 
    
         
            +
              %table.loosen_more
         
     | 
| 
      
 12 
     | 
    
         
            +
                %tr
         
     | 
| 
      
 13 
     | 
    
         
            +
                  %th External ID
         
     | 
| 
      
 14 
     | 
    
         
            +
                  %th Created 
         
     | 
| 
      
 15 
     | 
    
         
            +
                  %th Updated
         
     | 
| 
      
 16 
     | 
    
         
            +
                  %th Method
         
     | 
| 
      
 17 
     | 
    
         
            +
                  %th Address
         
     | 
| 
      
 18 
     | 
    
         
            +
                - users.each do |u|
         
     | 
| 
      
 19 
     | 
    
         
            +
                  %tr
         
     | 
| 
      
 20 
     | 
    
         
            +
                    %td= u.q_external_id
         
     | 
| 
      
 21 
     | 
    
         
            +
                    %td= time_ago_in_words(u.created_at)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    %td= time_ago_in_words(u.updated_at)
         
     | 
| 
      
 23 
     | 
    
         
            +
                    %td= u.notification_method
         
     | 
| 
      
 24 
     | 
    
         
            +
                    %td= u.display_notification
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
         @@ -21,7 +21,7 @@ 
     | 
|
| 
       21 
21 
     | 
    
         
             
                  - if flash[:notice]
         
     | 
| 
       22 
22 
     | 
    
         
             
                    #error_explanation
         
     | 
| 
       23 
23 
     | 
    
         
             
                      = flash[:notice]
         
     | 
| 
       24 
     | 
    
         
            -
                  = cm_editor( 
     | 
| 
      
 24 
     | 
    
         
            +
                  = cm_editor("sheet[body]", {:mode=>'scss'})
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
                  = kit_submit "Save"
         
     | 
| 
       27 
27 
     | 
    
         
             
                  = link_to "Delete", "/admin/stylesheet/#{@sheet.id}", :method=>:delete, :class=>"action", :confirm=>"Are you sure you want to delete this stylesheet?  It cannot be undone."
         
     | 
| 
         @@ -27,7 +27,7 @@ 
     | 
|
| 
       27 
27 
     | 
    
         
             
                    <td>
         
     | 
| 
       28 
28 
     | 
    
         
             
                        <select name="grp_id">
         
     | 
| 
       29 
29 
     | 
    
         
             
                          <option></option>
         
     | 
| 
       30 
     | 
    
         
            -
                          <%= options_from_collection_for_select(Group.order(:name).all, "id", "name", params[:grp_id]) %>
         
     | 
| 
      
 30 
     | 
    
         
            +
                          <%= options_from_collection_for_select(Group.sys(_sid).order(:name).all, "id", "name", params[:grp_id]) %>
         
     | 
| 
       31 
31 
     | 
    
         
             
                        </select>
         
     | 
| 
       32 
32 
     | 
    
         
             
                        <div class="field_help">
         
     | 
| 
       33 
33 
     | 
    
         
             
                          Optional: a group to which the user(s) belong(s)
         
     | 
| 
         @@ -52,14 +52,23 @@ 
     | 
|
| 
       52 
52 
     | 
    
         
             
              <% if @users != nil  %> 
         
     | 
| 
       53 
53 
     | 
    
         
             
              <div style="margin-top: 10px;" id="user-list">
         
     | 
| 
       54 
54 
     | 
    
         
             
                <%= paginate(@users) %>
         
     | 
| 
       55 
     | 
    
         
            -
                < 
     | 
| 
      
 55 
     | 
    
         
            +
                <table class='loosen'>
         
     | 
| 
      
 56 
     | 
    
         
            +
                  <tr>
         
     | 
| 
      
 57 
     | 
    
         
            +
                    <th>Email</th>
         
     | 
| 
      
 58 
     | 
    
         
            +
                    <th>Nickname</th>
         
     | 
| 
      
 59 
     | 
    
         
            +
                    <th>Status</th>
         
     | 
| 
      
 60 
     | 
    
         
            +
                    <th>Last Sign In</th>
         
     | 
| 
      
 61 
     | 
    
         
            +
                  </tr>
         
     | 
| 
       56 
62 
     | 
    
         
             
                  <% @users.each do |user| %>
         
     | 
| 
       57 
63 
     | 
    
         
             
                    <% next if user.id.to_i==1 %>
         
     | 
| 
       58 
     | 
    
         
            -
                    < 
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
      
 64 
     | 
    
         
            +
                    <tr>
         
     | 
| 
      
 65 
     | 
    
         
            +
                      <td><%= link_to user.email, "/admin/user/#{user.id}" %></td>
         
     | 
| 
      
 66 
     | 
    
         
            +
                        <td><i><%= user.display_name %></i></td>
         
     | 
| 
      
 67 
     | 
    
         
            +
                        <td><%= user.status_display %></td>
         
     | 
| 
      
 68 
     | 
    
         
            +
                        <td><%= time_ago_in_words user.last_sign_in_at rescue 'not signed in' %></td>
         
     | 
| 
      
 69 
     | 
    
         
            +
                      </tr>
         
     | 
| 
       61 
70 
     | 
    
         
             
                  <% end %>
         
     | 
| 
       62 
     | 
    
         
            -
                </ 
     | 
| 
      
 71 
     | 
    
         
            +
                </table>
         
     | 
| 
       63 
72 
     | 
    
         
             
              </div>
         
     | 
| 
       64 
73 
     | 
    
         | 
| 
       65 
74 
     | 
    
         | 
| 
         @@ -15,12 +15,12 @@ 
     | 
|
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              <% if Preference.get_cached(_sid, 'show_groups') %>
         
     | 
| 
       17 
17 
     | 
    
         
             
              <tr><td valign='top'><%= link_to "Groups", "/admin/groups" %>:</td><td>
         
     | 
| 
       18 
     | 
    
         
            -
                  <%= @user.groups.map {|g| link_to g.name, "/admin/user/#{@user.id}/group/#{g.id}", :method=>"delete" }.join(", ").html_safe %>
         
     | 
| 
      
 18 
     | 
    
         
            +
                  <%= @user.groups.sys(_sid).map {|g| link_to g.name, "/admin/user/#{@user.id}/group/#{g.id}", :method=>"delete" }.join(", ").html_safe %>
         
     | 
| 
       19 
19 
     | 
    
         
             
                  <%= "<span class='field_help'>click to remove</span>".html_safe if @user.groups.size>0 %>
         
     | 
| 
       20 
20 
     | 
    
         
             
                    <% one_group = false %>
         
     | 
| 
       21 
21 
     | 
    
         
             
                  <div style="display: none;" id="add_to_groups">
         
     | 
| 
       22 
22 
     | 
    
         
             
                    <ul>
         
     | 
| 
       23 
     | 
    
         
            -
                      <% Group.order(:name).all.each do |group| %>
         
     | 
| 
      
 23 
     | 
    
         
            +
                      <% Group.sys(_sid).order(:name).all.each do |group| %>
         
     | 
| 
       24 
24 
     | 
    
         
             
                      <% next if @user.groups.include?(group)  %>
         
     | 
| 
       25 
25 
     | 
    
         
             
                      <li>
         
     | 
| 
       26 
26 
     | 
    
         
             
                      <% one_group = true %>
         
     | 
| 
         @@ -44,11 +44,12 @@ 
     | 
|
| 
       44 
44 
     | 
    
         | 
| 
       45 
45 
     | 
    
         
             
              <tr><td width="200">Sign in count:</td><td><%= @user.sign_in_count %></td></tr>
         
     | 
| 
       46 
46 
     | 
    
         
             
              <tr><td>Registered:</td><td><%= time_ago_in_words(@user.created_at) %> ago at <%= @user.created_at %></td></tr>
         
     | 
| 
      
 47 
     | 
    
         
            +
              <tr><td>Sign Up IP:</td><td><%= ip_info_link @user.sign_up_ip rescue '' %></td></tr>
         
     | 
| 
       47 
48 
     | 
    
         
             
                <tr><td>Last sign in:</td><td><%= time_ago_in_words(@user.last_sign_in_at) rescue 'never' %> ago at <%= @user.last_sign_in_at rescue 'never' %></tr>
         
     | 
| 
       48 
49 
     | 
    
         
             
                <tr><td>Current sign in:</td><td><%= time_ago_in_words(@user.current_sign_in_at) rescue 'never' %> ago at <%= @user.current_sign_in_at rescue 'never'%></tr>
         
     | 
| 
       49 
     | 
    
         
            -
                  <tr><td>Current sign in IP:</td><td><%= @user.current_sign_in_ip %></td></tr>
         
     | 
| 
      
 50 
     | 
    
         
            +
                  <tr><td>Current sign in IP:</td><td><%= ip_info_link @user.current_sign_in_ip %></td></tr>
         
     | 
| 
       50 
51 
     | 
    
         
             
                  <tr><td>Last sign in:</td><td><%= time_ago_in_words(@user.last_sign_in_at) rescue 'never' %></td></tr>
         
     | 
| 
       51 
     | 
    
         
            -
                  <tr><td>Last sign in IP:</td><td><%= @user.last_sign_in_ip rescue 'none' %></td></tr>
         
     | 
| 
      
 52 
     | 
    
         
            +
                  <tr><td>Last sign in IP:</td><td><%= @user.last_sign_in_up ? ip_info_link(@user.last_sign_in_ip) : '' rescue 'none' %></td></tr>
         
     | 
| 
       52 
53 
     | 
    
         
             
                  <% if feature?("newsletters") %>
         
     | 
| 
       53 
54 
     | 
    
         
             
                  <tr><td>Subscribed Newsletter:</td><td><%= @user.subscribe_newsletter==1 ? 'Yes' : 'No' %>
         
     | 
| 
       54 
55 
     | 
    
         
             
                      <%= link_to "Unsubscribe", "/admin/user/#{@user.id}?newsletter=0", :class=>"action_pl" if @user.subscribe_newsletter==1 %>
         
     | 
| 
         @@ -11,17 +11,17 @@ 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                %p
         
     | 
| 
       13 
13 
     | 
    
         
             
                  = f.label :body
         
     | 
| 
       14 
     | 
    
         
            -
                  = cm_editor(" 
     | 
| 
      
 14 
     | 
    
         
            +
                  = cm_editor("view[body]", {:mode=>"html", :height=>"400px"})
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
                %p
         
     | 
| 
       17 
17 
     | 
    
         
             
                  = f.label :header
         
     | 
| 
       18 
     | 
    
         
            -
                  = cm_editor(" 
     | 
| 
      
 18 
     | 
    
         
            +
                  = cm_editor("view[header]", {:mode=>"html", :height=>"120px"})
         
     | 
| 
       19 
19 
     | 
    
         
             
                  .field_help
         
     | 
| 
       20 
20 
     | 
    
         
             
                    Optional
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                %p
         
     | 
| 
       23 
23 
     | 
    
         
             
                  = f.label :footer
         
     | 
| 
       24 
     | 
    
         
            -
                  = cm_editor(" 
     | 
| 
      
 24 
     | 
    
         
            +
                  = cm_editor("view[footer]", {:mode=>"html", :height=>"120px"})
         
     | 
| 
       25 
25 
     | 
    
         
             
                  .field_help
         
     | 
| 
       26 
26 
     | 
    
         
             
                    Optional
         
     | 
| 
       27 
27 
     | 
    
         | 
| 
         @@ -81,7 +81,7 @@ 
     | 
|
| 
       81 
81 
     | 
    
         
             
                  Owner options: 
         
     | 
| 
       82 
82 
     | 
    
         
             
                  = link_to options[:list_sold_label] || "Show Sold Tickets", options[:list_sold_url]
         
     | 
| 
       83 
83 
     | 
    
         | 
| 
       84 
     | 
    
         
            -
              - if options[:sell_tickets_setup_url] && entry.sell_tickets==0 && ( (current_user && entry.user_id == current_user.id ) || current_user.admin?)
         
     | 
| 
      
 84 
     | 
    
         
            +
              - if options[:sell_tickets_setup_url] && entry.sell_tickets==0 && ( (current_user && entry.user_id == current_user.id ) || (current_user && current_user.admin?))
         
     | 
| 
       85 
85 
     | 
    
         
             
                = link_to options[:sell_tickets_setup_label] || "Sell Tickets For This Online", options[:sell_tickets_setup_url]
         
     | 
| 
       86 
86 
     | 
    
         | 
| 
       87 
87 
     | 
    
         | 
| 
         @@ -101,10 +101,11 @@ 
     | 
|
| 
       101 
101 
     | 
    
         
             
                      - col += 1
         
     | 
| 
       102 
102 
     | 
    
         | 
| 
       103 
103 
     | 
    
         
             
                  %td(id="box_#{key}" rel="#{key}" class="date_box #{date.strftime("%A").downcase if key==1} #{'today' if (date+(key-1).days).to_date==Date.today}")
         
     | 
| 
      
 104 
     | 
    
         
            +
                    .day_wrap
         
     | 
| 
       104 
105 
     | 
    
         
             
                    - if mini
         
     | 
| 
       105 
106 
     | 
    
         
             
                      = key
         
     | 
| 
       106 
107 
     | 
    
         
             
                    - else
         
     | 
| 
       107 
     | 
    
         
            -
                      =  
     | 
| 
      
 108 
     | 
    
         
            +
                      = link_to key, "jump_details", :onClick=>"month_show_day(#{key})"
         
     | 
| 
       108 
109 
     | 
    
         
             
                    - if days.size==0 || mini
         
     | 
| 
       109 
110 
     | 
    
         
             
                       
         
     | 
| 
       110 
111 
     | 
    
         
             
                    - else 
         
     | 
| 
         @@ -118,11 +119,12 @@ 
     | 
|
| 
       118 
119 
     | 
    
         
             
                              .event_count
         
     | 
| 
       119 
120 
     | 
    
         
             
                                = "#{cnt}"
         
     | 
| 
       120 
121 
     | 
    
         | 
| 
       121 
     | 
    
         
            -
                            =  
     | 
| 
      
 122 
     | 
    
         
            +
                            = link_to "more...", "jump_details", :onClick=>"month_show_day(#{key})"
         
     | 
| 
       122 
123 
     | 
    
         
             
                            - break
         
     | 
| 
       123 
124 
     | 
    
         
             
                          - else
         
     | 
| 
       124 
     | 
    
         
            -
                             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
      
 125 
     | 
    
         
            +
                            .day_entry
         
     | 
| 
      
 126 
     | 
    
         
            +
                              = "*" unless entry.approved_at
         
     | 
| 
      
 127 
     | 
    
         
            +
                              = link_to truncate(entry.name, :length=>20), "jump_details", :onClick=>"month_show_entry(#{key}, #{entry.id})"
         
     | 
| 
       126 
128 
     | 
    
         | 
| 
       127 
129 
     | 
    
         | 
| 
       128 
130 
     | 
    
         
             
                  - if col==7
         
     | 
| 
         @@ -137,13 +139,11 @@ 
     | 
|
| 
       137 
139 
     | 
    
         
             
                    - need_close = true
         
     | 
| 
       138 
140 
     | 
    
         | 
| 
       139 
141 
     | 
    
         
             
                = "</tr>".html_safe if need_close
         
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
             
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
142 
     | 
    
         | 
| 
       144 
143 
     | 
    
         
             
              .clear
         
     | 
| 
       145 
144 
     | 
    
         | 
| 
       146 
145 
     | 
    
         
             
              - unless mini
         
     | 
| 
      
 146 
     | 
    
         
            +
                %a(id="jump_details")
         
     | 
| 
       147 
147 
     | 
    
         
             
                .details
         
     | 
| 
       148 
148 
     | 
    
         
             
                  - entries.keys.sort.each do |key|
         
     | 
| 
       149 
149 
     | 
    
         
             
                    %ul(id="day_#{key}" style="display: none;")
         
     | 
| 
         @@ -57,7 +57,7 @@ 
     | 
|
| 
       57 
57 
     | 
    
         
             
                      %ul
         
     | 
| 
       58 
58 
     | 
    
         
             
                        - other_fields.each do |field|
         
     | 
| 
       59 
59 
     | 
    
         
             
                          - next if field.hidden==1
         
     | 
| 
       60 
     | 
    
         
            -
                          - value = current_value(@sub, field)
         
     | 
| 
      
 60 
     | 
    
         
            +
                          - value = current_value(@sub, field) rescue ""
         
     | 
| 
       61 
61 
     | 
    
         
             
                          = render :partial=>"/form/field", :locals=>{:field=>field, :value=>value}
         
     | 
| 
       62 
62 
     | 
    
         | 
| 
       63 
63 
     | 
    
         
             
                  - if form.use_text_captcha?(request, current_user)
         
     | 
| 
         @@ -32,11 +32,11 @@ 
     | 
|
| 
       32 
32 
     | 
    
         
             
                          = t "forum.post_title"
         
     | 
| 
       33 
33 
     | 
    
         
             
                        = form.text_field :title
         
     | 
| 
       34 
34 
     | 
    
         
             
                    #body
         
     | 
| 
       35 
     | 
    
         
            -
                       
     | 
| 
       36 
     | 
    
         
            -
                         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
      
 35 
     | 
    
         
            +
                      .post_box
         
     | 
| 
      
 36 
     | 
    
         
            +
                        - if use_markdown_editor=='true'
         
     | 
| 
      
 37 
     | 
    
         
            +
                          = cm_editor("topic_post[body]", {:mode=>"markdown", :theme=>"neat", :dont_show_mode=>true, :dont_show_line_numbers=>true, :show_toolbar=>true, :height=>300, :width=>797})
         
     | 
| 
      
 38 
     | 
    
         
            +
                        - else
         
     | 
| 
      
 39 
     | 
    
         
            +
                          = form.text_area :body
         
     | 
| 
       40 
40 
     | 
    
         | 
| 
       41 
41 
     | 
    
         
             
                    - formatting = kit_snippet('Forum Post Formatting Help')
         
     | 
| 
       42 
42 
     | 
    
         
             
                    - if formatting.not_blank?
         
     | 
| 
         @@ -46,8 +46,7 @@ 
     | 
|
| 
       46 
46 
     | 
    
         
             
                    #submit
         
     | 
| 
       47 
47 
     | 
    
         
             
                      = link_to_function t("forum.submit_post"), "send_this_form();", :class=>"action"
         
     | 
| 
       48 
48 
     | 
    
         
             
                      .display_name
         
     | 
| 
       49 
     | 
    
         
            -
                         
     | 
| 
       50 
     | 
    
         
            -
                         
     | 
| 
       51 
     | 
    
         
            -
                        "
         
     | 
| 
      
 49 
     | 
    
         
            +
                        = t "forum.posting_as"
         
     | 
| 
      
 50 
     | 
    
         
            +
                        "#{current_user.display_name if current_user && current_user.display_name}"
         
     | 
| 
       52 
51 
     | 
    
         | 
| 
       53 
52 
     | 
    
         | 
| 
         @@ -33,8 +33,20 @@ function done_delete(id, visible) { 
     | 
|
| 
       33 
33 
     | 
    
         
             
              $('#mod_button_'+id).show();
         
     | 
| 
       34 
34 
     | 
    
         
             
            }
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
      
 36 
     | 
    
         
            +
            function mod_reply(post_id, thread_id) {
         
     | 
| 
      
 37 
     | 
    
         
            +
              var body = $('#body_'+post_id);
         
     | 
| 
      
 38 
     | 
    
         
            +
              body.append("<div id='popup_form'></div>");
         
     | 
| 
      
 39 
     | 
    
         
            +
              div = $('#popup_form');
         
     | 
| 
      
 40 
     | 
    
         
            +
              div.append('<textarea style="width: 400px;" rows="10" id="topic_post_reply"></textarea>');
         
     | 
| 
      
 41 
     | 
    
         
            +
              div.append('<br/><input type="button" onClick="save_reply(' + post_id + ',' + thread_id + ');" value="Save"/>');
         
     | 
| 
      
 42 
     | 
    
         
            +
              $('#topic_post_reply').focus();
         
     | 
| 
      
 43 
     | 
    
         
            +
              $('#reply_' + post_id).hide();
         
     | 
| 
      
 44 
     | 
    
         
            +
            }
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
       36 
46 
     | 
    
         
             
            var editing_id = null;
         
     | 
| 
       37 
47 
     | 
    
         | 
| 
      
 48 
     | 
    
         
            +
            var use_markdown_editor = <%= use_markdown_editor %>;
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
       38 
50 
     | 
    
         
             
            function edit_post(thread_id, post_id) {
         
     | 
| 
       39 
51 
     | 
    
         
             
              if (editing_id!=null) {
         
     | 
| 
       40 
52 
     | 
    
         
             
                $('#popup_form').remove();
         
     | 
| 
         @@ -43,19 +55,33 @@ function edit_post(thread_id, post_id) { 
     | 
|
| 
       43 
55 
     | 
    
         
             
              body.append('<div id="popup_form"></div>');
         
     | 
| 
       44 
56 
     | 
    
         
             
              div = $('#popup_form');
         
     | 
| 
       45 
57 
     | 
    
         | 
| 
       46 
     | 
    
         
            -
               
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
      
 58 
     | 
    
         
            +
              if (use_markdown_editor) {
         
     | 
| 
      
 59 
     | 
    
         
            +
                div.append('Post: <div style="width:800px;" id="topic_post_body_mod"></div>');
         
     | 
| 
      
 60 
     | 
    
         
            +
                $('#topic_post_body_mod').load("/forums/post/"+post_id+"?editor=1&mod=1");
         
     | 
| 
      
 61 
     | 
    
         
            +
              }  
         
     | 
| 
      
 62 
     | 
    
         
            +
              else {
         
     | 
| 
      
 63 
     | 
    
         
            +
                div.append('Post: <textarea style="width:800px;" rows="18" id="topic_post_body_mod"></textarea>');
         
     | 
| 
      
 64 
     | 
    
         
            +
                $('#topic_post_body_mod').load("/forums/post/"+post_id);
         
     | 
| 
      
 65 
     | 
    
         
            +
              }
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
              div.append('Comment: <textarea style="width:800px;" rows="6" id="comment"></textarea>');
         
     | 
| 
       49 
68 
     | 
    
         
             
              div.append('<br/><input type="button" onClick="save_edit();" value="Save"/>');
         
     | 
| 
       50 
     | 
    
         
            -
              $('#topic_post_body_mod').load("/forums/post/"+post_id);
         
     | 
| 
       51 
69 
     | 
    
         | 
| 
       52 
70 
     | 
    
         
             
              editing_id = post_id;
         
     | 
| 
       53 
71 
     | 
    
         
             
            }
         
     | 
| 
       54 
72 
     | 
    
         | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
73 
     | 
    
         
             
            function save_edit() {
         
     | 
| 
       57 
74 
     | 
    
         
             
              var id = editing_id;
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
              var body;
         
     | 
| 
      
 77 
     | 
    
         
            +
              if (use_markdown_editor) {
         
     | 
| 
      
 78 
     | 
    
         
            +
                body = get_editor_by_name('topic_post_body_mod').getValue();
         
     | 
| 
      
 79 
     | 
    
         
            +
                deregister_editor_by_name('topic_post_body_mod');
         
     | 
| 
      
 80 
     | 
    
         
            +
              } 
         
     | 
| 
      
 81 
     | 
    
         
            +
              else {
         
     | 
| 
      
 82 
     | 
    
         
            +
                body = $('#topic_post_body_mod').val();
         
     | 
| 
      
 83 
     | 
    
         
            +
              }
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
       59 
85 
     | 
    
         
             
              var comment = $('#comment').val();
         
     | 
| 
       60 
86 
     | 
    
         
             
              $('#mod_button_'+id).show();
         
     | 
| 
       61 
87 
     | 
    
         
             
              $('#mod_comment_'+id).hide();				
         
     | 
| 
         @@ -73,6 +99,18 @@ function save_edit() { 
     | 
|
| 
       73 
99 
     | 
    
         
             
              });
         
     | 
| 
       74 
100 
     | 
    
         
             
            }
         
     | 
| 
       75 
101 
     | 
    
         | 
| 
      
 102 
     | 
    
         
            +
            function save_reply(post_id, thread_id) {
         
     | 
| 
      
 103 
     | 
    
         
            +
              $.ajax({
         
     | 
| 
      
 104 
     | 
    
         
            +
                type: 'post',
         
     | 
| 
      
 105 
     | 
    
         
            +
                url: '/forums/mod/' + thread_id + '-mod',
         
     | 
| 
      
 106 
     | 
    
         
            +
              data: {"topic_post[body]": $('#topic_post_reply').val()},
         
     | 
| 
      
 107 
     | 
    
         
            +
              success: function(data) {
         
     | 
| 
      
 108 
     | 
    
         
            +
                $('#popup_form').remove();
         
     | 
| 
      
 109 
     | 
    
         
            +
                $('#body_' + post_id).append("<div style='color: red;'>Reply saved</div>");
         
     | 
| 
      
 110 
     | 
    
         
            +
              }
         
     | 
| 
      
 111 
     | 
    
         
            +
              });
         
     | 
| 
      
 112 
     | 
    
         
            +
            }
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
       76 
114 
     | 
    
         
             
            function show_mod_comments(post_id) {
         
     | 
| 
       77 
115 
     | 
    
         
             
              $('#mod_button_'+post_id).hide();
         
     | 
| 
       78 
116 
     | 
    
         
             
              $('#mod_comment_'+post_id).load("/forums/comments/" + post_id);
         
     | 
| 
         @@ -96,3 +134,5 @@ function spam(thread_id, mode) { 
     | 
|
| 
       96 
134 
     | 
    
         
             
            $(document).ready(function() {
         
     | 
| 
       97 
135 
     | 
    
         
             
              $('#mod_spam_popup').dialog({autoOpen: false, modal:true});
         
     | 
| 
       98 
136 
     | 
    
         
             
            });
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
             
     |