Sha256: 64483ac7d067362e348355c5ae9c0e59ca9b9455bfeaf37383d2e8d9e9cd4802

Contents?: true

Size: 1.96 KB

Versions: 3

Compression:

Stored size: 1.96 KB

Contents

-# PluginFactoryScaffolding : FILE
-#######################################################################################################################
!!! 5
%html.visitor-layout
  %head
    %title Fanforce
    %meta{'http-equiv'=>'Content-Type', content:'text/html; charset=iso-8859-1'}/
    %meta{'http-equiv'=>'Content-Language', content: 'en-us'}/
    = stylesheet '/visitor.css'
    %script(src='//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.js')
  %body
    .lyt-root
      .lyt-header
        #hello
        #logo
      = yield
      .lyt-root-footer
    .lyt-footer
      %span#distributed-by
      %a{href: "http://#{Fanforce.base_domain}"} Powered by Fanforce.

  = javascript "//#{Fanforce.eye_domain}/#{params[:organization_slug]}-fanforce.js#{'?DEBUG=true&DYNAMIC=true' if ENV['RACK_ENV']=='development'}" do
    FF.option('track_browse_webpage', false)
    FF.option('dynamic_url', FF.browser.uri.scheme + '://' + '#{FanforcePlugin._id}.${SHORT_DOMAIN}/${INITIATIVE_SLUG_ID}')

  = yield_content :after_fanforce_js
  :coffeescript
    FF.css_framework = 'bootstrap3'
    FF.on('visitor.logout', ->
      $('#hello').html('')
    )
    FF.organization (organization)->
      if organization.website_url
        $('#distributed-by').html('Distributed by <a href="' + organization.website_url + '">' + organization.name + '</a>.&nbsp;')
        $('#logo').html('<div class="logo"><a href="' + organization.website_url + '"><img src="' + organization.logo_url + '"></a></div>') if organization.logo_url
      else
        $('#distributed-by').html('Distributed by ' + organization.name + '.&nbsp;')
        $('#logo').html('<div class="logo"><img src="' + organization.logo_url + '"></div>') if organization.logo_url
    FF.visitor (visitor)->
      return if !visitor.access_level
      $('#hello').html('<div class="hello"><div class="hello-wrapper"><span class="greeting">Hello, ' + visitor.first_name + '!</span><a href="javascript: FF.visitor.logout(); void(0)">Logout</a></div></div>')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fanforce-plugin-factory-1.6.0.rc3 lib/fanforce/plugin_factory/scaffolding/layouts/visitor.haml
fanforce-plugin-factory-1.6.0.rc2 lib/fanforce/plugin_factory/scaffolding/layouts/visitor.haml
fanforce-plugin-factory-1.6.0.rc1 lib/fanforce/plugin_factory/scaffolding/layouts/visitor.haml