controlshift/prague-server

View on GitHub
app/views/organizations/show.html.haml

Summary

Maintainability
Test Coverage
- if params[:organization_created] == 'true'
  :javascript
    analytics.track('Signed Up');

.row
  .col-lg-12
    / = title "#{h(@organization.name)} Dashboard"
    %p
      The slug you will use for your organization is <b>#{@organization.slug}</b>.

.row.stripe-connect-status
  - if @organization.access_token.blank?
    .col-lg-12
      = render partial: 'connect_with_stripe'

  - else
    .col-lg-6
      - if @account.nil?
        No Stripe connection.
      - else
        = @account.display_name
        on Stripe is connected to TakeCharge.
    .col-lg-6
      = button_to 'Deauthorize', deauthorize_organization_path(@organization), method: 'put', class: 'btn btn-warning'

- if @organization.access_token.present?
  .row
    .col-lg-12

      %p To include the form on your site, please paste the following somewhere below the &lt;body&gt; tag:
      #code-snippet.highlight
        %pre= escape_once(@organization.code_snippet.to_html)
      %p And place this wherever you'd like the form to appear:
      .highlight
        %pre= "<div class=\"donations-form-anchor\"></div>"
      %p
        More instructions and customizations can be found on the documentation
        %a{:href => "https://github.com/controlshift/prague-client"} here.