- provide :title, "Listing Tasks"

%table
  %tr
    %th User
    %th Client
    %th Name
    %th Description
    %th Notes
    %th Priority
    %th Due date
    %th Rate
    %th{colspan: 3} Actions

  - @tasks.each do |task|
    - @current_class = task
    %tr
      %td= task.user
      %td= task.client
      %td= task.name
      %td= task.description
      %td= task.notes
      %td= task.priority
      %td= task.due_date
      %td= task.rate
      = render 'common/index_links'

%br

= link_to 'New Task', new_task_path

Add Complexity Field to Task Index

- provide :title, "Listing Tasks"

%table
  %tr
    %th User
    %th Client
    %th Name
    %th Description
    %th Notes
    %th Complexity
    %th Priority
    %th Due date
    %th Rate
    %th{colspan: 3} Actions

  - @tasks.each do |task|
    - @current_class = task
    %tr
      %td= task.user
      %td= task.client
      %td= task.name
      %td= task.description
      %td= task.notes
      %td= human_complexity task
      %td= task.priority
      %td= task.due_date
      %td= task.rate
      = render 'common/index_links'

%br

= link_to 'New Task', new_task_path


= simple_form_for @user do |f|
  .row-fluid
    .span6= f.input :login if @user.respond_to? :login
    .span6= f.input :email
  .row-fluid
    .span6= f.input :password, :hint => !f.object.new_record?, :input_html => {:autocomplete => "off"}
    .span6= f.input :password_confirmation
  - unless can?(:manage, User)
    .row-fluid
      .span6= f.input :current_password, :required => true
  .row-fluid
    .span6= f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple', :class => 'span select2'}, :required => true if can?(:manage, Role)

  - f.object.build_person unless f.object.person
  %h3= t('form.person.address')
  = f.fields_for :person do |p|
    = render 'vcards/form', :f => p, :full_vcard => true

  .form-actions
    = f.button :submit

Mark some user form fields as required.

= simple_form_for @user do |f|
  .row-fluid
    .span6= f.input :login if @user.respond_to? :login
    .span6= f.input :email, :required => true
  .row-fluid
    .span6= f.input :password, :hint => !f.object.new_record?, :required => f.object.new_record?, :input_html => {:autocomplete => "off"}
    .span6= f.input :password_confirmation, :required => f.object.new_record?
  - unless can?(:manage, User)
    .row-fluid
      .span6= f.input :current_password, :required => true
  .row-fluid
    .span6= f.input :role_texts, :as => :select, :collection => Ability.roles_for_collection, :include_blank => false, :input_html => {:multiple => 'multiple', :class => 'span select2'}, :required => true if can?(:manage, Role)

  - f.object.build_person unless f.object.person
  %h3= t('form.person.address')
  = f.fields_for :person do |p|
    = render 'vcards/form', :f => p, :full_vcard => true

  .form-actions
    = f.button :submit


- if current_page.url =~ /contribute/
  %img{src: image("contribute.png"), class: "title-image"}

Add alt tag for contribute image

- if current_page.url =~ /contribute/
  %img{src: image("contribute.png"), class: "title-image", alt: "Exploded biobox"}


.entry-sharing
  = flattr_button_for_post(post)

  - layout = (Settings.blog.plusone.layout rescue :medium)
  = plusone_button_for_post(post, "data-size" => layout)

  - layout = (Settings.blog.addthis.layout rescue :pills)
  = addthis_buttons_for_post(post, :layout => layout)

Add wrappers around share buttons because they don't behave very nicely sometimes.

.entry-sharing
  .flattr-wrapper
    = flattr_button_for_post(post)

  .plusone-wrapper
    - layout = (Settings.blog.plusone.layout rescue :medium)
    = plusone_button_for_post(post, "data-size" => layout)

  .addthis-wrapper
    - layout = (Settings.blog.addthis.layout rescue :pills)
    = addthis_buttons_for_post(post, :layout => layout)


- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to booking_template.title, item_action.call(booking_template)
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= currency_fmt(booking_template.amount)
  %td.action-links
    = icon_edit_link_to edit_booking_template_path(booking_template)
    = icon_delete_link_to booking_template, booking_template_path(booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true

Include booking template code in list.

- item_action ||= lambda{|object| url_for(object)}

%tr[booking_template]
  %td
    = link_to "%s (%s)" % [booking_template.title, booking_template.code], item_action.call(booking_template)
    - if booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= booking_template.comments
  %td= link_to booking_template.credit_account.code, account_path(booking_template.credit_account), :title => booking_template.credit_account.title unless booking_template.credit_account.nil?
  %td= link_to booking_template.debit_account.code, account_path(booking_template.debit_account), :title => booking_template.debit_account.title unless booking_template.debit_account.nil?
  %td.currency= currency_fmt(booking_template.amount)
  %td.action-links
    = icon_edit_link_to edit_booking_template_path(booking_template)
    = icon_delete_link_to booking_template, booking_template_path(booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true


%h1
  Administration dashboard
%p
  You currently have
  = link_to count_objects(Locomotive::Client), resource(:clients)
  ,
  = link_to count_objects(Locomotive::Service), resource(:services)
  and
  = link_to count_objects(Locomotive::System), resource(:systems)
  set-up.
  If you want to know more about these, click on any of the tabs above. You can also jump right into adding more by hitting the buttons in the side bar to the right.

- throw_content(:sidebar) do
  %h2
    Actions
  %ul
    %li
      = link_to "add a client", resource(:clients, :new)
    %li
      = link_to "add a service", resource(:services, :new)
    %li
      = link_to "add a system", resource(:systems, :new)

Fix Haml whitespace issues on dashboard: use interpolation

%h1
  Administration dashboard
%p
  You currently have
  == #{link_to count_objects(Locomotive::Client), resource(:clients)},
  == #{link_to count_objects(Locomotive::Service), resource(:services)}
  == and #{link_to count_objects(Locomotive::System), resource(:systems)} set-up.

  If you want to know more about these, click on any of the tabs above. You can also jump right into adding more by hitting the buttons in the side bar to the right.

- throw_content(:sidebar) do
  %h2
    Actions
  %ul
    %li
      = link_to "add a client", resource(:clients, :new)
    %li
      = link_to "add a service", resource(:services, :new)
    %li
      = link_to "add a system", resource(:systems, :new)


.row
  .col-md-10
    %h2 #{@organisation.login}
    = link_to "#{@organisation.login} on GitHub", "https://github.com/#{@organisation.login}", class: 'btn btn-default'

  .col-md-2
    .avatar= image_tag(@organisation.avatar_url(160), :width => 80, :height => 80, :alt => @organisation.login)

#users.row.clearfix
  .col-md-12

    %h3=t("organisations.members", count: @organisation.users.count)

    .users
      %ul.avatar-list.clearfix
        = render @organisation.users

#pull_requests
  %h3= t("organisations.pull_requests", count: @organisation.pull_request_count)
  = render @organisation.pull_requests

Order org members by their pull request count

.row
  .col-md-10
    %h2 #{@organisation.login}
    = link_to "#{@organisation.login} on GitHub", "https://github.com/#{@organisation.login}", class: 'btn btn-default'

  .col-md-2
    .avatar= image_tag(@organisation.avatar_url(160), :width => 80, :height => 80, :alt => @organisation.login)

#users.row.clearfix
  .col-md-12

    %h3=t("organisations.members", count: @organisation.users.count)

    .users
      %ul.avatar-list.clearfix
        = render @organisation.users.order('pull_requests_count desc')

#pull_requests
  %h3= t("organisations.pull_requests", count: @organisation.pull_request_count)
  = render @organisation.pull_requests


#changelog
  %h1 What's New

  %article
    %h2 24/12/2012
    %ul
      %li Added what's new page.
      %li Added following indicator to main thread lists.
      %li Increased message box size.
      %li Disable voting and message box if you cannot use them.
      %li Fixed bug with invalid tags being entered.

Update changelog + fix silly date typo.

#changelog
  %h1 What's New

  %article
    %h2 04/03/2012
    %ul
      %li Issues list in group context only shows issues in that group's area.
      %li Logging in returns the user to the last group they were in.
      %li New thread notifications can be replied to.

  %article
    %h2 24/02/2012
    %ul
      %li Added what's new page.
      %li Added following indicator to main thread lists.
      %li Increased message box size.
      %li Disable voting and message box if you cannot use them.
      %li Fixed bug with invalid tags being entered.


- if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
  = form_tag(new_user_session_path, class: 'form-horizontal') do
    %legend
      %span
        Sign In
    .form-group
      %label{for: "user[login]", class: 'col-sm-2 control-label'}
        Username
      .col-sm-10
        = text_field_tag 'user[login]', nil, placeholder: 'Username', class: 'form-control', required: 'required'
    .form-group
      %label{for: "user[password]", class: 'col-sm-2 control-label'}
        Password
      .col-sm-10
        = password_field_tag 'user[password]', nil, placeholder: 'Password', class: 'form-control', required: 'required'
    .form-group
      .col-sm-12
        %button.btn.btn-success.pull-right
          Sign in
    = render partial: 'devise/shared/openid'
    %p.text-right
      %a.small.btn.btn-default{"data-toggle" => "collapse", "data-target" =>  "#devise-help-sign-in"}
        Need Help?
      #devise-help-sign-in.collapse
        = render partial: 'devise/shared/links'

Fix ichain sign in form

- if ENV['OSEM_ICHAIN_ENABLED'] != 'true'
  = form_tag(new_user_session_path, class: 'form-horizontal') do
    %legend
      %span
        Sign In
    .form-group
      %label{for: "user[login]", class: 'col-sm-2 control-label'}
        Username
      .col-sm-10
        = text_field_tag 'user[login]', nil, placeholder: 'Username', class: 'form-control', required: 'required'
    .form-group
      %label{for: "user[password]", class: 'col-sm-2 control-label'}
        Password
      .col-sm-10
        = password_field_tag 'user[password]', nil, placeholder: 'Password', class: 'form-control', required: 'required'
    .form-group
      .col-sm-12
        %button.btn.btn-success.pull-right
          Sign in
    = render partial: 'devise/shared/openid'
    %p.text-right
      %a.small.btn.btn-default{"data-toggle" => "collapse", "data-target" =>  "#devise-help-sign-in"}
        Need Help?
      #devise-help-sign-in.collapse
        = render partial: 'devise/shared/links'


- project = @target_project || @project
- extra_class = extra_class || ''
- show_menu_above = show_menu_above || false
- selected_text = selected.try(:title)
- dropdown_title = dropdown_title || "Filter by milestone"
- if selected.present?
  = hidden_field_tag(name, name == :milestone_title ? selected.title : selected.id)
= dropdown_tag(milestone_dropdown_label(selected_text), options: { title: dropdown_title, toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone",
  placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: show_menu_above, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do
  - if project
    %ul.dropdown-footer-list
      - if can? current_user, :admin_milestone, project
        %li
          = link_to new_namespace_project_milestone_path(project.namespace, project), title: "New Milestone" do
            Create new
      %li
        = link_to namespace_project_milestones_path(project.namespace, project) do
          - if can? current_user, :admin_milestone, project
            Manage milestones
          - else
            View milestones

Use local assigns to get the dropdown title

- project = @target_project || @project
- extra_class = extra_class || ''
- show_menu_above = show_menu_above || false
- selected_text = selected.try(:title)
- dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by milestone")
- if selected.present?
  = hidden_field_tag(name, name == :milestone_title ? selected.title : selected.id)
= dropdown_tag(milestone_dropdown_label(selected_text), options: { title: dropdown_title, toggle_class: "js-milestone-select js-filter-submit #{extra_class}", filter: true, dropdown_class: "dropdown-menu-selectable dropdown-menu-milestone",
  placeholder: "Search milestones", footer_content: project.present?, data: { show_no: true, show_menu_above: show_menu_above, show_any: show_any, show_upcoming: show_upcoming, field_name: name, selected: selected.try(:title), project_id: project.try(:id), milestones: milestones_filter_dropdown_path, default_label: "Milestone" } }) do
  - if project
    %ul.dropdown-footer-list
      - if can? current_user, :admin_milestone, project
        %li
          = link_to new_namespace_project_milestone_path(project.namespace, project), title: "New Milestone" do
            Create new
      %li
        = link_to namespace_project_milestones_path(project.namespace, project) do
          - if can? current_user, :admin_milestone, project
            Manage milestones
          - else
            View milestones


- if @user == current_user
  %h1 Scrapers watched by you
- else
  %h1 Scrapers watched by #{@user.nickname}

%p
  For scrapers in this list that are set to run automatically, if any error then
  - if @user == current_user
    you
  - else
    = @user.nickname
  will receive an email alert at most once per day.
  This makes it very easy to fix any problems quickly.

%h2 Individual scrapers
.list-group= render @user.scrapers_watched

- @user.users_watched.each do |user|
  %h2= link_to user.nickname, user
  .list-group= render user.scrapers

- @user.organizations_watched.each do |organization|
  %h2= link_to organization.nickname, organization
  .list-group= render organization.scrapers

Add unwatch buttons to watching

- if @user == current_user
  %h1 Scrapers watched by you
- else
  %h1 Scrapers watched by #{@user.nickname}

%p
  For scrapers in this list that are set to run automatically, if any error then
  - if @user == current_user
    you
  - else
    = @user.nickname
  will receive an email alert at most once per day.
  This makes it very easy to fix any problems quickly.

%h2 Individual scrapers
.list-group
  - @user.scrapers_watched.each do |scraper|
    .row
      .col-md-11= render scraper
      .col-md-1
        - if @user == current_user
          = render partial: "scrapers/watch_button", locals: {scraper: scraper}

- @user.users_watched.each do |user|
  .row
    .col-md-11
      %h2= link_to user.nickname, user
    .col-md-1
      - if @user == current_user
        = render partial: "owners/watch_button", locals: {owner: user}
  .row
    .col-md-11
      .list-group= render user.scrapers

- @user.organizations_watched.each do |organization|
  .row
    .col-md-11
      %h2= link_to organization.nickname, organization
    .col-md-1
      - if @user == current_user
        = render partial: "owners/watch_button", locals: {owner: organization}
  .row
    .col-md-11
      .list-group= render organization.scrapers


.inquiries-container{data: {update_path: plugin('inquiry').inquiries_path(params.merge(partial:true)), update_interval: 600}}
  %table.table
    %thead
      %tr
        %th Request for
        %th Description
        %th Requester
        %th Updated
        %th Status
        %th.snug
    %tbody
      - if @inquiries.length==0
        %tr
          %td{colspa: 6} No requests available
      - else
        - @inquiries.each do | inquiry |
          = render partial: 'item', locals: {inquiry: inquiry, remote_links: remote_links}

  .pagination
    = paginate @inquiries, :window => 1, :outer_window => 1, remote: remote_links, :theme => 'twitter-bootstrap-3'

Fix params merge error for Inquiries

.inquiries-container{data: {update_path: plugin('inquiry').inquiries_path(params.to_unsafe_hash.merge(partial:true)), update_interval: 600}}
  %table.table
    %thead
      %tr
        %th Request for
        %th Description
        %th Requester
        %th Updated
        %th Status
        %th.snug
    %tbody
      - if @inquiries.length==0
        %tr
          %td{colspa: 6} No requests available
      - else
        - @inquiries.each do | inquiry |
          = render partial: 'item', locals: {inquiry: inquiry, remote_links: remote_links}

  .pagination
    = paginate @inquiries, :window => 1, :outer_window => 1, remote: remote_links, :theme => 'twitter-bootstrap-3'


- if claims.none?
  %p No claims found
- else
  %table
    %thead
      %th
        CMS Number
      %th
        Advocate
      %th
        Submission date
      %th
        Paid date
      %th
        Balance
      %th
    %tbody
    - claims.each do |claim|
      %tr{id: dom_id(claim)}
        %td

        %td
          = claim.advocate.name
        %td
          = claim.submitted_at.strftime('%d/%m/%Y') unless claim.submitted_at.nil?
        %td

        %td
          = link_to 'Edit', edit_advocates_claim_path(claim)

Hide advocate name for non-admin advocate users

- if claims.none?
  %p No claims found
- else
  %table
    %thead
      - if current_user.persona.admin?
        %th
          Advocate name
      %th
        CMS Number
      %th
        Submission date
      %th
        Paid date
      %th
        Total
      %th
    %tbody
    - claims.each do |claim|
      %tr{id: dom_id(claim)}
        - if current_user.persona.admin?
          %td
            = claim.advocate.name
        %td

        %td
          = claim.submitted_at.strftime('%d/%m/%Y') unless claim.submitted_at.nil?
        %td

        %td
          = link_to 'Edit', edit_advocates_claim_path(claim)


%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}

= csrf_meta_tags

%title
  - if content_for? :html_title
    = yield :html_title
  - else
    = t(controller.controller_name, :default => controller.controller_name.titleize)
  = " - OFN #{t(:administration)}"

%link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese", :rel => "stylesheet", :type => "text/css"}

= stylesheet_link_tag 'admin/all'
= javascript_include_tag 'admin/all'

= render "spree/admin/shared/translations"
= render "spree/admin/shared/routes"

%script
  = raw "var AUTH_TOKEN = \"#{form_authenticity_token}\";"

= render "layouts/bugherd_script"
%link{'data-require' => "font-awesome@*", 'data-semver'=>"4.2.0", 'rel' => "stylesheet", 'href' => "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css"}

= render "layouts/auth_token_script"

= yield :head

Add bugsnag js script to admin layout above all.js

%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}

= csrf_meta_tags

%title
  - if content_for? :html_title
    = yield :html_title
  - else
    = t(controller.controller_name, :default => controller.controller_name.titleize)
  = " - OFN #{t(:administration)}"

%link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese", :rel => "stylesheet", :type => "text/css"}

= stylesheet_link_tag 'admin/all'
= render "layouts/bugsnag" if ENV["BUGSNAG_JS_KEY"].present?
= javascript_include_tag 'admin/all'

= render "spree/admin/shared/translations"
= render "spree/admin/shared/routes"

%script
  = raw "var AUTH_TOKEN = \"#{form_authenticity_token}\";"

= render "layouts/bugherd_script"
%link{'data-require' => "font-awesome@*", 'data-semver'=>"4.2.0", 'rel' => "stylesheet", 'href' => "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css"}

= render "layouts/auth_token_script"

= yield :head


Adjusting the anticipated total cost will allow you to better understand the impact of this capital project in a particular fiscal year.
%br
%br
Together with the available federal, state and local funds, an accurate funding summary and cost projection can be reached.
%br
%br
[ Use information from IT3 docs ]

Use paragraph notation for text

%p
  Adjusting the anticipated total cost will allow you to better understand the impact of this capital project in a particular fiscal year.
%br
%p
  Together with the available federal, state and local funds, an accurate funding summary and cost projection can be reached.
%br
%p
  [ Use information from IT3 docs ]


%h2= t("captions.backend/users.#{action_name}")

= simple_form_for [:backend, current_object] do |f|
  = f.input :name, required: true
  = f.input :login_name, required: true
  = f.input :email, required: true
  = f.input :join_date,  as: :string, required: true, wrapper_html: { class: 'date-input' },
    input_html: { data: { input: 'datepicker', format: 'Y/m/d' } }
  = f.input :leave_date, as: :string, wrapper_html: { class: 'date-input' },
    input_html: { data: { input: 'datepicker', format: 'Y/m/d' } }

  = f.input :role, collection: User.enum_attributes_for_select(:roles), include_blank: false
  = f.button :submit

Add missing leave time creation options when create user

%h2= t("captions.backend/users.#{action_name}")

= simple_form_for [:backend, current_object] do |f|
  = f.input :name, required: true
  = f.input :login_name, required: true
  = f.input :email, required: true
  = f.input :join_date,  as: :string, required: true, wrapper_html: { class: 'date-input' },
    input_html: { data: { input: 'datepicker', format: 'Y/m/d' } }
  = f.input :leave_date, as: :string, wrapper_html: { class: 'date-input' },
    input_html: { data: { input: 'datepicker', format: 'Y/m/d' } }
  - if %w[new create].include? action_name
    = f.input :assign_leave_time, as: :boolean
    = f.input :assign_date, wrapper_html: { class: 'date-input' },
      input_html: { data: { input: 'datepicker', format: 'Y/m/d' } }

  = f.input :role, collection: User.enum_attributes_for_select(:roles), include_blank: false
  = f.button :submit


.page-header
  %h2= title t('notifications.title')

- if @notifications.any?
  .page-subheader
    = link_to mark_as_read_notifications_path, method: :post, class: 'btn btn-info' do
      %span.glyphicon.glyphicon-ok
      = t 'notifications.actions.mark_all_as_read'

    = link_to purge_notifications_path, method: :delete, class: 'btn btn-danger' do
      %span.glyphicon.glyphicon-trash
      = t 'notifications.actions.purge'

  %ul.list-group.list-group-notifications{:data => {:provide => 'notifications'}}= render @notifications

  = paginate @notifications

- else
  .alert.alert-info= t 'notifications.empty'

Add confirmation when purging read notifications

.page-header
  %h2= title t('notifications.title')

- if @notifications.any?
  .page-subheader
    = link_to mark_as_read_notifications_path, method: :post, class: 'btn btn-info' do
      %span.glyphicon.glyphicon-ok
      = t 'notifications.actions.mark_all_as_read'

    = link_to purge_notifications_path, method: :delete, confirm: 'Are you sure?', class: 'btn btn-danger' do
      %span.glyphicon.glyphicon-trash
      = t 'notifications.actions.purge'

  %ul.list-group.list-group-notifications{:data => {:provide => 'notifications'}}= render @notifications

  = paginate @notifications

- else
  .alert.alert-info= t 'notifications.empty'


%hr

%p= t('custom_curves.imported_electricity_price.description_html', docs_path: '#')

#import-price-curve-upload.curve-upload( |
  data-curve-name="imported_electricity_price" |
  data-curve-disable-input="costs_imported_electricity" |
)

Set documentation path for electricity imports

%hr

%p= t('custom_curves.imported_electricity_price.description_html', docs_path: 'https://github.com/quintel/documentation/blob/master/general/costs_imported_electricity.md#uploaded-price-curves')

#import-price-curve-upload.curve-upload( |
  data-curve-name="imported_electricity_price" |
  data-curve-disable-input="costs_imported_electricity" |
)


- if run.queued?
  .alert.alert-info
    The scraper is queued to run.
    It was queued
    - if run.auto?
      automatically
    - else
      manually
    #{timeago_tag(run.queued_at, force: true)}.
    %span.muted
      (Refresh page for the latest)
- elsif run.running?
  .alert.alert-info
    The scraper is running.
    It was queued
    - if run.auto?
      automatically
    - else
      manually
    #{timeago_tag(run.queued_at, force: true)}.
    %span.muted
      (Refresh page for the latest)
- elsif run.finished_successfully?
  .alert.alert-success
    Last run completed successfully
    #{timeago_tag(run.finished_at, force: true)}.
- elsif run.finished_with_errors?
  .alert.alert-danger
    Last run failed
    = timeago_tag(run.finished_at, force: true)
    with status code #{run.status_code}.

Remove message about refreshing the page since it autoupdates now

- if run.queued?
  .alert.alert-info
    The scraper is queued to run.
    It was queued
    - if run.auto?
      automatically
    - else
      manually
    #{timeago_tag(run.queued_at, force: true)}.
- elsif run.running?
  .alert.alert-info
    The scraper is running.
    It was queued
    - if run.auto?
      automatically
    - else
      manually
    #{timeago_tag(run.queued_at, force: true)}.
- elsif run.finished_successfully?
  .alert.alert-success
    Last run completed successfully
    #{timeago_tag(run.finished_at, force: true)}.
- elsif run.finished_with_errors?
  .alert.alert-danger
    Last run failed
    = timeago_tag(run.finished_at, force: true)
    with status code #{run.status_code}.


.page-header
  %h2 Reputation

#reputation
  %p
    %i.fa.fa-spinner.fa-spin.fa-lg
    Looking up whether this server is blacklisted anywhere...

Use consistent formatting for page header

.page-header
  %h1 Reputation

#reputation
  %p
    %i.fa.fa-spinner.fa-spin.fa-lg
    Looking up whether this server is blacklisted anywhere...


#queue
  = render partial: 'list', locals: { jobs: @jobs }

.col-md-8.job-status
  #job
    .lead= @dirmon_entry.job_class_name + "#{'#' + @dirmon_entry.perform_method.to_s unless @dirmon_entry.perform_method == :perform }"

    .job-state.inline-block
      .left status
      .right{ class: @dirmon_entry.state }
        = @dirmon_entry.state

    .btn-toolbar.job-actions.pull-right
      .btn-group{ style: 'margin-right: 1em;' }
        = link_to "Destroy", dirmon_entry_path(@dirmon_entry), method: :delete, class: 'btn btn-default', :data => { :confirm => 'Are you sure?' }
        - if @dirmon_entry.disabled? || @dirmon_entry.pending?
          = link_to "Enable", enable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default"
        - if @dirmon_entry.enabled?
          = link_to "Disable", disable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default", :data => { :confirm => 'Are you sure?' }
      .btn-group
        = link_to "Edit", edit_dirmon_entry_path(@dirmon_entry), method: :get, class: "btn btn-default"

    .clearfix

    = render partial: 'status', locals: { dirmon_entry: @job }

Remove method from edit link on Dirmons.

#queue
  = render partial: 'list', locals: { jobs: @jobs }

.col-md-8.job-status
  #job
    .lead= @dirmon_entry.job_class_name + "#{'#' + @dirmon_entry.perform_method.to_s unless @dirmon_entry.perform_method == :perform }"

    .job-state.inline-block
      .left status
      .right{ class: @dirmon_entry.state }
        = @dirmon_entry.state

    .btn-toolbar.job-actions.pull-right
      .btn-group{ style: 'margin-right: 1em;' }
        = link_to "Destroy", dirmon_entry_path(@dirmon_entry), method: :delete, class: 'btn btn-default', :data => { :confirm => 'Are you sure?' }
        - if @dirmon_entry.disabled? || @dirmon_entry.pending?
          = link_to "Enable", enable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default"
        - if @dirmon_entry.enabled?
          = link_to "Disable", disable_dirmon_entry_path(@dirmon_entry.id), method: :put, class: "btn btn-default", :data => { :confirm => 'Are you sure?' }
      .btn-group
        = link_to "Edit", edit_dirmon_entry_path(@dirmon_entry), class: "btn btn-default"

    .clearfix

    = render partial: 'status', locals: { dirmon_entry: @job }


.login-box
  %h3.page-title Sign in
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?

  - if gitlab_config.signup_enabled
    %hr
    %div
      Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)

Add resend-confirmation-link to sign-in page

.login-box
  %h3.page-title Sign in
  - if ldap_enabled?
    %ul.nav.nav-tabs
      %li.active
        = link_to 'LDAP', '#tab-ldap', 'data-toggle' => 'tab'
      %li
        = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
    .tab-content
      %div#tab-ldap.tab-pane.active
        = render partial: 'devise/sessions/new_ldap'
      %div#tab-signin.tab-pane
        = render partial: 'devise/sessions/new_base'

  - else
    = render partial: 'devise/sessions/new_base'

  = render 'devise/sessions/oauth_providers' if devise_mapping.omniauthable?
  %hr

  - if gitlab_config.signup_enabled
    %p
      %span.light
        Don't have an account?
      %strong
        = link_to "Sign up", new_registration_path(resource_name)

  %p
    %span.light Did not receive confirmation email?
    = link_to "Send again", new_confirmation_path(resource_name)

  - if extra_config.has_key?('sign_in_text')
    %hr
    = markdown(extra_config.sign_in_text)


!!!
%html
  %head
    - subtitle = content_for(:title) || "free TF2 server reservations"
    %title #{SITE_HOST} - #{subtitle}
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "themes/black", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v3/"
    = content_for(:stripe)
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'shared/google_analytics'
    %meta{:name => "viewport",    :content => "width=device-width, initial-scale=1.0, shrink-to-fit=no"}
    %meta{:name => "description", :content => "Free TF2 servers, ready for action in 60 seconds!"}
    = content_for(:head)
  %body

    = render 'shared/navigation'

    = content_for(:jumbotron)

    .container

      - if !donator?
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          .row
            .col-md-12
              = render 'shared/adsense_responsive'

          .row
            .col-md-11
              = yield
            .col-md-1
              = render 'shared/adsense_sidebar'
      - else
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          = yield

      = render 'shared/timezone'

Make ads-view more less sucky

!!!
%html
  %head
    - subtitle = content_for(:title) || "free TF2 server reservations"
    %title #{SITE_HOST} - #{subtitle}
    = stylesheet_link_tag    "application", :media => "all"
    = stylesheet_link_tag    "themes/black", :media => "all"
    = javascript_include_tag "https://js.stripe.com/v3/"
    = content_for(:stripe)
    = javascript_include_tag "application"
    = csrf_meta_tags
    = render 'shared/google_analytics'
    %meta{:name => "viewport",    :content => "width=device-width, initial-scale=1.0, shrink-to-fit=no"}
    %meta{:name => "description", :content => "Free TF2 servers, ready for action in 60 seconds!"}
    = content_for(:head)
  %body

    = render 'shared/navigation'

    = content_for(:jumbotron)

    .container

      - if !donator?
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-11
                = render 'shared/flash'

          .row
            .col-md-11
              = render 'shared/adsense_responsive'

          .row
            .col-md-11
              = yield
            .col-md-1
              = render 'shared/adsense_sidebar'
      - else
        %main{role: "main"}
          - if notice || alert
            .row
              .col-md-12
                = render 'shared/flash'

          = yield

      = render 'shared/timezone'


-# = render "plantings/progress_bar", status: planting_status(planting), progress: planting.percentage_grown
.progress
  - if planting.percentage_grown.present?
    .progress-bar.progress-bar-success{"aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => planting.percentage_grown, :role => "progressbar", :style => "width: #{planting.percentage_grown}%"}
      %span #{sprintf '%.0f', planting.percentage_grown}%

Put back our own progress bar

.progress
  - if planting.percentage_grown.present?
    = render "plantings/progress_bar", status: planting_status(planting), progress: planting.percentage_grown


.modal-dialog.modal-lg
  .modal-content
    .modal-header
      %button.close{:data => {:dismiss => "modal"}}
        x
      %h3.modal-title
        = @image.new_record? ? 'Add Photo' : 'Update Photo'
    .modal-body
      = render 'form'
    .modal-footer
      .row
        %button.btn.btn-default{:data => {:dismiss => "modal"}} Cancel

Move cancel button from modal form to photo form.


%tr.salary_item.nested-form-item
  %td= salary_item.text_field :position, :required => true, :style => 'width: 3em', :autocomplete => "off"
  %td= salary_item.select :salary_booking_template_id, SalaryBookingTemplate.all.map{|template| [template.title, template.id]}, :required => true, :style => 'width: 30em'
  %td= salary_item.text_field :times, :required => true, :style => 'width: 3em', :autocomplete => "off"
  %td= salary_item.text_field :price, :required => true, :style => 'width: 5em', :autocomplete => "off"
  %td.action_links
    = salary_item.hidden_field :_destroy
    = link_to t_action(:delete), '#', :class => 'icon-delete-text delete-nested-form-item'

Include blank in salary_booking_template select in salary_item form.

%tr.salary_item.nested-form-item
  %td= salary_item.text_field :position, :required => true, :style => 'width: 3em', :autocomplete => "off"
  %td= salary_item.select :salary_booking_template_id, SalaryBookingTemplate.all.map{|template| [template.title, template.id]}, :include_blank => true, :required => true, :style => 'width: 30em'
  %td= salary_item.text_field :times, :required => true, :style => 'width: 3em', :autocomplete => "off"
  %td= salary_item.text_field :price, :required => true, :style => 'width: 5em', :autocomplete => "off"
  %td.action_links
    = salary_item.hidden_field :_destroy
    = link_to t_action(:delete), '#', :class => 'icon-delete-text delete-nested-form-item'


- content_for(:title, 'Expiration du délai de conservation des dossiers')

- if @expired_dossiers.present?
  %h1= t('mail.administration.dossier_expiration_summary.expired_dossiers', count: @expired_dossiers.count)
  - @expired_dossiers.group_by(&:procedure).each do |procedure, dossiers|
    %dl
      %dt
        #{procedure.libelle} (#{link_to(procedure.id, manager_procedure_url(procedure))}) :
      %dd
        = dossiers.map { |d| link_to(d.id, manager_dossier_url(d)) }.join(', ').html_safe

- if @expiring_dossiers.present?
  %h1= t('mail.administration.dossier_expiration_summary.expiring_dossiers', count: @expiring_dossiers.count)
  - @expiring_dossiers.group_by(&:procedure).each do |procedure, dossiers|
    %dl
      %dt
        #{procedure.libelle} (#{link_to(procedure.id, manager_procedure_url(procedure))}) :
      %dd
        = dossiers.map { |d| link_to(d.id, manager_dossier_url(d)) }.join(', ').html_safe

- if @expired_dossiers.empty? && @expiring_dossiers.empty?
  Il n’y a pas de dossier expiré ou sur le point d’expirer.

Improve the style of the dossier expiration summary email

- content_for(:title, 'Expiration du délai de conservation des dossiers')

- if @expired_dossiers.present?
  %h2= t('mail.administration.dossier_expiration_summary.expired_dossiers', count: @expired_dossiers.count)
  - @expired_dossiers.group_by(&:procedure).each do |procedure, dossiers|
    %dl
      %dt
        #{procedure.libelle} (#{link_to(procedure.id, manager_procedure_url(procedure))}) :
      %dd
        = dossiers.map { |d| link_to(d.id, manager_dossier_url(d)) }.join(', ').html_safe

- if @expiring_dossiers.present?
  %h2= t('mail.administration.dossier_expiration_summary.expiring_dossiers', count: @expiring_dossiers.count)
  - @expiring_dossiers.group_by(&:procedure).each do |procedure, dossiers|
    %dl
      %dt
        #{procedure.libelle} (#{link_to(procedure.id, manager_procedure_url(procedure))}) :
      %dd
        = dossiers.map { |d| link_to(d.id, manager_dossier_url(d)) }.join(', ').html_safe

- if @expired_dossiers.empty? && @expiring_dossiers.empty?
  Il n’y a pas de dossier expiré ou sur le point d’expirer.


-title = the_vernaculator('title_display', 'title_vern_display')
-subtitle = the_vernaculator('subtitle_display', 'subtitle_vern_display')
= render :partial => 'shared/back_to_item'
%h2 ScanIt
%div.well
  %h3.item-title-request.blacklight-title_display=title
  %div.request-author
    =show_presenter(@document).field_value 'title_responsibility_display'
  %p
    Click the button below to go to the ScanIt form and place your request.
  .clearfix
    %a{:href => @scanit_link, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
      Go to ScanIt
  -if @alternate_request_options and @alternate_request_options.count >= 2
    = render :partial => 'shared/request_options'
  -else
    %div.accordion-heading.request-options.pull-left.form-alternative-action
    or
    =link_to 'Ask a Librarian','http://ask.library.cornell.edu'
    for help.

Fix alt options in docdel

-title = the_vernaculator('title_display', 'title_vern_display')
-subtitle = the_vernaculator('subtitle_display', 'subtitle_vern_display')
= render :partial => 'shared/back_to_item'
%h2 ScanIt
%div.well
  %h3.item-title-request.blacklight-title_display=title
  %div.request-author
    =show_presenter(@document).field_value 'title_responsibility_display'
  %p
    Click the button below to go to the ScanIt form and place your request.
  .clearfix
    %a{:href => @scanit_link, :title =>'Submit ScanIt Request',:class => 'btn btn-danger pull-left', :target => '_blank'}
      Go to ScanIt
  -if @alternate_methods && @alternate_methods.count > 1
    = render :partial => 'shared/request_options'
  -else
    %div.accordion-heading.request-options.pull-left.form-alternative-action
    or
    =link_to 'Ask a Librarian','http://ask.library.cornell.edu'
    for help.


%h2.effective-orders-page-title= (@page_title || 'Payment Declined')

%p Your #{link_to_current_cart(label: 'Shopping Cart')} items have been saved.  Please try again.

Add flash to declined page

%h2.effective-orders-page-title= (@page_title || 'Payment Declined')

%p= flash[:danger]

%p Your #{link_to_current_cart(label: 'Cart')} items have been saved.  Please try again.


- if page_mirror.present?
  = radio_button_tag(:page_radio_button_name, page_url, false, disabled: page_mirror.disabled?, data: { 'dough-linkmanager-value-trigger' => true, 'dough-linkmanager-link-type' => 'internal' })

Fix issue where link wasn't being passed back to Scribe

- if page_mirror.present?
  = radio_button_tag(:page_radio_button_name, page_url, false, disabled: page_mirror.disabled?, data: { 'dough-linkmanager-value-trigger' => true, 'dough-linkmanager-link-type' => 'page' })


%table.index.edit-note-table
  %tr.edit-note.hidden.total
    %td{ :colspan => "5" }
      %label
        = t(".note_label")
      = text_field_tag :note, @order.note

    %td.actions
      = link_to '', '', class: 'save-note icon_link icon-ok no-text with-tip', data: { action: 'save' }, title: I18n.t('actions.save')
      = link_to '', '', class: 'cancel-note icon_link icon-cancel no-text with-tip', data: { action: 'cancel' }, title: I18n.t('actions.cancel')

  %tr.show-note.total
    %td{ :colspan => "5" }
      - if order.note.present?
        %strong
          = t(".note_label")
        = order.note
      - else
        = t(".no_note_present")

    %td.actions
      = link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')

Add counter on note input

%table.index.edit-note-table
  %tr.edit-note.hidden.total
    %td{ colspan: "5", data: { controller: "input-char-count" }, style: "position: relative;" }
      %label
        = t(".note_label")
      = text_field_tag :note, @order.note, { maxLength: 280, data: { "input-char-count-target": "input" } }
      %span.edit-note-count{ data: { "input-char-count-target": "count" }, style: "position: absolute; right: 7px; top: 7px; font-size: 11px;" }

    %td.actions
      = link_to '', '', class: 'save-note icon_link icon-ok no-text with-tip', data: { action: 'save' }, title: I18n.t('actions.save')
      = link_to '', '', class: 'cancel-note icon_link icon-cancel no-text with-tip', data: { action: 'cancel' }, title: I18n.t('actions.cancel')

  %tr.show-note.total
    %td{ :colspan => "5" }
      - if order.note.present?
        %strong
          = t(".note_label")
        = order.note
      - else
        = t(".no_note_present")

    %td.actions
      = link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')


- content_for :breadcrumbs do
  = link_to @box.capitalize, messages_path(view: @box)
  »
  %b= @page_title

.post-header
  .padding-15
    %span= @page_title

= render partial: 'single', collection: @messages, as: :message
%br
- unless @message.site_message?
  = render partial: 'editor'

Use parent to check for site message, which is set based off message not the uncreated @message

- content_for :breadcrumbs do
  = link_to @box.capitalize, messages_path(view: @box)
  »
  %b= @page_title

.post-header
  .padding-15
    %span= @page_title

= render partial: 'single', collection: @messages, as: :message
%br
- unless @message.parent.site_message?
  = render partial: 'editor'


/ Chance
.col-md-4.col-xs-12.widget.widget_tally_box
  %button.x_panel.ui-ribbon-container.fixed_height_390{"data-target" => "#contact", "data-toggle" => "modal", :type => "button"}
    - if percent > 75
      .ui-ribbon-wrapper
        .ui-ribbon
          Prioritet
    / .x_title
    /   %h2= type
    /   .clearfix
    .x_content
      %div{style: "text-align: center; margin-bottom: 17px"}
        %span.chart{"data-percent" => percent}
          %span.percent= percent
          %canvas{height: "110", width: "110"}
      %h3.name_title= "#{name} #{type}"

      %br
      %div
        %ul.list-inline.widget_tally
          - @chance.factors.where(product: name).order(id: :desc).limit(3).each do |factor|
            %li
              %span.month
                = factor.title
              %span.count
                = factor.amount > 0 ? '+' : '-'
                = "#{factor.amount.abs}%"
      / %p Šansa za kupovinu
      / .divider
      / %p If you've decided to go in development mode and tweak all of this a bit, there are few things you should do.

Add font-awesome icons to factors

/ Chance
.col-md-4.col-xs-12.widget.widget_tally_box
  %button.x_panel.ui-ribbon-container.fixed_height_390{"data-target" => "#contact", "data-toggle" => "modal", :type => "button"}
    - if percent > 75
      .ui-ribbon-wrapper
        .ui-ribbon
          Prioritet
    / .x_title
    /   %h2= type
    /   .clearfix
    .x_content
      %div{style: "text-align: center; margin-bottom: 17px"}
        %span.chart{"data-percent" => percent}
          %span.percent= percent
          %canvas{height: "110", width: "110"}
      %h3.name_title= "#{name} #{type}"

      %br
      %div
        %ul.list-inline.widget_tally
          - @chance.factors.where(product: name).order(id: :desc).limit(3).each do |factor|
            %li
              %span.month
                - if factor.title.include? 'kredit'
                  %i.fa.fa-bar-chart{style: "color: #3b5998;"}
                - else
                  %i.fa.fa-facebook-official{style: "color: #3b5998;"}
                = factor.title
              %span.count
                = factor.amount > 0 ? '+' : '-'
                = "#{factor.amount.abs}%"
      / %p Šansa za kupovinu
      / .divider
      / %p If you've decided to go in development mode and tweak all of this a bit, there are few things you should do.


.row{ "ng-show" => "savedCreditCards != null && savedCreditCards.length > 0" }
  .small-12.columns
    %h6= t('.used_saved_card')
    %select{ name: "selected_card", required: false, ng: { model: "secrets.selected_card", options: "card.id as card.formatted for card in savedCreditCards" } }
      %option{ value: "" }= "{{ secrets.selected_card ? '#{t('.enter_new_card')}' : '#{t('.choose_one')}' }}"

    %h6{ ng: { if: '!secrets.selected_card' } }
      = t('.or_enter_new_card')

%div{ ng: { if: '!secrets.selected_card' } }
  = render "spree/checkout/payment/gateway", payment_method: payment_method

.row
  .small-12.columns.text-right
    = check_box_tag 'secrets.save_requested_by_customer'
    = label_tag 'secrets.save_requested_by_customer', t('.remember_this_card')

:javascript
  Stripe.setPublishableKey("#{ENV['STRIPE_INSTANCE_PUBLISHABLE_KEY']}")

Hide option to 'Remember this card' when an existing card is selected


- content_for(:title) do
  = t :label_map

- content_for :injection_data do
  = inject_available_countries
  = inject_enterprise_shopfront_list
  = inject_open_street_map_config

= render partial: "shared/map"

Create independent title string for 'Map' page

- content_for(:title) do
  = t :map_title

- content_for :injection_data do
  = inject_available_countries
  = inject_enterprise_shopfront_list
  = inject_open_street_map_config

= render partial: "shared/map"


---
layout: master
---

%article
  %header
    %h1= @scope.title

    %h4
      Par
      = @scope.author
      - if @contents.account? "twitter"
        %a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
      - if @contents.account? "gplus"
        %a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
      , le
      = @scope.formated_date
      dans

      %ul.tags
        - tags.each do |tag|
          %li
            %a.icon-tag{:href => link_to("tags/#{tag}")}
              = tag

    - if @scope.gravatar?
      %img.pola{:src => @scope.gravatar, :alt => @scope.author}

  %div(itemprop="articleBody")
    = content

  %footer
    = render :partial => "twitter_share_account"
    = render :partial => "gplus_share"

Add template to handle comments

---
layout: master
---

%article
  %header
    %h1= @scope.title

    %h4
      Par
      = @scope.author
      - if @contents.account? "twitter"
        %a.icon-twitter-sign.color.alone(href="#{@contents.account "twitter"}")
      - if @contents.account? "gplus"
        %a.icon-google-plus-sign.color.alone(href="#{@contents.account "gplus"}?rel=author")
      , le
      = @scope.formated_date
      dans

      %ul.tags
        - tags.each do |tag|
          %li
            %a.icon-tag{:href => link_to("tags/#{tag}")}
              = tag

    - if @scope.comments?
      %h5
        %a(href="#comments")
          = "(#{@scope.comments.size} commentaire#{if @scope.comments.size > 1 then "s" end})"

    - if @scope.gravatar?
      %img.pola{:src => @scope.gravatar, :alt => @scope.author}

  %div(itemprop="articleBody")
    = content

  - if @scope.comments?
    %h2
      %a#comments
        Commentaires
    - @scope.comments.each do |comment|
      %article
        %header
          %h3= comment.title
          %h4
            Par
            %a{:href => comment.website, :rel => "nofollow"}
              = comment.author
            , le
            = comment.date

          = comment.content

  %footer
    = render :partial => "twitter_share_account"
    = render :partial => "gplus_share"


- cache episode do
  .episode-summary
    = link_to episode, title: episode.title, class: 'row' do
      .preview.large-6.columns
        = image_tag episode.flyer, alt: episode.name
      .info.large-6.columns
        %h5
          = episode.title
        %ul
          - episode.artists.each do |artist|
            %li.artist-name= artist.name

Fix episode flyer not showing

- cache episode do
  .episode-summary
    = link_to episode, title: episode.title, class: 'row' do
      .preview.large-6.columns
        = episode.flyer
      .info.large-6.columns
        %h5
          = episode.title
        %ul
          - episode.artists.each do |artist|
            %li.artist-name= artist.name


- flash.each do |name, msg|
  - if msg.is_a?(String)
    %div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
      %a.close{"data-dismiss" => "alert"} ×
      = content_tag :div, msg, :id => "flash_#{name}"

Fix flash name now a string, not a symbol

- flash.each do |name, msg|
  - if msg.is_a?(String)
    %div{:class => "alert alert-#{name == 'notice' ? "success" : "error"}"}
      %a.close{"data-dismiss" => "alert"} ×
      = content_tag :div, msg, :id => "flash_#{name}"


#history
  - unless scraper.finished_runs.length == 0
    %h3 History

    -# TODO Only show a limited number of the most recent runs
    %ul.list-group
    - scraper.finished_runs.each do |run|
      = render partial: "runs/history", locals: {run: run}

Fix HTML by nesting list items below unordered list tag


.page-title Route #{@route.number} Bus Stops

- if @stops.empty?
  No stops on this route
- @stops.each do |stop|
  = link_to edit_bus_stop_path(stop.hastus_id) do
    %button.btn.btn-default= stop.name

Convert buttons to a list of links

.page-title Route #{@route.number} Bus Stops

- if @stops.empty?
  No stops on this route
- @stops.each do |stop|
  %ul
    %li
      = link_to edit_bus_stop_path(stop.hastus_id) do
        - stop.name


%h1 Releases for #{@app_name}

%table.table.table-striped
  %tr
    %th id
    %th date
    %th message
    %th feature review
  - @releases.each do |release|
    %tr.release{class: ('danger' unless release.approved)}
      %td= release.version
      %td= release.time
      %td= release.subject
      %td= link_to release.feature_review_status, release.feature_review_path if release.feature_review_path

Remove alternating stripes from Releases table

%h1 Releases for #{@app_name}

%table.table
  %tr
    %th id
    %th date
    %th message
    %th feature review
  - @releases.each do |release|
    %tr.release{class: ('danger' unless release.approved)}
      %td= release.version
      %td= release.time
      %td= release.subject
      %td= link_to release.feature_review_status, release.feature_review_path if release.feature_review_path


%nav.navbar.navbar-default
  .container-fluid
    .navbar-header
      %button.navbar-toggle.collapsed{'data-target' => '#navbar-collapse', 'data-toggle' => 'collapse', type: 'button'}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to 'Musiquely', root_path, class: 'navbar-brand'
    #navbar-collapse.collapse.navbar-collapse
      %ul.nav.navbar-nav.navbar-left
        %li= link_to 'Blog', 'http://blog.musiquely.com/'
        %li= link_to 'About', about_path
        %li= link_to 'Contact', contact_path
      %ul.nav.navbar-nav.navbar-right
        - if current_user
          %li= link_to 'Dashboard', dashboard_path
          %li= link_to 'Log out', logout_path
        - else
          %li= link_to 'Sign in with Spotify', auth_path('spotify')

Remove link to empty blog

%nav.navbar.navbar-default
  .container-fluid
    .navbar-header
      %button.navbar-toggle.collapsed{'data-target' => '#navbar-collapse', 'data-toggle' => 'collapse', type: 'button'}
        %span.sr-only Toggle navigation
        %span.icon-bar
        %span.icon-bar
        %span.icon-bar
      = link_to 'Musiquely', root_path, class: 'navbar-brand'
    #navbar-collapse.collapse.navbar-collapse
      %ul.nav.navbar-nav.navbar-left
        %li= link_to 'About', about_path
        %li= link_to 'Contact', contact_path
      %ul.nav.navbar-nav.navbar-right
        - if current_user
          %li= link_to 'Dashboard', dashboard_path
          %li= link_to 'Log out', logout_path
        - else
          %li= link_to 'Sign in with Spotify', auth_path('spotify')


%li.feature
  .pull-right= link_to('Edit', edit_member_path(member), :class => 'btn primary')
  .span1
    %img{:style => 'width: 100%;', :src => gravatar(member.email)}
  .span5
    %h2= link_to member.full_name, member_path(member)
    %p
      = member.email
    %p
      = link_to "Github -> #{member.github}", "http://github.com/#{member.github}"
      |
      = link_to "Twitter -> #{member.twitter}", "http://twitter.com/#{member.twitter}"

Remove member email from member partial (because spammers are not nice people)

%li.feature
  .pull-right= link_to('Edit', edit_member_path(member), :class => 'btn primary')
  .span1
    %img{:style => 'width: 100%;', :src => gravatar(member.email)}
  .span5
    %h2= link_to member.full_name, member_path(member)
    %p
      = link_to "Github -> #{member.github}", "http://github.com/#{member.github}"
      |
      = link_to "Twitter -> #{member.twitter}", "http://twitter.com/#{member.twitter}"


%table.social.white-bg{:width => "100%"}
  %tr
    %td
      %table.column{:align => "left"}
        %tr
          %td
            %h3
              = t(".customer_greeting", name: @order.bill_address.firstname)
            %h4
              = t(".instructions_html", distributor: @order.distributor.name )
            %img.float-left{:src => "#{@order.distributor.logo.url(:medium)}"}/
      %span.clear

%p.callout
  = t(".dont_cancel", email: @order.distributor.contact.email)

%p

= t(".order_summary_canceled")
= render 'order_summary'
= render 'signoff'
= render 'shared/mailers/social_and_contact'

Add new order sumary in order cancel mail

%table.social.white-bg{:width => "100%"}
  %tr
    %td
      %table.column{:align => "left"}
        %tr
          %td
            %h3
              = t(".customer_greeting", name: @order.bill_address.firstname)
            %h4
              = t(".instructions_html", distributor: @order.distributor.name )
            %img.float-left{:src => "#{@order.distributor.logo.url(:medium)}"}/
      %span.clear

%p.callout
  = t(".dont_cancel", email: @order.distributor.contact.email)

%p
%h4
  = t(".order_summary_canceled_html", number: @order.number)
%p
  = t(".details")

= render 'order_summary'
= render 'signoff'
= render 'shared/mailers/social_and_contact'


= CSV.generate_line @headers
- @compliments.each do |compliment|
    = CSV.generate_line([compliment.complimenter, compliment.complimentee, compliment.text.to_csv, compliment.created_at.to_date])

Replace real commas with unicode full-comma char

= CSV.generate(headers: true) do |csv|
  - csv << @headers
  - @compliments.each do |compliment|
    - csv << [compliment.complimenter, compliment.complimentee, compliment.text.gsub(",", "，"), compliment.created_at.to_date]


= render :partial => "layouts/flash_msg"
- if @sb[:active_accord] == :schedules || params[:pressed] == "miq_report_schedule_add"
  - if @in_a_form
    = render :partial => 'schedule_form'
  - elsif @schedule
    = render :partial => 'show_schedule'
  - elsif @schedules && @view
    - if @view.table.data.empty?
      = render :partial => 'layouts/info_msg', :locals => {:message => _("No Schedules available.")}
    - else
      = render :partial => 'layouts/x_gtl'
  - else
    = render :partial => 'layouts/info_msg', :locals => {:message => _("Choose a Schedule to view from the menus on the left.")}

Remove duplicated flash message from reporting schedule page


- content_for :title do
  = truncate(division.name, length: 180)

.page-header.division-header
  %h1.division-title
    %small.pre-title= division_date_and_time(division) + ", " + division.australian_house_name
    = link_to_if @display == 'policies', yield(:title), division

Change house appended by hyphen

- content_for :title do
  = truncate(division.name, length: 180)

.page-header.division-header
  %h1.division-title
    %small.pre-title= division_date_and_time(division) + " – " + division.australian_house_name
    = link_to_if @display == 'policies', yield(:title), division


%p
  = render :_search_form, layout: false
- if @books
  .row
    .col-sm-7
      = render :_books, layout: false
    .col-sm-3
      %p#conditions
        = render :_conditions, layout: false
    .col-sm-2
      %p#authors
        = render :_authors, layout: false
%p
  = render :_faq, layout: false

Add an internal link to page top

%p
  = render :_search_form, layout: false
- if @books
  .row
    .col-sm-7
      = render :_books, layout: false
    .col-sm-3
      %p#conditions
        = render :_conditions, layout: false
    .col-sm-2
      %p#authors
        = render :_authors, layout: false
%p
  = render :_faq, layout: false
- if url_for(only_path: true) != "/"
  %p
    [
    = link_to("ページ上部に移動", "#")
    ]


= inject_enterprises

.darkswarm
  - content_for :order_cycle_form do

    %closing Checkout now
    %p
      Order ready for
      %strong
        = pickup_time current_order_cycle

  = render partial: "shopping_shared/details"

  %accordion{"close-others" => "true"}
    %checkout.row{"ng-controller" => "CheckoutCtrl"}
      .small-12.medium-8.large-9.columns
        - unless spree_current_user
          = render partial: "checkout/authentication"
        .row{"ng-show" => "enabled", "ng-controller" => "AccordionCtrl"}
          = render partial: "checkout/form"
      .small-12.medium-4.large-3.columns
        = render partial: "checkout/summary"

= render partial: "shared/footer"

Tweak layout. Remove unnecessary row which was messing up the responsive layout for left column on checkout.

= inject_enterprises

.darkswarm
  - content_for :order_cycle_form do

    %closing Checkout now
    %p
      Order ready for
      %strong
        = pickup_time current_order_cycle

  = render partial: "shopping_shared/details"

  %accordion{"close-others" => "true"}
    %checkout.row{"ng-controller" => "CheckoutCtrl"}
      .small-12.medium-8.large-9.columns
        - unless spree_current_user
          = render partial: "checkout/authentication"
        %div{"ng-show" => "enabled", "ng-controller" => "AccordionCtrl"}
          = render partial: "checkout/form"
      .small-12.medium-4.large-3.columns
        = render partial: "checkout/summary"

= render partial: "shared/footer"


%h2
  We've got your code - we'd better get you an account

= twitter_bootstrap_form_for(@user, :url => user_registration_path) do |f|
  = f.text_field :name, :value => @user.fetched_name
  = f.email_field :email, :value => @user.fetched_email
  = f.password_field :password
  -#   = f.password_field :password_confirmation
  = f.submit "Sign up", :class => "btn primary"

Make the form button work and be pretty.

%h2
  We've got your code - we'd better get you an account

= twitter_bootstrap_form_for(@user, :url => user_registration_path) do |f|
  = f.text_field :name, :value => @user.fetched_name
  = f.email_field :email, :value => @user.fetched_email
  = f.password_field :password
  -#   = f.password_field :password_confirmation
  .clearfix.input
    = f.submit "Sign up", :class => "btn primary"


.container#registration-images
  .header
    %h2 Thanks!
    %h5 Let's upload some pretty pictures so your profile looks great! :)
  %ng-include{ src: "'registration/steps.html'" }
  .row.content

  .row.buttons
    .small-12.columns
      %input.button.primary.left{ type: "button", value: "Back", ng: { click: "select('about')" } }
      %input.button.primary.right{ type: "button", value: "Continue", ng: { click: "select('social')" } }

Adjust button layout at bottom of page


.activity.clearfix
  .avatar
    - if a.owner
      = image_tag a.owner.image, size: '60x60', class: 'img-circle'
  .body
    .title
      - if a.owner
        = link_to a.owner.name, a.owner
      - else
        someone
      = content_for :action
    .details
      = yield
    .timestamp
      = timeago a.created_at

Use activity's trackable created_at as timeago column

.activity.clearfix
  .avatar
    - if a.owner
      = image_tag a.owner.image, size: '60x60', class: 'img-circle'
  .body
    .title
      - if a.owner
        = link_to a.owner.name, a.owner
      - else
        someone
      = content_for :action
    .details
      = yield
    .timestamp
      = timeago a.trackable.try(:created_at) || a.created_at


!!!
%html
  %head
    %title= WulinMaster.config.app_title
    %meta(http-equiv="content-type" content="text/html; charset=UTF-8")
    %meta(http-equiv="content-language" content="en")
    = csrf_meta_tags
    = stylesheet_link_tag    *WulinMaster.stylesheets, :media => :all
    :javascript
      if (typeof(console) === "undefined") {
        console = { log: function() {} };
      }
      window._token = encodeURIComponent('#{form_authenticity_token}');
      window._always_reset_form = #{WulinMaster.config.always_reset_form};
    = javascript_include_tag *WulinMaster.javascripts
    = yield :header_tags
    :javascript
      $(function(){
        if (navigator.userAgent.indexOf('AppleWebKit') === -1 && navigator.userAgent.indexOf('Gecko') === -1) {
          displayNewNotification('The browser you are currently using is not supported, we recommend using Chrome.', true);
        }
      });
  %body
    = yield

Update how assets are loaded

!!!
%html
  %head
    %title= WulinMaster.config.app_title
    %meta(http-equiv="content-type" content="text/html; charset=UTF-8")
    %meta(http-equiv="content-language" content="en")
    = csrf_meta_tags
    = stylesheet_link_tag 'application', :media => :all
    :javascript
      if (typeof(console) === "undefined") {
        console = { log: function() {} };
      }
      window._token = encodeURIComponent('#{form_authenticity_token}');
      window._always_reset_form = #{WulinMaster.config.always_reset_form};
    = javascript_include_tag 'application'
    = yield :header_tags
    :javascript
      $(function(){
        if (navigator.userAgent.indexOf('AppleWebKit') === -1 && navigator.userAgent.indexOf('Gecko') === -1) {
          displayNewNotification('The browser you are currently using is not supported, we recommend using Chrome.', true);
        }
      });
  %body
    = yield


#learn
  %h1 Suggestions for learning Ruby and/or Rails
  %h2 Local
  %h3 Emerald City Programming Group
  %p
    The Emerald City Programming Group is a group of people getting
    together in Norcross to learn how to program in Rails.
    Look for Emerald City on the calendar at
    = link_to 'Atlanta Ruby on Meetup.com', 'http://www.meetup.com/atlantaruby/'
  %br
  %h2 Online
  %p
    Look for materials that are up to date and use current best practices
    (probably written in 2012 or 2013).
  %p
    Be wary of tutorial materials that fail to use Ruby 1.9+ and Rails 3.2+,
    or fail to reference Git, RVM, or Bundler.
  %br
  %ul
    %li
      = link_to 'Rails Tutorial', 'http://ruby.railstutorial.org/ruby-on-rails-tutorial-book'
      %br
      We've found this book to be an excellent resource for top-down learners:
      people who like to attack real problems right away, and figure out how
      the language and framework function as they go.
  %br
  %h2 Books
  %p
    There are lots of various books available, but be wary of outdated ones.
    The best practices are still evolving. Look for books that talk about some
    of the current best practices, as mentioned in the online section, above.

Revert "Merged altrug3's learn text into our web page"

#learn
  %h1 Suggestions for learning Ruby and/or Rails
  %h2 Local
  %h3 Emerald City Programming Group
  %p
    The Emerald City Programming Group is a group of people getting
    together in Norcross to learn how to program in Rails.
    Look for Emerald City on the calendar at
    = link_to 'Atlanta Ruby on Meetup.com', 'http://www.meetup.com/atlantaruby/'
  %h2 Interwubs/Books
  %p
    Look for materials that are up to date and use current best practices
    (probably written in 2010 or 2011).
  %p
    Be wary of tutorial materials that fail to use Ruby 1.9+ and Rails 3.0+,
    or fail to reference Git, RVM, or Bundler.
  %ul
    %li
      = link_to 'Rails Tutorial', 'http://ruby.railstutorial.org/ruby-on-rails-tutorial-book'
      %br
      We've found this book to be an excellent resource for top-down learners:
      people who like to attack real problems right away, and figure out how
      the language and framework function as they go.


- model_class = Meeting
.page-header
  %h1= t '.title', :default => model_class.model_name.human.pluralize.titleize
= render 'meeting_list'

Rename meetings to classes in the template.

- model_class = Meeting
.page-header
  %h1= t '.title', :default => Classes
= render 'meeting_list'


=page_header resource.to_s
= view_for resource_path_array do |s|
  = render 'show', :s => s

- child_resources.each do |data|
  %h2= data[:name]
  .btn-toolbar
    = link_to("New #{data[:resource_name]}", polymorphic_url((controller_namespaces + [resource, data[:resource_class]]), :action => :new), :class => 'btn')
  = table_for(controller_namespaces + [resource, data[:resource_class]], resource.send(data[:symbol]), :class => 'table') do |t|
    = render (controller_namespaces + [data[:symbol].to_s, 'table']).join('/'), :t => t, :resource_class => data[:resource_class]

Fix styling of show page

= page_header resource.to_s
= view_for resource_path_array do |s|
  = render 'show', :s => s

- child_resources.each do |data|
  %h2= data[:name]
  .btn-toolbar
    = link_to("New #{data[:resource_name]}", polymorphic_url((controller_namespaces + [resource, data[:resource_class]]), :action => :new), :class => 'btn')
  = table_for(controller_namespaces + [resource, data[:resource_class]], resource.send(data[:symbol])) do |t|
    = render (controller_namespaces + [data[:symbol].to_s, 'table']).join('/'), :t => t, :resource_class => data[:resource_class]


%header.title-bar
  %nav#menu.menu
  #add-symbol.add-symbol

.add-symbol-wrapper
  %form#add-symbol-form.add-symbol-form
    %input{ name: 'stock_symbol', placeholder: 'e.g. GOOG', type: 'text' }

#portfolios.portfolios
  %ul.stock-list#stocks

Remove menu icon for now and turn off autocomplete and autocorrect

%header.title-bar
  #add-symbol.add-symbol

.add-symbol-wrapper
  %form#add-symbol-form.add-symbol-form
    %input{ autocapitalize: 'off', autocorrect: 'off', name: 'stock_symbol', placeholder: 'e.g. GOOG', type: 'text' }

#portfolios.portfolios
  %ul.stock-list#stocks


%nav.navbar.navbar-default{ role: 'navigation' }
  %div.container-fluid
    %div.navbar-header
      %a.navbar-brand= link_to 'Home', root_path
    %div.collapse.navbar-collapse
      %ul.nav.navbar-nav
        %li= link_to 'Dashboard', admin_dashboard_path

Use site name as navbar 'home' button

%nav.navbar.navbar-default{ role: 'navigation' }
  %div.container-fluid
    %div.navbar-header
      %a.navbar-brand= link_to LONG_SITE_NAME, root_path
    %div.collapse.navbar-collapse
      %ul.nav.navbar-nav
        %li= link_to 'Dashboard', admin_dashboard_path


- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .pull-right.col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .text-content
      - if has_button
        %h4
          The Issue Tracker is the place to add things that need to be improved or solved in a project
        %p
          Issues can be bugs, tasks or ideas to be discussed.
          Besides, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        - else
          = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        %h4.text-center There are no issues to show.

Simplify copy in issues empty state

- button_path = local_assigns.fetch(:button_path, false)
- project_select_button = local_assigns.fetch(:project_select_button, false)
- has_button = button_path || project_select_button

.row.empty-state
  .pull-right.col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .svg-content
      = render 'shared/empty_states/icons/issues.svg'
  .col-xs-12{ class: "#{'col-sm-6' if has_button}" }
    .text-content
      - if has_button
        %h4
          The Issue Tracker is the place to add things that need to be improved or solved in a project
        %p
          Issues can be bugs, tasks or ideas to be discussed.
          Also, issues are searchable and filterable.
        - if project_select_button
          = render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue'
        - else
          = link_to 'New issue', button_path, class: 'btn btn-new', title: 'New issue', id: 'new_issue_link'
      - else
        %h4.text-center There are no issues to show.


%tr{class: article.deleted ? 'table-row--danger' : ''}
  %td.title
    = link_to article.full_title, article.url
    = t('articles.deleted') if article.deleted
  %td.char_added
    = article_course.character_sum
  %td.views
    = article_course.view_count
  %td.lang_project
    %small
      = "#{article.wiki.language}.#{article.wiki.project}"
  %td.course_title
    %small
      = link_to article_course.course.slug, article_course.course.slug

Fix course links on campaign Articles view

%tr{class: article.deleted ? 'table-row--danger' : ''}
  %td.title
    = link_to article.full_title, article.url
    = t('articles.deleted') if article.deleted
  %td.char_added
    = article_course.character_sum
  %td.views
    = article_course.view_count
  %td.lang_project
    %small
      = "#{article.wiki.language}.#{article.wiki.project}"
  %td.course_title
    %small
      = link_to article_course.course.slug, "/courses/#{article_course.course.slug}"


- page_title _('New Password')
- breadcrumb_title _('New Password')

%h3.page-title= _('Set up new password')
%hr
= form_for @user, url: profile_password_path, method: :post do |f|
  %p.slead
    = _('Please set a new password before proceeding.')
    %br
    = _('After a successful password update you will be redirected to login screen.')

  = form_errors(@user)

  - unless @user.password_automatically_set?
    .form-group.row
      .col-sm-2.col-form-label
        = f.label :current_password, _('Current password')
      .col-sm-10
        = f.password_field :current_password, required: true, class: 'form-control'
  .form-group.row
    .col-sm-2.col-form-label
      = f.label :password, _('New Password')
    .col-sm-10
      = f.password_field :password, required: true, class: 'form-control'
  .form-group.row
    .col-sm-2.col-form-label
      = f.label :password_confirmation, _('Password confirmation')
    .col-sm-10
      = f.password_field :password_confirmation, required: true, class: 'form-control'
  .form-actions
    = f.submit _('Set new password'), class: 'btn btn-success'

Make CE and EE consistent

- page_title _('New Password')
- breadcrumb_title _('New Password')

%h3.page-title= _('Set up new password')
%hr
= form_for @user, url: profile_password_path, method: :post do |f|
  %p.slead
    = _('Please set a new password before proceeding.')
    %br
    = _('After a successful password update you will be redirected to login screen.')

  = form_errors(@user)

  - unless @user.password_automatically_set?
    .form-group.row
      .col-sm-2.col-form-label
        = f.label :current_password, _('Current password')
      .col-sm-10
        = f.password_field :current_password, required: true, class: 'form-control'
  .form-group.row
    .col-sm-2.col-form-label
      = f.label :password, _('New password')
    .col-sm-10
      = f.password_field :password, required: true, class: 'form-control'
  .form-group.row
    .col-sm-2.col-form-label
      = f.label :password_confirmation, _('Password confirmation')
    .col-sm-10
      = f.password_field :password_confirmation, required: true, class: 'form-control'
  .form-actions
    = f.submit _('Set new password'), class: 'btn btn-success'


%li
  = link_to(edit_user_registration_path) do
    %span.fa.fa-wrench
    Edit Account
-if @conference and @conference.id
  %li
    = link_to(conference_proposal_index_path(@conference.short_title)) do
      %span.fa.fa-comment
      My Submissions
%li
  = link_to(destroy_user_session_path, :method=>'delete') do
    %span.fa.fa-minus
    Sign out
- if can? :index, Conference
  %li.divider
    %li
      = link_to(admin_conference_index_path()) do
        - if Conference.any?
          %span.fa.fa-home
            Administration
        - else
          %span.fa.fa-plus
          Create Conference
    -if @conference and @conference.id and can? :show, @conference
      %li
        = link_to(admin_conference_path(@conference.short_title)) do
          %span.fa.fa-cog
          Manage
          = @conference.short_title

Add Users link in drop down menu

%li
  = link_to(edit_user_registration_path) do
    %span.fa.fa-wrench
    Edit Account
-if @conference and @conference.id
  %li
    = link_to(conference_proposal_index_path(@conference.short_title)) do
      %span.fa.fa-comment
      My Submissions
%li
  = link_to(destroy_user_session_path, :method=>'delete') do
    %span.fa.fa-minus
    Sign out
- if can? :index, Conference
  %li.divider
    %li
      = link_to(admin_conference_index_path()) do
        - if Conference.any?
          %span.fa.fa-home
            Administration
        - else
          %span.fa.fa-plus
          Create Conference
    -if @conference and @conference.id and can? :show, @conference
      %li
        = link_to(admin_conference_path(@conference.short_title)) do
          %span.fa.fa-cog
          Manage
          = @conference.short_title
- if can? :index, User
  %li
    = link_to(admin_users_path) do
      %span.fa.fa-user
      Users


.row
  .columns.small-offset-1.small-10
    = form_tag user_do_verify_email_url(@user), method: "POST" do |f|
      = label_tag :token, "Verification Token:"
      = text_field_tag :token, @token.try!(:token)
      = submit_tag "Verify EMail"

Use correct url for email verif

.row
  .columns.small-offset-1.small-10
    = form_tag user_do_verify_email_path(@user), method: "POST" do |f|
      = label_tag :token, "Verification Token:"
      = text_field_tag :token, @token.try!(:token)
      = submit_tag "Verify EMail"


.visualization-new.container
  %h2 Create Visualization
  .row
    .col-sm-6
      = form_for @visualization, url: {action: "create"} , method: "post" do |f|
        .form-group
          = f.label "visualization-input-title", "Title"
          = f.text_field :name, class: "form-control"
        = f.submit "Create", class: "btn btn-default btn-primary"

Add csv files to new visualization form

.visualization-new.container
  %h2 Create Visualization
  .row
    .col-sm-6
      = form_for @visualization, url: {action: "create"} , method: "post" do |f|
        .form-group
          = f.label :name, "Visualization title"
          = f.text_field :name, class: "form-control"
        .form-group
          = f.label :nodes, "Upload Nodes CSV File"
          = f.file_field :nodes, accept: '.csv', :class => "form-control"
        .form-group
          = f.label :relations, "Upload Relations CSV File"
          = f.file_field :relations, accept: '.csv', :class => "form-control"
        = f.submit "Create", class: "btn btn-default btn-primary"


%footer.footer
  Copyright 2015 David Winings. Data gratefully used with permission from the
  %a{href: "https://play.google.com/store/apps/details?id=com.daviancorp.android.mh4udatabase"} MH Database.

Update copyright and attribution notice.

%footer.footer
  Copyright 2016 David Winings. Data gratefully used with permission from the
  %a{href: "https://play.google.com/store/apps/details?id=com.ghstudios.android.mhgendatabase"} MH Database.


- items = expand_textual_group(items)
- if items.present?
  %table.table.table-bordered.table-striped.table-summary-screen
    %thead
      %tr
        %th{:colspan => "6"}
          = title
      %tr
        %th{:rowspan => "2"} Location
        %th{:rowspan => "2"} Name
        %th{:rowspan => "2"} Manufacturer
        %th{:rowspan => "2"} FRU
        %th{:colspan => "2", :style => "text-align: center"} Ports
      %tr
        %th Name
        %th MAC Address
    - items.each do |item|
      - item[:value].each do |subitem|
        %tr
          %td
            = subitem[:location]
          %td
            = subitem[:adapter_name]
          %td
            = subitem[:manufacturer]
          %td
            = subitem[:fru]
          %td
            - subitem[:port_names].each do |port_name|
              = port_name
              %br/
          %td
            - subitem[:mac_addresses].each do |mac_address|
              = mac_address
              %br/

Update code to only display the network adapter table when a server has an adapter

- items = expand_textual_group(items)
- if items.present? && items[0][:value].present?
  %table.table.table-bordered.table-striped.table-summary-screen
    %thead
      %tr
        %th{:colspan => "6"}
          = title
      %tr
        %th{:rowspan => "2"} Location
        %th{:rowspan => "2"} Name
        %th{:rowspan => "2"} Manufacturer
        %th{:rowspan => "2"} FRU
        %th{:colspan => "2", :style => "text-align: center"} Ports
      %tr
        %th Name
        %th MAC Address
    - items.each do |item|
      - item[:value].each do |subitem|
        %tr
          %td
            = subitem[:location]
          %td
            = subitem[:adapter_name]
          %td
            = subitem[:manufacturer]
          %td
            = subitem[:fru]
          %td
            - subitem[:port_names].each do |port_name|
              = port_name
              %br/
          %td
            - subitem[:mac_addresses].each do |mac_address|
              = mac_address
              %br/


.panel.panel-default
  .panel-heading
    %h1.panel-title
      %strong= article.title
      - if @login_user
        = link_to "Edit",
                  edit_article_path(article),
                  class: "btn btn-default btn-xs"
        = link_to "Destroy",
                  article,
                  class: "btn btn-default btn-xs",
                  method: :delete,
                  data: { confirm: "Are you sure?" }
  .panel-body
    = preserve do
      = markdown article.text
    .container
      %strong @#{article.user.username}
      = link_to article do
        %small (#{datetime_format(article.created_at)})
    .social-share.container
      = render "shared/twitter", url: article_url(article)
      = render "shared/facebook_like", url: article_url(article)
  .panel-footer
    .comments
      = render "shared/facebook_comment", url: article_url(article)

Add link from article title

.panel.panel-default
  .panel-heading
    %h1.panel-title
      %strong
        = link_to article.title, article
      - if @login_user
        = link_to "Edit",
                  edit_article_path(article),
                  class: "btn btn-default btn-xs"
        = link_to "Destroy",
                  article,
                  class: "btn btn-default btn-xs",
                  method: :delete,
                  data: { confirm: "Are you sure?" }
  .panel-body
    = preserve do
      = markdown article.text
    .container
      %strong @#{article.user.username}
      = link_to article do
        %small (#{datetime_format(article.created_at)})
    .social-share.container
      = render "shared/twitter", url: article_url(article)
      = render "shared/facebook_like", url: article_url(article)
  .panel-footer
    .comments
      = render "shared/facebook_comment", url: article_url(article)


%h1
  Newsletter

%hr
- Newsletter.all.each do |n|
  = "Name: #{n.name}"
  = "File: #{n.file_path}"
  = "date: #{n.date}"
  %hr

.panel-group#accordion
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseOne'}
          What is html?
    .panel-collapse.collapse.in#collapseOne
      .panel-body
        %p
          Html is like this markup language thing.
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseTwo'}
          What is css?
    .panel-collapse.collapse.in#collapseTwo
      .panel-body
        %p
          Cascading stylesheets

Expand on example newsletter page

%h1
  Newsletter

%hr
- Newsletter.all.each do |n|
  = "Name: #{n.name}"
  = "File: #{n.file_path}"
  = "date: #{n.date}"
  %hr

.panel-group#accordion
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseOne'}
          2016
    .panel-collapse.collapse.in#collapseOne
      .panel-body
        .col-md-3
          .panel.panel-default
            .panel-body
              January
        .col-md-3
          .panel.panel-default
            .panel-body
              February
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseTwo'}
          2015
    .panel-collapse.collapse#collapseTwo
      .panel-body
        .col-md-3
          .panel.panel-default
            .panel-body
              January
        .col-md-3
          .panel.panel-default
            .panel-body
              February
        .col-md-3
          .panel.panel-default
            .panel-body
              March
        .col-md-3
          .panel.panel-default
            .panel-body
              April
        .col-md-3
          .panel.panel-default
            .panel-body
              May
        .col-md-3
          .panel.panel-default
            .panel-body
              June
        .col-md-3
          .panel.panel-default
            .panel-body
              July
  .panel.panel-default
    .panel-heading
      %h4.panel-title
        %a{:data => {:toggle => 'collapse', :parent => '#accordion'}, :href => '#collapseThree'}
          2014
    .panel-collapse.collapse#collapseThree
      .panel-body
        .col-md-3
          .panel.panel-default
            .panel-body
              October
        .col-md-3
          .panel.panel-default
            .panel-body
              November


= render "shared/navigation"

.row
  .columns.small-12.large-12
    %a{name:"graduates"}
    %h2.nav_section.columns.small-12{:'data-magellan-destination'=>"graduates"} Rails Girls NOLA Graduates
  .columns.small-12.large-12
    .panel
      %h3.subheader
        February 2014 Graduates
        %ul
          %li Sami DeVille
          %li Aaron Matys
          %li Elizabeth Wotawa
          %li Anabelle Franz
          %li Federico Lertora
          %li Alicia Steadman
          %li Deborah Anderson
          %li Adele Tiblier
          %li Jenny Velasquez
          %li Carrington Roaf
          %li Natasha Salas
          %li Alba Huddleston
          %li Libby Favrot
          %li Danielle Tanguis
          %li Michelle calabro
          %li Tanvi Shah
          %li Vachelle Manly
          %li Julia Ballard
  .columns.small-12.large-12
    .panel
      %h3.subheader
        September 2014 Graduates
        %ul

Add Kallistia Giermek to Graduates

= render "shared/navigation"

.row
  .columns.small-12.large-12
    %a{name:"graduates"}
    %h2.nav_section.columns.small-12{:'data-magellan-destination'=>"graduates"} Rails Girls NOLA Graduates
  .columns.small-12.large-12
    .panel
      %h3.subheader
        February 2014 Graduates
        %ul
          %li Sami DeVille
          %li Aaron Matys
          %li Elizabeth Wotawa
          %li Anabelle Franz
          %li Federico Lertora
          %li Alicia Steadman
          %li Deborah Anderson
          %li Adele Tiblier
          %li Jenny Velasquez
          %li Carrington Roaf
          %li Natasha Salas
          %li Alba Huddleston
          %li Libby Favrot
          %li Danielle Tanguis
          %li Michelle calabro
          %li Tanvi Shah
          %li Vachelle Manly
          %li Julia Ballard
  .columns.small-12.large-12
    .panel
      %h3.subheader
        September 2014 Graduates
        %ul
          %li
            %a{ :href => "www.kallistia.com", :title => "Kallistia Giermek" } Kallistia Giermek


.container
  .row
    .support-form
      = semantic_form_for(@support_request, :url => community_support_index_path ) do |f|
        = f.input :name
        = f.input :email, hint: ""
        = f.input :message, as: :text , label: I18n.t('community_support_form.new.form.describe')
        = f.action :submit

Add locale keys to header views

.container
  %h1=I18n.t('header.title')
  %h1=I18n.t('community_support_form.new.form.title')
  %p=I18n.t('community_support_form.new.form.header_text')
  .support-form
    = semantic_form_for(@support_request, :url => community_support_index_path ) do |f|
      = f.input :name
      = f.input :email, hint: ""
      = f.input :message, as: :text , label: I18n.t('community_support_form.new.form.describe')
      = f.action :submit


.clearfix
.pull-right.button-group{"ng-controller" => "buttonGroupController"}
  %miq-button{:name      => button_label,
              :title     => button_label,
              :alt       => button_label,
              :enabled   => "saveable(angularForm)",
              'on-click' => button_click,
              :primary   => 'true'}
  %miq-button{:name      => t = _("Reset"),
              :title     => t,
              :alt       => t,
              :enabled   => '!angularForm.$pristine',
              'ng-show'  => '!newRecord',
              'on-click' => "resetClicked()"}
  %miq-button{:name      => t = _("Cancel"),
              :title     => t,
              :alt       => t,
              'on-click' => "cancelClicked($event)"}

Enable the cancel button on the custom form button partial

.clearfix
.pull-right.button-group{"ng-controller" => "buttonGroupController"}
  %miq-button{:name      => button_label,
              :title     => button_label,
              :alt       => button_label,
              :enabled   => "saveable(angularForm)",
              'on-click' => button_click,
              :primary   => 'true'}
  %miq-button{:name      => t = _("Reset"),
              :title     => t,
              :alt       => t,
              :enabled   => '!angularForm.$pristine',
              'ng-show'  => '!newRecord',
              'on-click' => "resetClicked()"}
  %miq-button{:name      => t = _("Cancel"),
              :title     => t,
              :alt       => t,
              :enabled   => 'true',
              'on-click' => "cancelClicked($event)"}


-# local variables: details, registrants
- include_form = details
.expenses
  .data_block
    %fieldset
      %legend= t(".registrants_expenses", :registrant => registrant.to_s)
      %table#expense_lines
        %thead
          %tr
            %th.text-right= RegistrantExpenseItem.model_name.human
            %th= t(".cost")
            %th
              = t(".paid")
              ?
            - if include_form
              %th
        %tbody
          = render partial: "/registrants/registrant_paid_expenses", locals: { registrant: registrant, details: details }
          = render partial: "/registrants/registrant_unpaid_expenses", locals: { registrant: registrant, include_form: include_form, details: details }
        %tfoot
          %tr
            %th
            %th{ colspan: include_form ? 3 : 2}
              = render partial: "/registrants/registrant_total_owing", locals: { registrant: registrant }
          %tr
            %th.text-right= t(".total")
            %th{ colspan: include_form ? 3 : 2}= print_formatted_currency(registrant.expenses_total)

      %p.small.non_printable= t(".items_not_guaranteed")

Remove ' not guaranteed until your payment has been received' message when no online payment.

-# local variables: details, registrants
- include_form = details
.expenses
  .data_block
    %fieldset
      %legend= t(".registrants_expenses", :registrant => registrant.to_s)
      %table#expense_lines
        %thead
          %tr
            %th.text-right= RegistrantExpenseItem.model_name.human
            %th= t(".cost")
            %th
              = t(".paid")
              ?
            - if include_form
              %th
        %tbody
          = render partial: "/registrants/registrant_paid_expenses", locals: { registrant: registrant, details: details }
          = render partial: "/registrants/registrant_unpaid_expenses", locals: { registrant: registrant, include_form: include_form, details: details }
        %tfoot
          %tr
            %th
            %th{ colspan: include_form ? 3 : 2}
              = render partial: "/registrants/registrant_total_owing", locals: { registrant: registrant }
          %tr
            %th.text-right= t(".total")
            %th{ colspan: include_form ? 3 : 2}= print_formatted_currency(registrant.expenses_total)
      - if @config.online_payment? || @config.offline_payment?
        %p.small.non_printable= t(".items_not_guaranteed")


:markdown
  # Webhooks

  You can use webhooks to trigger actions in external services
  every time one of your scrapers finishes a run.
  You can trigger all kind of fun actions:
  send emails when a scraper is finished;
  immediately pull fresh data from a scraper’s API;
  or run realtime analysis—anything you like.

  Add *webhook URLs* under the **Webhooks heading
  on your scraper’s Settings page**.
  Every time your scraper finishes a run
  we’ll make an [HTTP POST request](https://en.wikipedia.org/wiki/POST_(HTTP))
  to each URL you’ve added.
  Use this request to trigger your custom code.

  ## Payloads

  Webhooks currently just make an empty HTTP POST request
  to the specified URL.
  If you'd like the webhooks to have some state
  you'll need to put that state in the webhook URL,
  either as the path or as GET parameters.
  If there's something specific you'd like included in the webhook payload
  then please [ask a question on our help forum](https://help.morph.io/).

Make sentence more active and refer to URL as 'webhook URL' as elsewhere

:markdown
  # Webhooks

  You can use webhooks to trigger actions in external services
  every time one of your scrapers finishes a run.
  You can trigger all kind of fun actions:
  send emails when a scraper is finished;
  immediately pull fresh data from a scraper’s API;
  or run realtime analysis—anything you like.

  Add *webhook URLs* under the **Webhooks heading
  on your scraper’s Settings page**.
  Every time your scraper finishes a run
  we’ll make an [HTTP POST request](https://en.wikipedia.org/wiki/POST_(HTTP))
  to each URL you’ve added.
  Use this request to trigger your custom code.

  ## Payloads

  We currently just make an empty HTTP POST request
  to the specified webhook URL.
  If you'd like the webhooks to have some state
  you'll need to put that state in the webhook URL,
  either as the path or as GET parameters.
  If there's something specific you'd like included in the webhook payload
  then please [ask a question on our help forum](https://help.morph.io/).


- url_params = {:controller => 'accounts', :action => 'show', :id => params[:account_id] || params[:id]}

%table.table.table-striped.bookings.collection
  %thead
    = render 'accounts/booking_list_header'
  %tbody
    = render 'accounts/carry_booking' unless @saldo == 0

    - for @booking in @bookings
      - amount = @booking.amount
      - amount = -(amount) if @account.liability_account?
      - @saldo += amount if @booking.debit_account == @account
      - @saldo -= amount if @booking.credit_account == @account
      = render 'accounts/booking_item'
  %tfoot
    = render 'accounts/booking_list_footer' unless @bookings.empty?

Add pagination to account booking view.

- url_params = {:controller => 'accounts', :action => 'show', :id => params[:account_id] || params[:id]}

= paginate @bookings

%table.table.table-striped.bookings.collection
  %thead
    = render 'accounts/booking_list_header'
  %tbody
    = render 'accounts/carry_booking' unless @saldo == 0

    - for @booking in @bookings
      - amount = @booking.amount
      - amount = -(amount) if @account.liability_account?
      - @saldo += amount if @booking.debit_account == @account
      - @saldo -= amount if @booking.credit_account == @account
      = render 'accounts/booking_item'
  %tfoot
    = render 'accounts/booking_list_footer' unless @bookings.empty?

= paginate @bookings


%div#event-list.grayscale-bg
  - upcoming_events.each do |prefecture, events|
    %h2.event-region{id: prefecture}
      %a{href: "##{prefecture}", style: "color: black;"}= prefecture
    %ul.event-ul
      - events.each do |event|
        %li.event
          %header
            - if event[:event_title].include? 'オンライン'
              %div.event-ribbon
                %span オンライン
            %p.event-date= l(event[:event_date])
            %p.event-at= "#{event[:event_at].strftime('%k:%M')}"
          %p
            %a.event-url{ href: "#{event[:event_url]}" }
              %span= event[:event_title]
            %span= "(#{event[:dojo_name]})"
            - if event[:event_title].include? 'ポケモン'
              %div.event-tag-pokemon-cover
                %span.event-tag-pokemon ポケモン

Add 'リモート' to keywords to decorate ribbon in Events page

%div#event-list.grayscale-bg
  - upcoming_events.each do |prefecture, events|
    %h2.event-region{id: prefecture}
      %a{href: "##{prefecture}", style: "color: black;"}= prefecture
    %ul.event-ul
      - events.each do |event|
        %li.event
          %header
            - if event[:event_title].include? 'オンライン' or event[:event_title].include? 'リモート'
              %div.event-ribbon
                %span オンライン
            %p.event-date= l(event[:event_date])
            %p.event-at= "#{event[:event_at].strftime('%k:%M')}"
          %p
            %a.event-url{ href: "#{event[:event_url]}" }
              %span= event[:event_title]
            %span= "(#{event[:dojo_name]})"
            - if event[:event_title].include? 'ポケモン'
              %div.event-tag-pokemon-cover
                %span.event-tag-pokemon ポケモン


.row
  .col-lg-12
    #secondary_navigation.navbar.navbar-default.navbar-static-top
      .container
        .collapse.navbar-collapse
          %ul#sub_nav.nav.navbar-nav
            - if can? :read, Salaries::Salary
              %li
                %a{:href => '#payroll'}
                  = I18n.t('common.salaries')

            - if can? :create, Salaries::Tax
              %li
                %a{:href => '#deductions'}
                  = I18n.t('salaries.views.taxes')

.container
  .row
    .col-lg-3
    .col-lg-6
      - if flash[:error] or flash[:alert] or flash[:notice]
        - flash_messages
    .col-lg-3

  .tab-content
    #payroll.tab-pane.fade
      .row
        .col-lg-12
          - if can? :read, Salaries::Salary
            #salaries_salaries.panel.panel-primary
              .panel-heading
                .panel-title
                  = I18n.t('common.salaries')

    #deductions.tab-pane.fade
      .row
        .col-lg-12
          - if can? :create, Salaries::Tax
            #salaries_taxes.panel.panel-default
              .panel-heading
                .panel-title
                  = I18n.t('salaries.views.taxes')

Fix issue with menu on salaries/salaries

#secondary_navbar.navbar.navbar-default.navbar-static-top

  .navbar-header
    .visible-xs
      .navbar-brand
        #tab_name

    // extra-small resolutions
    %button{:class => 'navbar-toggle', 'data-toggle' => 'collapse', 'data-target' => '#secondary_navigation'}
      .icon-bar
      .icon-bar
      .icon-bar

  .container
    #secondary_navigation.collapse.navbar-collapse
      %ul#sub_nav.nav.navbar-nav
        - if can? :read, Salaries::Salary
          %li
            %a{:href => '#payroll'}
              = I18n.t('common.salaries')

        - if can? :create, Salaries::Tax
          %li
            %a{:href => '#deductions'}
              = I18n.t('salaries.views.taxes')

.container
  .row
    .col-lg-3
    .col-lg-6
      - if flash[:error] or flash[:alert] or flash[:notice]
        - flash_messages
    .col-lg-3

  .tab-content
    #payroll.tab-pane.fade
      .row
        .col-lg-12
          - if can? :read, Salaries::Salary
            #salaries_salaries.panel.panel-primary
              .panel-heading
                .panel-title
                  = I18n.t('common.salaries')

    #deductions.tab-pane.fade
      .row
        .col-lg-12
          - if can? :create, Salaries::Tax
            #salaries_taxes.panel.panel-default
              .panel-heading
                .panel-title
                  = I18n.t('salaries.views.taxes')