- force_priority = local_assigns.fetch(:force_priority, false)
- subject_or_group_defined = defined?(@project) || defined?(@group)
- show_label_issues_link = subject_or_group_defined && show_label_issuables_link?(label, :issues, project: @project)
- show_label_merge_requests_link = subject_or_group_defined && show_label_issuables_link?(label, :merge_requests, project: @project)

.label-name
  = render_label(label, tooltip: false)
.label-description
  .append-right-default.prepend-left-default
    - if label.description.present?
      .description-text
        = markdown_field(label, :description)
    %ul.label-links
      - if show_label_issues_link
        %li.label-link-item.inline
          = link_to_label(label) { 'Issues' }
      - if show_label_merge_requests_link
        ·
        %li.label-link-item.inline
          = link_to_label(label, type: :merge_request) { _('Merge requests') }
      - if force_priority
        ·
        %li.label-link-item.priority-badge.js-priority-badge.inline.prepend-left-10
          .label-badge.label-badge-blue= _('Prioritized label')

Resolve CE/EE diffs in label row

- force_priority = local_assigns.fetch(:force_priority, false)
- subject_or_group_defined = defined?(@project) || defined?(@group)
- show_label_issues_link = subject_or_group_defined && show_label_issuables_link?(label, :issues, project: @project)
- show_label_merge_requests_link = subject_or_group_defined && show_label_issuables_link?(label, :merge_requests, project: @project)

.label-name
  = render_label(label, tooltip: false)
.label-description
  .append-right-default.prepend-left-default
    - if label.description.present?
      .description-text
        = markdown_field(label, :description)
    %ul.label-links
      - if show_label_issues_link
        %li.label-link-item.inline
          = link_to_label(label) { 'Issues' }
      - if show_label_merge_requests_link
        ·
        %li.label-link-item.inline
          = link_to_label(label, type: :merge_request) { _('Merge requests') }
      - if force_priority
        ·
        %li.label-link-item.priority-badge.js-priority-badge.inline.prepend-left-10
          .label-badge.label-badge-blue= _('Prioritized label')
      = render_if_exists 'shared/label_row_epics_link', label: label


%article
  .userMarkdown
    = comment.description
  .postHourUser
    %span
      Posté il y a #{distance_of_time_in_words_to_now(comment.created_at)}
      par
    = comment.user_username
    = image_tag comment.user_gravatar_url, :alt => comment.user_username, :title => comment.user_username, :class => "attendees"

Allow markdown syntax in event comments

%article
  .userMarkdown
    = markdown comment.description
  .postHourUser
    %span
      Posté il y a #{distance_of_time_in_words_to_now(comment.created_at)}
      par
    = comment.user_username
    = image_tag comment.user_gravatar_url, :alt => comment.user_username, :title => comment.user_username, :class => "attendees"


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

Fix flash message display issues

- flash.each do |name, msg|
  - if msg.is_a?(String) and msg.present?
    .alert.alert-dismissable{class: "alert-#{name == :notice ? "success" : "danger"}"}
      %button.close{'data-dismiss' => 'alert', 'aria-hidden' => true} ×
      = content_tag :div, msg, :id => "flash_#{name}"


- booking_template = charge_booking_template

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

%tr[charge_booking_template]
  %td
    = link_to "%s (%s)" % [charge_booking_template.title, charge_booking_template.code], item_action.call(booking_template)
    - if charge_booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= charge_booking_template.comments
  %td= link_to charge_booking_template.credit_account.code, account_path(charge_booking_template.credit_account), :title => charge_booking_template.credit_account.title unless charge_booking_template.credit_account.nil?
  %td= link_to charge_booking_template.debit_account.code, account_path(charge_booking_template.debit_account), :title => charge_booking_template.debit_account.title unless charge_booking_template.debit_account.nil?
  %td.currency= link_to amount_to_s(charge_booking_template), charge_booking_template.charge_rate
  %td= t(charge_booking_template.amount_relates_to, :scope => 'booking_template.relation') if charge_booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, booking_template)
    = list_link_for(:delete, booking_template)
    =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true

Drop booking template cast in view.

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

%tr[charge_booking_template]
  %td
    = link_to "%s (%s)" % [charge_booking_template.title, charge_booking_template.code], item_action.call(charge_booking_template)
    - if charge_booking_template.comments.present?
      %hr{:style => "height: 1px; margin: 0"}/
      %i= charge_booking_template.comments
  %td= link_to charge_booking_template.credit_account.code, account_path(charge_booking_template.credit_account), :title => charge_booking_template.credit_account.title unless charge_booking_template.credit_account.nil?
  %td= link_to charge_booking_template.debit_account.code, account_path(charge_booking_template.debit_account), :title => charge_booking_template.debit_account.title unless charge_booking_template.debit_account.nil?
  %td.currency= link_to amount_to_s(charge_booking_template), charge_booking_template.charge_rate
  %td= t(charge_booking_template.amount_relates_to, :scope => 'booking_template.relation') if charge_booking_template.amount_relates_to.present?
  %td.action-links
    = list_link_for(:edit, charge_booking_template)
    = list_link_for(:delete, charge_booking_template)


#publisher
  = owner_image_tag

  = form_for StatusMessage.new, :remote => true do |f|
    = f.error_messages
    %p
      %label{:for => "status_message_message"} Message
      = f.text_area :message, :rows => 2

    %ul.group_selector
      going to...
      - for group in @groups
        %li
          = check_box_tag("group_ids[]", group.id, current_group?(group) )
          = group.name
    = f.submit "Post"

Fix publisher checkboxes on index

#publisher
  = owner_image_tag

  = form_for StatusMessage.new, :remote => true do |f|
    = f.error_messages
    %p
      %label{:for => "status_message_message"} Message
      = f.text_area :message, :rows => 2

    %ul.group_selector
      going to...
      - for group in @groups
        %li
          = check_box_tag("group_ids[]", group.id, @group == :all || current_group?(group) )
          = group.name
    = f.submit "Post"


.container
  %h1
    %a{href: '/requested_accounts'}
      Requested Accounts:
      = RequestedAccount.count
.container
  %h1
    %a{href: '/tickets/dashboard'}
      Open Tickets:
      = TicketDispenser::Ticket.where(status: TicketDispenser::Ticket::Statuses::OPEN).count

.container
  %h2 Useful links
  %ul
    %li
      %a{href: '/article_finder'} Article Finder
    %li
      %a{href: '/usage'} Usage
    %li
      %a{href: '/sidekiq'} Job queue

Add more links to the Admin index view

.container
  %h1
    %a{href: '/requested_accounts'}
      Requested Accounts:
      = RequestedAccount.count
.container
  %h1
    %a{href: '/tickets/dashboard'}
      Open Tickets:
      = TicketDispenser::Ticket.where(status: TicketDispenser::Ticket::Statuses::OPEN).count

.container
  %h2 Useful links
  %ul
    %li
      %a{href: '/article_finder'} Article Finder
    %li
      %a{href: '/usage'} Usage
    %li
      %a{href: '/sidekiq'} Job queue
    %li
      %a{href: 'https://dashboard-testing.wikiedu.org/rails/mailers'} Email templates
    %li
      %a{href: '/faq/new'} Add new FAQ
    %li
      %a{href: '/faq_topics'} FAQ Topics
    %li
      %a{href: '/unsubmitted_courses'} Unsubmitted Courses
    %li
      %a{href: '/feedback_form_responses'} Feedback Form Responses


- form_for(@task, :url => (@task.new_record? ? story_tasks_path(:story_id => @story) : story_task_path(:story_id => @story, :id => @task.id))) do |f|
  - if @task.errors.any?
    %div#error_explanation
      %h2= "#{ pluralize(@task.errors.count, 'error') } prohibited this task from being saved:"
      %ul
        - @task.errors.full_messages.each do |msg|
          %li= msg

  %table
    %tr.field
      %td.labelCell= f.label :title
      %td= f.text_field :title
    %tr.field
      %td.labelCell= f.label :description
      %td= f.text_field :description
    %tr
      %td.labelCell= f.label :assignee
      %td= f.collection_select :assignee_id, User.all, :id, :name, { :include_blank => true }
    %tr
      %td.labelCell= f.label :status
      %td= select_tag :task_status, options_for_select(Task::STATUSES, :selected => @task.status), { :name => 'task[status]' }
    %tr.field
      %td.labelCell= f.label :estimate
      %td= f.text_field :estimate
    %tr.field
      %td.labelCell= f.label :remaining
      %td= f.text_field :remaining
    %tr.actions
      %td
      %td
        = f.submit
        = f.submit 'Cancel', :name => 'cancel'

Make the task description a text area

- form_for(@task, :url => (@task.new_record? ? story_tasks_path(:story_id => @story) : story_task_path(:story_id => @story, :id => @task.id))) do |f|
  - if @task.errors.any?
    %div#error_explanation
      %h2= "#{ pluralize(@task.errors.count, 'error') } prohibited this task from being saved:"
      %ul
        - @task.errors.full_messages.each do |msg|
          %li= msg

  %table
    %tr.field
      %td.labelCell= f.label :title
      %td= f.text_field :title
    %tr.field
      %td.labelCell= f.label :description
      %td= f.text_area :description
    %tr
      %td.labelCell= f.label :assignee
      %td= f.collection_select :assignee_id, User.all, :id, :name, { :include_blank => true }
    %tr
      %td.labelCell= f.label :status
      %td= select_tag :task_status, options_for_select(Task::STATUSES, :selected => @task.status), { :name => 'task[status]' }
    %tr.field
      %td.labelCell= f.label :estimate
      %td= f.text_field :estimate
    %tr.field
      %td.labelCell= f.label :remaining
      %td= f.text_field :remaining
    %tr.actions
      %td
      %td
        = f.submit
        = f.submit 'Cancel', :name => 'cancel'


- categories1, categories2 = categories[0...7], categories[7..-1]
%ul.menu__items.menu__items--first
  - categories1.each do |category|
    %li.menu__item{class: "menu__item--#{category.slug}", data: {menu_item_state: category == current_category ? 'current' : nil}}
      = link_to category.name, category_url(category.slug), class: 'menu__label'
  - if categories2.present?
    %li.menu__item
      = link_to '#', class: 'menu__more' do
        More
        %span.arrow.down
- if categories2.present?
  %ul.menu__items.menu__items.menu__items--second
    - categories2.each do |category|
      %li.menu__item{class: "menu__item--#{category.slug}", data: {menu_item_state: category == current_category ? 'current' : nil}}
        = link_to category.name, category_url(category.slug), class: 'menu__label'

Fix incorrect markup for "more" button

- categories1, categories2 = categories[0...7], categories[7..-1]
%ul.menu__items.menu__items--first
  - categories1.each do |category|
    %li.menu__item{class: "menu__item--#{category.slug}", data: {menu_item_state: category == current_category ? 'current' : nil}}
      = link_to category.name, category_url(category.slug), class: 'menu__label'
- if categories2.present?
  %p.menu__item
    = link_to '#', class: 'menu__more' do
      More
      %span.arrow.down
- if categories2.present?
  %ul.menu__items.menu__items.menu__items--second
    - categories2.each do |category|
      %li.menu__item{class: "menu__item--#{category.slug}", data: {menu_item_state: category == current_category ? 'current' : nil}}
        = link_to category.name, category_url(category.slug), class: 'menu__label'


- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render(:partial  => "layouts/quadicon",
               :locals   => {:mode => :icon,
               :item     => @record,
               :size     => 72,
               :typ      => :listnav})

    = miq_accordion_panel(_("Properties"), false, "cloud_volume_prop") do
      %ul.nav.nav-pills.nav-stacked
        %li
          = link_to(_('Summary'), {:action => 'show', :id => @record, :display => 'main'}, :title => _("Show Summary"))

    = miq_accordion_panel(_("Relationships"), false, "cloud_volume_rel") do
      %ul.nav.nav-pills.nav-stacked

Add relationships to cloud volume listnav

- if @record.try(:name)
  #accordion.panel-group
    = miq_accordion_panel(truncate(@record.name, :length => truncate_length), true, "icon") do
      = render(:partial  => "layouts/quadicon",
               :locals   => {:mode => :icon,
               :item     => @record,
               :size     => 72,
               :typ      => :listnav})

    = miq_accordion_panel(_("Properties"), false, "cloud_volume_prop") do
      %ul.nav.nav-pills.nav-stacked
        %li
          = link_to(_('Summary'), {:action => 'show', :id => @record, :display => 'main'}, :title => _("Show Summary"))

    = miq_accordion_panel(_("Relationships"), false, "cloud_volume_rel") do
      %ul.nav.nav-pills.nav-stacked
        - if role_allows(:feature => "ems_cloud_show") && @record.ext_management_system
          %li
            = link_to("#{ui_lookup(:table => "ext_management_system")}: #{@record.ext_management_system.name}",
              ems_cloud_path(@record.ext_management_system.id),
              :title => _("Show this Cloud Volumes's parent %s") % ui_lookup(:table => "ems_cloud"))
        - if role_allows(:feature => "availability_zone_show") && @record.availability_zone
          %li
            = link_to("#{ui_lookup(:table => "availability_zone")}: #{@record.availability_zone.name}",
              availability_zone_path(@record.availability_zone.id),
              :title => _("Show this Cloud Volumes's parent %s") % ui_lookup(:table => "availability_zone"))
        - if role_allows(:feature => "cloud_tenant_show") && @record.cloud_tenant
          %li
            = link_to("#{ui_lookup(:table => "cloud_tenant")}: #{@record.cloud_tenant.name}",
              cloud_tenant_path(@record.cloud_tenant.id),
              :title => _("Show this Cloud Volumes's parent %s") % ui_lookup(:table => "cloud_tenant"))


-# Include this partial if you require a tinymce editor on your page
- content_for(:wysiwyg) do
  = javascript_include_tag "wysiwyg", async: !Rails.env.development?

Load wysiwyg editor inline, so that we can call on it immediately


- if card[:image_license] && card[:image_license] != 'expedia'
  .card__attribution.icon--image--before.icon--white--before
    %span.card__attribution-link.js-card-attribution{ data: { link: card[:image_attribution_link] }}<
      = card[:image_attribution]
    %span.card__licenses
      - unless card[:image_license] == 'permission'
        %span.license.license--cc<
          Creative Commons
      %span.license.license--attribution<
        Attribution
      - if card[:image_license] == 'by-nd'
        %span.license.license--non-deriv<
          Non-Derivation
      - if card[:image_license] == 'by-sa'
        %span.license.license--share-alike<
          Share Alike

Fix camera colour on single card attribution

- if card[:image_license] && card[:image_license] != 'expedia'
  .card__attribution.icon--image--before{class: card[:double?] ? "icon--white--before" : ""}
    %span.card__attribution-link.js-card-attribution{ data: { link: card[:image_attribution_link] }}<
      = card[:image_attribution]
    %span.card__licenses
      - unless card[:image_license] == 'permission'
        %span.license.license--cc<
          Creative Commons
      %span.license.license--attribution<
        Attribution
      - if card[:image_license] == 'by-nd'
        %span.license.license--non-deriv<
          Non-Derivation
      - if card[:image_license] == 'by-sa'
        %span.license.license--share-alike<
          Share Alike


#offCanvasLeft.off-canvas.position-left{'data-off-canvas': '', 'data-transition': 'overlap'}
  %ul.menu.vertical
    - (ActiveRecord::Base.connection.tables - ['schema_migrations', 'ar_internal_metadata']).each do |model|
      %li
        = link_to model.titleize, send("#{model}_path")

Comment links in left sidebar

#offCanvasLeft.off-canvas.position-left{'data-off-canvas': '', 'data-transition': 'overlap'}
  %ul.menu.vertical
    - (ActiveRecord::Base.connection.tables - ['schema_migrations', 'ar_internal_metadata']).each do |model|
      %li
        = #link_to model.titleize, send("#{model}_path")


%hr
%ul
  %li
    %a{ href: "/cookies" } Om cookies
  %li
    = AppMetadata.release_version
    != surround "(", ")" do
      %a{ href: "https://github.com/Starkast/wikimum/commit/#{AppMetadata.commit}" }= AppMetadata.short_commit
  %li
    %img{ src: "/favicon.ico", alt: "Starkast" }

Remove use of Haml helper `surround`

%hr
%ul
  %li
    %a{ href: "/cookies" } Om cookies
  %li
    = AppMetadata.release_version
    (
    %a{ href: "https://github.com/Starkast/wikimum/commit/#{AppMetadata.commit}" }>= AppMetadata.short_commit
    )
  %li
    %img{ src: "/favicon.ico", alt: "Starkast" }


%ul.list-group
  - if record.rep.answers.count > 0
    - record.rep.answers.reorder('created_at DESC').each do |answer|
      %li.list-group-item
        %p.profile-answers-question= link_to answer.question.body, answer.question
        %p.profile-answers-answer.comment-body= answer.body
        .text-detail= time_ago_in_words(answer.created_at) + ' ago'
  - else
    %li.list-group-item
      #{record.first_name} has not answered any questions yet.

Use full name for answers section.

%ul.list-group
  - if record.rep.answers.count > 0
    - record.rep.answers.reorder('created_at DESC').each do |answer|
      %li.list-group-item
        %p.profile-answers-question= link_to answer.question.body, answer.question
        %p.profile-answers-answer.comment-body= answer.body
        .text-detail= time_ago_in_words(answer.created_at) + ' ago'
  - else
    %li.list-group-item
      #{record.name} has not answered any questions yet.


-#   Copyright (c) 2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

%ul.left_nav
  %li
    %div.root_element
      = t('aspects.index.tags_following')

    %ul.sub_nav
      - if current_user.followed_tags.size > 0
        - for tg in current_user.followed_tags
          %li.unfollow{:id => tg.name}
            .unfollow_icon.hidden
              = link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :id => "unfollow_" + tg.name
            =link_to "##{tg.name}", tag_path(:name => tg.name), :class => "tag_selector"
      - else
        %li
          = link_to t('aspects.index.no_tags'), tags_path, :class => "new_aspect"

Fix error when accessing a tag page without being signed in.

-#   Copyright (c) 2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

- if user_signed_in?
  %ul.left_nav
    %li
      %div.root_element
        = t('aspects.index.tags_following')

      %ul.sub_nav
        - if current_user.followed_tags.size > 0
          - for tg in current_user.followed_tags
            %li.unfollow{:id => tg.name}
              .unfollow_icon.hidden
                = link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :id => "unfollow_" + tg.name
              =link_to "##{tg.name}", tag_path(:name => tg.name), :class => "tag_selector"
        - else
          %li
            = link_to t('aspects.index.no_tags'), tags_path, :class => "new_aspect"


.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' } }
  %stripe-elements

  .row
    .small-12.columns.text-right
      = check_box_tag 'secrets.save_requested_by_customer', '1', false, 'ng-model' => 'secrets.save_requested_by_customer'
      = label_tag 'secrets.save_requested_by_customer', t('.remember_this_card')

Hide 'save credit card' checkbox for guests

.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' } }
  %stripe-elements

  - if spree_current_user
    .row
      .small-12.columns.text-right
        = check_box_tag 'secrets.save_requested_by_customer', '1', false, 'ng-model' => 'secrets.save_requested_by_customer'
        = label_tag 'secrets.save_requested_by_customer', t('.remember_this_card')


.nav-block
  .controls
    = link_to group_path(@group, rss_url_options), class: 'btn rss-btn has-tooltip' , title: 'Subscribe' do
      %i.fa.fa-rss
  = render 'shared/event_filter'

.content_list
= spinner

Add .activities class to group activity .nav-block

.nav-block.activities
  .controls
    = link_to group_path(@group, rss_url_options), class: 'btn rss-btn has-tooltip' , title: 'Subscribe' do
      %i.fa.fa-rss
  = render 'shared/event_filter'

.content_list
= spinner


.blank
  %a.attachment-preview__link{lmo-href: "{{attachment.original}}", target: "_blank"}>

    .attachment-preview.attachment-preview--thread{ng-if: "mode == 'thread'"}
      .attachment-preview__image{ng-if: "attachment.isAnImage"}
        %img{ng-src: "{{location()}}", alt: "{{ 'activity_card.attachment_display.image_alt' | translate }}"}
      .attachment-preview__file.attachment-preview__file--thread{ng-class: "{'attachment-preview__file--image': attachment.isAnImage}"}
        %i.fa.fa-lg.fa-paperclip>
        %span> {{attachment.filename}}
        %span {{attachment.formattedFilesize()}}

    .attachment-preview.attachment-preview--thumb{ng-if: "mode == 'thumb'"}
      %img.attachment-preview__image{ng-if: "attachment.isAnImage", ng-src: "{{location()}}", alt: "{{ 'activity_card.attachment_display.image_alt' | translate }}"}
      .attachment-preview__file.attachment-preview__file--thumb{ng-if: "!attachment.isAnImage"}
        %i.fa.fa-lg.fa-paperclip
      %button.close.attachment-preview__destroy{ng-if: "!attachment.commentId", ng-click: "destroy($event)", title: "{{ 'comment_form.attachments.remove_attachment' | translate }}"}
        %span{aria-hidden: "true"}×

Add filename as title to attachment preview

.blank
  %a.attachment-preview__link{lmo-href: "{{attachment.original}}", target: "_blank"}>

    .attachment-preview.attachment-preview--thread{ng-if: "mode == 'thread'"}
      .attachment-preview__image{ng-if: "attachment.isAnImage"}
        %img{ng-src: "{{location()}}", alt: "{{ 'activity_card.attachment_display.image_alt' | translate }}"}
      .attachment-preview__file.attachment-preview__file--thread{ng-class: "{'attachment-preview__file--image': attachment.isAnImage}"}
        %i.fa.fa-lg.fa-paperclip>
        %span> {{attachment.filename}}
        %span {{attachment.formattedFilesize()}}

    .attachment-preview.attachment-preview--thumb{ng-if: "mode == 'thumb'", title: "{{attachment.filename}}"}
      %img.attachment-preview__image{ng-if: "attachment.isAnImage", ng-src: "{{location()}}", alt: "{{ 'activity_card.attachment_display.image_alt' | translate }}"}
      .attachment-preview__file.attachment-preview__file--thumb{ng-if: "!attachment.isAnImage"}
        %i.fa.fa-lg.fa-paperclip
      %button.close.attachment-preview__destroy{ng-if: "!attachment.commentId", ng-click: "destroy($event)", title: "{{ 'comment_form.attachments.remove_attachment' | translate }}"}
        %span{aria-hidden: "true"}×


.block#block-tables
  .content
    %h2.title= "Environment #{h @environment.name}"
    .inner
      = partial("navigation", :active => "show")
      .content
        .inner
          .left
            %h3 Name
            = @environment.name
          .left
            %h3 Description
            = @environment.description
          .left
            %h3 Cookbook Version Constraints
            %table.table
              %tr
                %th.first Name
                %th.last Version Constraints
              - if @environment.cookbook_versions.empty?
                %tr
                  %td{:colspan => 2} This environment does not include any cookbook version constraints.
              - else
                - @environment.cookbook_versions.each do |name, versions|
                  %tr
                    %td= name
                    %td= versions
          .left
            %h3 Attributes
            = build_tree('attrs', @environment.attributes)

Sort cookbooks by name in environment show

.block#block-tables
  .content
    %h2.title= "Environment #{h @environment.name}"
    .inner
      = partial("navigation", :active => "show")
      .content
        .inner
          .left
            %h3 Name
            = @environment.name
          .left
            %h3 Description
            = @environment.description
          .left
            %h3 Cookbook Version Constraints
            %table.table
              %tr
                %th.first Name
                %th.last Version Constraints
              - if @environment.cookbook_versions.empty?
                %tr
                  %td{:colspan => 2} This environment does not include any cookbook version constraints.
              - else
                - @environment.cookbook_versions.keys.sort.each do |name|
                  - versions = @environment.cookbook_versions[name]
                  %tr
                    %td= name
                    %td= versions
          .left
            %h3 Attributes
            = build_tree('attrs', @environment.attributes)


- cache performance do
  .images.row
    .large-12.columns
      = image_tag performance.cover_image, alt: performance.title
  .title.row
    .large-12.columns
      %h1
        = link_to performance.artist.name, performance.artist
        at
        = link_to performance.episode.name, performance.episode
  .description.row
    .large-8.columns
      = simple_format performance.artist.description
    .links.large-4.columns
      %nav
        %section
          - if performance.youtube_url.present?
            = link_to performance.youtube_url, class: 'alert button' do
              = icon :youtube
              = t '.youtube'
          - if performance.mixcloud_url.present?
            = link_to performance.mixcloud_url, class: 'button' do
              = icon :headphones
              = t '.mixcloud'
          - if performance.downloadable?
            = link_to performance.audio, class: 'secondary button' do
              = icon :speaker
              = t '.audio'

Remove ugly image row until we get proper performance cover images

- cache performance do
  -# .images.row
  -#   .large-12.columns
  -#     = image_tag performance.cover_image, alt: performance.title
  .title.row
    .large-12.columns
      %h1
        = link_to performance.artist.name, performance.artist
        at
        = link_to performance.episode.name, performance.episode
  .description.row
    .large-8.columns
      = simple_format performance.artist.description
    .links.large-4.columns
      %nav
        %section
          - if performance.youtube_url.present?
            = link_to performance.youtube_url, class: 'alert button' do
              = icon :youtube
              = t '.youtube'
          - if performance.mixcloud_url.present?
            = link_to performance.mixcloud_url, class: 'button' do
              = icon :headphones
              = t '.mixcloud'
          - if performance.downloadable?
            = link_to performance.audio, class: 'secondary button' do
              = icon :speaker
              = t '.audio'


= render partial: "header", locals: { dossier: @dossier }

.messagerie.container
  %ul
    - @dossier.commentaires.ordered.each do |commentaire|
      %li
        = render partial: 'commentaire_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }

        .width-100
          %h2
            %span.mail
              = render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
            - if ![current_gestionnaire.email, @dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
              %span.guest Invité
            %span.date= I18n.l(commentaire.created_at.localtime, format: '%H:%M le %d/%m/%Y')
          %p= sanitize(commentaire.body)

  = form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f|
    = f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true
    .send-wrapper
      = f.submit 'Envoyer', class: 'button send'

Add disable_with on comment creation

= render partial: "header", locals: { dossier: @dossier }

.messagerie.container
  %ul
    - @dossier.commentaires.ordered.each do |commentaire|
      %li
        = render partial: 'commentaire_icon', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }

        .width-100
          %h2
            %span.mail
              = render partial: 'commentaire_issuer', locals: { commentaire: commentaire, current_gestionnaire: current_gestionnaire }
            - if ![current_gestionnaire.email, @dossier.user.email, 'contact@tps.apientreprise.fr'].include?(commentaire.email)
              %span.guest Invité
            %span.date= I18n.l(commentaire.created_at.localtime, format: '%H:%M le %d/%m/%Y')
          %p= sanitize(commentaire.body)

  = form_for(Commentaire.new, url: commentaire_dossier_path(@dossier.procedure, @dossier), html: { class: 'form' }) do |f|
    = f.text_area :body, rows: 5, placeholder: 'Répondre ici', required: true
    .send-wrapper
      = f.submit 'Envoyer', class: 'button send', data: { disable_with: "Envoi..." }


= f.input :name, required: true, :as => :string
= f.input :street_number, required: true, :as => :string
= f.input :route, required: true, :as => :string
= f.input :city, required: true, :as => :string
= f.input :state, required: true, :as => :string
= f.input :zip, required: true, :as => :string
= f.input :lat, required: true, :as => :string
= f.input :lng, required: true, :as => :string

Change landmarks form to only require name, lat and lng

= f.input :name, required: true, :as => :string
= f.input :street_number, required: false, :as => :string
= f.input :route, required: false, :as => :string
= f.input :city, required: false, :as => :string
= f.input :state, required: false, :as => :string
= f.input :zip, required: false, :as => :string
= f.input :lat, required: true, :as => :string
= f.input :lng, required: true, :as => :string


- m = tiny_display_map(planning_application, geometry_planning_application_path(planning_application, :json), "tinymap") do |map, page, dom_id|
  %div{id: dom_id, class: "tinymap", style: "#{planning_application.part_hidden? ? 'height: 100px' : ''}"}
!= m.to_html

Migrate planning application to leaflet

- map_id = "leaflet-#{dom_id(planning_application)}"
.tinymap{id: map_id, style: "#{planning_application.part_hidden? ? 'height: 100px' : ''}"}}
.hidden
  .map-data{"data-center" => location_to_geojson(planning_application.location),
    "data-opts" => { domid: map_id, hidelayers: true, feature: issue_geojson(planning_application) }.to_json}


%nav.navbar.navbar-default.navbar-fixed-top{role: 'navigation'}
  .navbar-header
    %button.navbar-toggle{type: 'button', data: {toggle: 'collapse', target: '.navbar-collapse'}}
      %span.sr-only Toggle Nav
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
    = link_to "ExampleApp", root_path, :class => 'navbar-brand'

  .collapse.navbar-collapse
    %ul.nav.navbar-nav
      - if user_signed_in?
        %li= link_to 'Logout', destroy_user_session_path, :method=>'delete'
      - else
        %li= link_to 'Login', new_user_session_path
      - if user_signed_in?
        %li= link_to 'Edit account', edit_user_registration_path
      - else
        %li= link_to 'Sign up', new_user_registration_path
      %li= link_to "Sign in with Twitter", provider_auth_path(:twitter)
      %li= link_to "Sign in with Facebook", provider_auth_path(:facebook)

Remove social links from navigation


!!! 5
%html{:lang => "en"}

  %head
    %meta{:charset => "utf-8"}
    %title MY Top Ten
    = stylesheet_link_tag  "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    %meta{:name => "description", :content => ""}
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
    %link{:href => "/favicon.ico", :rel => "shortcut icon"}

  %body
    .SiteWrapper
      = yield

Update layout with authentication links.

!!! 5
%html{:lang => "en"}

  %head
    %meta{:charset => "utf-8"}
    %title MY Top Ten
    = stylesheet_link_tag  "application", media: "all", "data-turbolinks-track" => true
    = javascript_include_tag "application", "data-turbolinks-track" => true
    = csrf_meta_tags
    %meta{:name => "description", :content => ""}
    %meta{:name => "viewport", :content => "width=device-width, initial-scale=1"}
    %link{:href => "/favicon.ico", :rel => "shortcut icon"}

  %body
    - flash.each do |name, msg|
      = content_tag :div, msg, class: name
    .SiteWrapper
      .Navbar
        -if current_user
          %p
            Signed in as
            = current_user.name

          = link_to 'Log Out', user_log_out_path, method: :delete

        -else
          = link_to 'Sign Up', user_register_path
          = link_to 'Log In', user_log_in_path

        </div>
      = yield


%head
  %meta(charset="utf-8")
  %title= @title.join(' - ').html_safe
  - if current_stylesheet
    = stylesheet_link_tag current_stylesheet, media: nil
  - elsif current_account
    = stylesheet_link_tag current_account.stylesheet_url, media: nil
  - else
    = stylesheet_link_tag 'application', media: nil
  <link rel="shortcut icon" type="image/x-icon" href="/favicon.png" />
  - if @google_plus
    <link rel="publisher" href="https://plus.google.com/116704247328760228227" />
  %meta(name="viewport" content="width=device-width")
  - if @author
    %meta(name="author" content=@author)
  %meta(name="description" content=@description)
  %meta(name="keywords" content="#{@keywords.join ', '}")
  - if @dont_index
    %meta(name="robots" content="noindex, nofollow")
  <!--[if IE]>#{javascript_include_tag "html5"}<![endif]-->
  <!--[if lt IE 9]>#{javascript_include_tag "IE9"}<![endif]-->
  - @feeds.each do |link,title|
    = auto_discovery_link_tag :atom, link, { title: title }

Add a rel to opensearch.xml

%head
  %meta(charset="utf-8")
  %title= @title.join(' - ').html_safe
  - if current_stylesheet
    = stylesheet_link_tag current_stylesheet, media: nil
  - elsif current_account
    = stylesheet_link_tag current_account.stylesheet_url, media: nil
  - else
    = stylesheet_link_tag 'application', media: nil
  <link rel="shortcut icon" type="image/x-icon" href="/favicon.png" />
  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Recherche de contenus sur LinuxFr.org" />
  - if @google_plus
    <link rel="publisher" href="https://plus.google.com/116704247328760228227" />
  %meta(name="viewport" content="width=device-width")
  - if @author
    %meta(name="author" content=@author)
  %meta(name="description" content=@description)
  %meta(name="keywords" content="#{@keywords.join ', '}")
  - if @dont_index
    %meta(name="robots" content="noindex, nofollow")
  <!--[if IE]>#{javascript_include_tag "html5"}<![endif]-->
  <!--[if lt IE 9]>#{javascript_include_tag "IE9"}<![endif]-->
  - @feeds.each do |link,title|
    = auto_discovery_link_tag :atom, link, { title: title }


/ add picture at some point
/ edit info
/ delete self

= image_tag(@teacher.avatar.url, size: "300x250")
%h2= @teacher.full_name
%p= @teacher.email
= render partial: '/students/table', locals: { students: @students }
= button_to "Remove #{@teacher.full_name}", teacher_path, method: :delete, class: "btn btn-danger"

Stop teachers from deleting each other unless admin

= image_tag(@teacher.avatar.url, size: "300x250")
%h2= @teacher.full_name
%p= @teacher.email
= render partial: '/students/table', locals: { students: @students }
- if is_admin? || @teacher.id == current_teacher.id
  = button_to "Remove #{@teacher.full_name}", teacher_path, method: :delete, class: "btn btn-danger"


:ruby
  canonical_url = @serial.canonical_url(@posts)
  page_title = @serial.page_title(@posts)

- @class_page_name = "serial-index"

- content_for(:rel_next_prev_link_tags) { rel_next_prev_link_tags(@posts) }
- content_for(:canonical_tag) do
  %link{rel: :canonical, href: canonical_url}
- if @posts.current_page > 1
  - breadcrumb :page_num, @posts.current_page, serial: @serial
- else
  - breadcrumb :serial, @serial
- set_meta_tags title: page_title, og: @serial.to_og_params
- set_meta_tags og: {url: canonical_url, title: "#{page_title} | #{current_site.name}"}

%section
  %div.serial-content
    = image_tag @serial.thumbnail_url, class: 'serial-content__thumbnail'
    %h1.serial-content__title= @serial.title
    %div.serial-content__description= raw render_markdown(@serial.description)

    = render 'banner', position: :press_articles_top
    %ul.serial-titles
      - @posts.each do |post|
        %li
          = link_to post.title, post_url(post), class: 'post-summary__url'

    - if @posts.total_pages > 1
      %nav.pagination
        = paginate @posts
        %p.pagination__entries= page_entries_info @posts

Fix the position of pagination


!!!
%html
  %head
    %title
      = @current_organisation ? @current_organisation.organisation_name : "One Click Orgs"

    %link{:href=>"/favicon.ico", :rel=>"shortcut icon"}
    = stylesheet_link_tag 'one_click'
    = javascript_include_tag 'jquery', 'rails', 'application'
    = csrf_meta_tag
  %body
    %div#container
      %div.control_bar
        - if current_user
          %p
            %strong
              = h current_user.name
          %p
            = link_to 'My account', edit_member_path(current_user)
          %p
            = link_to 'Logout', member_session_path, :method => :delete
      %div#doc
        %div#hd
          %h1.header
            = @current_organisation.organisation_name
          %p
            powered by
            = link_to 'One Click Orgs', 'http://www.oneclickor.gs/'

        - if current_user
          %ul#nav
            %li#navitem= link_to 'Dashboard', root_path
            %li#navitem= link_to 'Settings', settings_path
            %li#navitem= link_to 'Constitution', constitution_path
            %li#navitem= link_to 'Members', members_path

        - if flash[:notice]
          %div#notice
            = flash[:notice]
        - if flash[:error]
          %div#error
            = flash[:error]

        %div#bd

          = yield
        %div.footer
          = "One Click Orgs #{OneClickOrgs.version} - Running on Rails #{Rails.version}"
      = get_satisfaction_widget

Add link to your profile in control_bar.

!!!
%html
  %head
    %title
      = @current_organisation ? @current_organisation.organisation_name : "One Click Orgs"

    %link{:href=>"/favicon.ico", :rel=>"shortcut icon"}
    = stylesheet_link_tag 'one_click'
    = javascript_include_tag 'jquery', 'rails', 'application'
    = csrf_meta_tag
  %body
    %div#container
      %div.control_bar
        - if current_user
          %p
            %strong
              = link_to current_user.name, member_path(current_user)
          %p
            = link_to 'Edit your account', edit_member_path(current_user)
          %p
            = link_to 'Logout', member_session_path, :method => :delete
      %div#doc
        %div#hd
          %h1.header
            = @current_organisation.organisation_name
          %p
            powered by
            = link_to 'One Click Orgs', 'http://www.oneclickor.gs/'

        - if current_user
          %ul#nav
            %li#navitem= link_to 'Dashboard', root_path
            %li#navitem= link_to 'Settings', settings_path
            %li#navitem= link_to 'Constitution', constitution_path
            %li#navitem= link_to 'Members', members_path

        - if flash[:notice]
          %div#notice
            = flash[:notice]
        - if flash[:error]
          %div#error
            = flash[:error]

        %div#bd

          = yield
        %div.footer
          = "One Click Orgs #{OneClickOrgs.version} - Running on Rails #{Rails.version}"
      = get_satisfaction_widget


%section.show.events
  %h2= t('views.relics.show.events.header')
  - if relic.all_events.count > 0
    = link_to t('views.relics.show.general.fill_in'), edit_section_relic_path(relic.to_param, :events), :remote => true, :class => "edit-relic-link"
    .content
      .viewport
        %ul
          - relic.all_events.includes(:relic, :photo).each do |event|
            %li
              - if event.photo.present?
                = link_to image_tag(event.photo.file.url(:icon)), relic_photo_path(relic.to_param, relic.all_photos.first.id), :remote => true
              - if event.relic_id == relic
                %strong= event.date
                \-
                = event.name
              - else
                %strong
                  %span<>= link_to event.relic.identification, relic_path(event.relic)
                  %span<>= ", #{event.date}"
                \-
                = event.name
  - else
    .placeholder
      = t('views.relics.show.events.placeholder')
      = link_to t('views.relics.show.events.add'), edit_section_relic_path(relic.to_param, :events), :remote => true
      .example
        %a.show-example{:href => image_path('screenshot-dates.jpg'), :class => "fancybox"}
          = t('views.relics.show.general.show_example')

Use correct comparison for showing events in relics profile

%section.show.events
  %h2= t('views.relics.show.events.header')
  - if relic.all_events.count > 0
    = link_to t('views.relics.show.general.fill_in'), edit_section_relic_path(relic.to_param, :events), :remote => true, :class => "edit-relic-link"
    .content
      .viewport
        %ul
          - relic.all_events.includes(:relic, :photo).each do |event|
            %li
              - if event.photo.present?
                = link_to image_tag(event.photo.file.url(:icon)), relic_photo_path(relic.to_param, relic.all_photos.first.id), :remote => true
              - if event.relic_id == relic.id
                %strong= event.date
                \-
                = event.name
              - else
                %strong
                  %span<>= link_to event.relic.identification, relic_path(event.relic)
                  %span<>= ", #{event.date}"
                \-
                = event.name
  - else
    .placeholder
      = t('views.relics.show.events.placeholder')
      = link_to t('views.relics.show.events.add'), edit_section_relic_path(relic.to_param, :events), :remote => true
      .example
        %a.show-example{:href => image_path('screenshot-dates.jpg'), :class => "fancybox"}
          = t('views.relics.show.general.show_example')


%section.press
	%article.news-articles
		%h1 Press
		%ul
			= render 'articles'

	%article.pedagogy
		%h1 Gameful Pedagogy
		%p We're putting together a site that documents what we've found to be the best practices for gameful classrooms. Explore pedagogy.gradecraft.com for more!

	%article.twitter
		Tweets by @gradecraft

Make pedagogy page open in a new tab


-# The inline navigation for wide screens
.wv--split--right.nav--inline.nav--secondary.wv--block
  - properties[:items].each do |n|
    - active = n[:title] == properties[:section_name] || (n[:slug].include? properties[:section_name].downcase.strip.gsub(' ', '-'))
    %a.nav__item.nav__item--secondary.js-nav-item{:class=>(active ? 'current' : ''), :href=> n[:slug]}<
      = n[:title]

-# The select navigation for small screens
.wv--split--right.nav--inline.nav--secondary.wv--hidden.nav--secondary__dropdown
  = ui_component('navigation/dropdown', properties: { action: "/redirector", dropdown: {name: 'url', options: subnav_options(properties[:items]), selected: properties[:section_name], class: 'js-responsive-nav', data: { form_submit: "true" }} })

Use `ends_with` rather than `include` to determine active secondary nav item.

-# The inline navigation for wide screens
.wv--split--right.nav--inline.nav--secondary.wv--block
  - properties[:items].each do |n|
    - active = n[:title] == properties[:section_name] || (n[:slug].end_with? properties[:section_name].downcase.strip.gsub(' ', '-'))
    %a.nav__item.nav__item--secondary.js-nav-item{:class=>(active ? 'current' : ''), :href=> n[:slug]}<
      = n[:title]

-# The select navigation for small screens
.wv--split--right.nav--inline.nav--secondary.wv--hidden.nav--secondary__dropdown
  = ui_component('navigation/dropdown', properties: { action: "/redirector", dropdown: {name: 'url', options: subnav_options(properties[:items]), selected: properties[:section_name], class: 'js-responsive-nav', data: { form_submit: "true" }} })


%h4.center Et voilà!
.row
  .col.s12.l6.offset-l3.m8.offset-m2
    .card
      .card-content
        %p
          Ton mot de passe Arts et Métiers Alumni a été changé ainsi que pour ton
          %b compte mail Google Gadz.org
          si tu en as un.
        %br

        %p La synchronisation des mots de passe peu mettre quelques minutes, patience !
        %br
        %p En cas de doutes sur le bon fonctionnement des services, tu peux visiter la page de status :
          = link_to "status.gadz.org", "https://status.gadz.org/", target: "_blank", rel: "nofollow"

        /%p À partir de maintenant, pour te connecter sur #{ link_to "le site de la SOCE", 'http://www.arts-et-metiers.asso.fr/index.php/user/login'}, pense à utiliser l'"Authentification universelle".

        / %h3 Ton avis nous intéresse
        / %p Qu'as-tu pensé du nouveau système de récupération de mot de passe?
        / %p => sondage here!

Add link to status page

%h4.center Et voilà!
.row
  .col.s12.l6.offset-l3.m8.offset-m2
    .card
      .card-content
        %p
          Ton mot de passe Arts et Métiers Alumni a été changé ainsi que celui de ton
          %b compte Google Gadz.org
          si tu en as un.
        %br

        %p La synchronisation des mots de passe peu mettre quelques minutes, patience !
        %br
        %p En cas de doutes sur le bon fonctionnement des services, tu peux visiter la page de status :
          = link_to "status.gadz.org", "https://status.gadz.org/", target: "_blank", rel: "nofollow"

        /%p À partir de maintenant, pour te connecter sur #{ link_to "le site de la SOCE", 'http://www.arts-et-metiers.asso.fr/index.php/user/login'}, pense à utiliser l'"Authentification universelle".

        / %h3 Ton avis nous intéresse
        / %p Qu'as-tu pensé du nouveau système de récupération de mot de passe?
        / %p => sondage here!


.top_box
  .form_box
    %p.guide
      %span 受け皿設定を行うと、取引連携で自動的に記入される場合の受け皿口座とすることができます。
      %br
      %br
      %span
        フレンドと取引連動については、
        = link_to("ヘルプの「フレンドの項」", :controller => '/help', :action => 'functions', :anchor => "friend")
        に詳しいのでご参照ください。
.bottom_box
  %table.masters
    %tr
      %th 対象
      %th 受け皿口座
    - for account in @accounts
      %tr
        %td= account.name_with_asset_type
        %td
          = form_for account, :as => :account, :url => settings_partner_account_path(:account_id => account.id), :html => {:method => :put} do |f|

            = f.select :partner_account_id, "<option value=''>-- 設定なし --</option>".html_safe + options_from_collection_for_select( |
                @partner_account_candidates[account], "id", "name_with_asset_type", account.partner_account_id), {}, :style => "width:16em;" |
            = f.submit '更新', :class => 'button'

Apply new design to settings/partner_accounts

%p 受け皿設定を行うと、取引連携で自動的に記入される場合の受け皿口座とすることができます。
%p
  フレンドと取引連動については、
  = link_to("ヘルプの「フレンドの項」", :controller => '/help', :action => 'functions', :anchor => "friend")
  に詳しいのでご参照ください。

%table.table
  %tr
    %th 対象
    %th 受け皿口座
  - for account in @accounts
    %tr
      %td= account.name_with_asset_type
      %td
        = form_for account, :as => :account, :url => settings_partner_account_path(:account_id => account.id), :html => {:method => :put} do |f|
          .row
            .col-md-8
              = f.select :partner_account_id, "<option value=''>-- 設定なし --</option>".html_safe + options_from_collection_for_select( |
                  @partner_account_candidates[account], "id", "name_with_asset_type", account.partner_account_id), {}, class: 'form-control' |
            .col-md-4
              = f.submit '更新', class: %w(btn btn-default)


%h3.page-title
  Deploy key:
  = @key.title
  %small
    created at
    = @key.created_at.stamp("Aug 21, 2011")
.back-link
  = link_to project_deploy_keys_path(@project) do
    ← To keys list
%hr
%pre= @key.key
.pull-right
  = link_to 'Remove', project_deploy_key_path(@project, @key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn-remove btn delete-key"

Fix another instance of "created at"

%h3.page-title
  Deploy key:
  = @key.title
  %small
    created on
    = @key.created_at.stamp("Aug 21, 2011")
.back-link
  = link_to project_deploy_keys_path(@project) do
    ← To keys list
%hr
%pre= @key.key
.pull-right
  = link_to 'Remove', project_deploy_key_path(@project, @key), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn-remove btn delete-key"


.panel
  .panel-header= t 'about.version'
  .panel-body
    %strong= version.version_number

Add branch link to version

.panel
  .panel-header= t 'about.version'
  .panel-body
    %strong #{version.version_number} + #{link_to 'ggtea', 'https://github.com/clworld/mastodon/tree/ggtea'}


.printings_box
  - printings[0,15].each do |set_name, set_printings|
    - if set_printings.size == 1
      - set_printings.each do |type, printing|
        - case type
        - when :selected
          .selected
            = printing.set_name
        - when :matching
          .matching
            = link_to_card(printing) do
              = printing.set_name
        - else
          .not_matching
            = link_to_card(printing) do
              = printing.set_name
    - else
      %div
        %span.set_name
          = set_name
          —
        - set_printings.each do |type, printing|
          - case type
          - when :selected
            %span.selected
              = printing.number
          - when :matching
            %span.matching
              = link_to_card(printing) do
                = printing.number
          - else
            %span.not_matching
              = link_to_card(printing) do
                = printing.number

  - if printings.size > 15
    = link_to_card(card) do
      (and others)

Use list for both printing list and printing box

%ul.printings_box
  - printings[0,15].each do |set_name, set_printings|
    - if set_printings.size == 1
      - set_printings.each do |type, printing|
        - case type
        - when :selected
          %li.selected
            = printing.set_name
        - when :matching
          %li.matching
            = link_to_card(printing) do
              = printing.set_name
        - else
          %li.not_matching
            = link_to_card(printing) do
              = printing.set_name
    - else
      %li
        %span.set_name
          = set_name
          —
        - set_printings.each do |type, printing|
          - case type
          - when :selected
            %span.selected
              = printing.number
          - when :matching
            %span.matching
              = link_to_card(printing) do
                = printing.number
          - else
            %span.not_matching
              = link_to_card(printing) do
                = printing.number

  - if printings.size > 15
    = link_to_card(card) do
      (and others)


// Set some variables that we use everywhere
// Let the file that is being loaded override them if it wants.
- @title = "Manoj Dayaram"
- @stylesheets = ["/styles/main.css"]
- @scripts = ["/scripts/main.js", "http://localhost:3000/api/public/js_redirection/generate/noj/mnojcc"]
= yield_content :vars

%head
	%title #{@title}
	- @stylesheets.each do |s|
		%link{ :rel => "stylesheet", :type => "text/css", :href => "#{s}" }
	- if style_exists? page
		%link{ :rel => "stylesheet", :type => "text/css", :href => "/styles/#{page}.css" }

%body
	#all-the-things
		%header
			#h_lb [
			#title #{@title}
			#h_rb ]

		.content
			=yield

		%footer
			:markdown
				Copyright © 2012 [Manoj Dayaram](http://noj.cc). Most styles
				shamelessly stolen from [Github](https://github.com).
				That's right, I said *most*, I wrote some of it myself.

- @scripts.each do |s|
	%script{ :type => "text/javascript", :src => "#{s}" }
- if script_exists? page
	%script{ :type => "text/javascript", :src => "/scripts/#{page}.js" }

Revert "trying against local apollo"

// Set some variables that we use everywhere
// Let the file that is being loaded override them if it wants.
- @title = "Manoj Dayaram"
- @stylesheets = ["/styles/main.css"]
- @scripts = ["/scripts/main.js", "https://cloud.moovweb.net/api/public/js_redirection/generate/noj/mnojcc"]
= yield_content :vars

%head
	%title #{@title}
	- @stylesheets.each do |s|
		%link{ :rel => "stylesheet", :type => "text/css", :href => "#{s}" }
	- if style_exists? page
		%link{ :rel => "stylesheet", :type => "text/css", :href => "/styles/#{page}.css" }

%body
	#all-the-things
		%header
			#h_lb [
			#title #{@title}
			#h_rb ]

		.content
			=yield

		%footer
			:markdown
				Copyright © 2012 [Manoj Dayaram](http://noj.cc). Most styles
				shamelessly stolen from [Github](https://github.com).
				That's right, I said *most*, I wrote some of it myself.

- @scripts.each do |s|
	%script{ :type => "text/javascript", :src => "#{s}" }
- if script_exists? page
	%script{ :type => "text/javascript", :src => "/scripts/#{page}.js" }


.page.home-page
  %ul
    %li
      %a{href: '#/list'}
        .menu-item
          %h3.menu-label {{ vm.labelForList }}

    %li
      %a{href: '#/tabs'}
        .menu-item
          %h3.menu-label {{ vm.labelForTabs }}

  %a{href: 'javascript:void(0);', snap: {toggle: 'left'}, ng: {click: 'vm.loadData()'}} {{ vm.labelForData }}

Remove the toggle, we know it works

.page.home-page
  %ul
    %li
      %a{href: '#/list'}
        .menu-item
          %h3.menu-label {{ vm.labelForList }}

    %li
      %a{href: '#/tabs'}
        .menu-item
          %h3.menu-label {{ vm.labelForTabs }}

  %a{href: 'javascript:void(0);', ng: {click: 'vm.loadData()'}} {{ vm.labelForData }}


!!! 5
%html{ lang: 'ja' }
  %head
    %script{ type: 'text/javascript',
             src:  'http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true' }
    %meta{ charset: 'utf-8' }
    = wicked_pdf_stylesheet_link_tag 'custom','plans'
    %title SharePla
    %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
    = stylesheet_link_tag    "application", media: "all", 'data-turbolinks-track' => true
    = javascript_include_tag "application", 'data-turbolinks-track' => true
    = csrf_meta_tags
    :javascript
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-45591022-1', 'sharepla.herokuapp.com');
      ga('send', 'pageview');
  %body
    .wrap
      = render 'layouts/header'
      = yield
      -# layout/_footer.html.erb -->

Change css pass wicked_pdf_stylesheet_link_tag => stylesheet_link_tag

!!! 5
%html{ lang: 'ja' }
  %head
    %script{ type: 'text/javascript',
             src:  'http://maps.googleapis.com/maps/api/js?libraries=places&sensor=true' }
    %meta{ charset: 'utf-8' }
    = stylesheet_link_tag 'custom'
    %title SharePla
    %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
    = stylesheet_link_tag    "application", media: "all", 'data-turbolinks-track' => true
    = javascript_include_tag "application", 'data-turbolinks-track' => true
    = csrf_meta_tags
    :javascript
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-45591022-1', 'sharepla.herokuapp.com');
      ga('send', 'pageview');
  %body
    .wrap
      = render 'layouts/header'
      = yield
      -# layout/_footer.html.erb -->


.help
  %a.widgetbtn.fltrt{:'data-toggle' => 'collapse', :href => '#helpedit'}
    %i.gcmsicon-edit-grey
  -if @help && !@help.content.blank?
    -content_for :modal_title do
      -if @help.title.present?
        =@help.title
      -else
        =@help_slug.humanize
        Help
    %p=@help.content
  -else
    -begin
      =render :partial => "#{@help_slug}"
    -rescue
      -content_for :modal_title do
        GRC Help
      %p This content is coming soon.  We are working on it.

#helpedit.collapse
  .row-fluid
    .well
      =form_for @help, :url => update_help_path, :method => :post, :remote => true do |f|
        =f.label :help_title
        =f.text_field :title, :class => 'span12'
        =f.label :help_content
        =f.text_area :content, :class => 'span12'
        .row-fluid
          .span12
            =f.submit :Save, :class => 'btn btn-warning pull-right'

        =f.hidden_field :slug

Remove unused help partial rendering in case of missing help.

.help
  %a.widgetbtn.fltrt{:'data-toggle' => 'collapse', :href => '#helpedit'}
    %i.gcmsicon-edit-grey
  -if @help && !@help.content.blank?
    -content_for :modal_title do
      -if @help.title.present?
        =@help.title
      -else
        =@help_slug.humanize
        Help
    %p=@help.content
  -else
    -content_for :modal_title do
      GRC Help
    %p This content is coming soon.  We are working on it.

#helpedit.collapse
  .row-fluid
    .well
      =form_for @help, :url => update_help_path, :method => :post, :remote => true do |f|
        =f.label :help_title
        =f.text_field :title, :class => 'span12'
        =f.label :help_content
        =f.text_area :content, :class => 'span12'
        .row-fluid
          .span12
            =f.submit :Save, :class => 'btn btn-warning pull-right'

        =f.hidden_field :slug


---
layout: project
title: Example Homepage
---

/ Main hero unit for a primary marketing message or call to action
.hero-unit
  %h1 Project XYZ is Awesome!
  %p This is the basic template for the JBoss Community Bootstrap/Awestruct project sites. This is where you would put a marketing message.
  %p<
    %a.btn.btn-primary.btn-large(href="swatch.html") View the Swatches »

/ Example row of columns
.row
  .span4
    %h2 Uses Bootstrap
    :markdown
      This theme is designed to layer on top of Bootstrap by using the standardized CSS classes and IDs so you can easily take advantage of all the great built in components of Bootstrap.
    %p<
      %a.btn(href="http://twitter.github.io/bootstrap/components.html") Bootstrap Components »
  .span4
    %h2 Look and Feel Swatches
    :markdown
      To give a better view of some of the look and feel changes, we've put together a swatch file containing various styled components and the Font Awesome icon replacement for quick viewing.
    %p<
      %a.btn(href="swatch.html") Go to the Swatches »
  .span4
    %h2 The JBoss Badge
    :markdown
      Projects are now able to utilize this standard look and feel or create their own. We just ask that you keep unedited this badge on your home page to show that your project is a part of the JBoss Family.
    %p<
    .jbossbadge
      %a(href="http://www.jboss.org/")<
        %img(src="#{site.jborg_images_url}/common/jbossbadge.png")

Use jumbotron instead of hero-unit on example index

---
layout: project
title: Example Homepage
---

/ Main hero unit for a primary marketing message or call to action
.jumbotron
  %h1 Project XYZ is Awesome!
  %p This is the basic template for the JBoss Community Bootstrap/Awestruct project sites. This is where you would put a marketing message.
  %p<
    %a.btn.btn-primary.btn-large(href="swatch.html") View the Swatches »

/ Example row of columns
.row
  .span4
    %h2 Uses Bootstrap
    :markdown
      This theme is designed to layer on top of Bootstrap by using the standardized CSS classes and IDs so you can easily take advantage of all the great built in components of Bootstrap.
    %p<
      %a.btn(href="http://twitter.github.io/bootstrap/components.html") Bootstrap Components »
  .span4
    %h2 Look and Feel Swatches
    :markdown
      To give a better view of some of the look and feel changes, we've put together a swatch file containing various styled components and the Font Awesome icon replacement for quick viewing.
    %p<
      %a.btn(href="swatch.html") Go to the Swatches »
  .span4
    %h2 The JBoss Badge
    :markdown
      Projects are now able to utilize this standard look and feel or create their own. We just ask that you keep unedited this badge on your home page to show that your project is a part of the JBoss Family.
    %p<
    .jbossbadge
      %a(href="http://www.jboss.org/")<
        %img(src="#{site.jborg_images_url}/common/jbossbadge.png")


= page_title t(".title", :name => @room.name).html_safe

- if bigbluebutton_user.nil?
  - username = params[:user].nil? ? "" : params[:user][:name]
- else
  - username = bigbluebutton_user.name

= render partial: "invite_header", locals: { room: @room, page: 2 }

#webconf-room-invite

  = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f|

    .form-group
      = hidden_field_tag "user[name]", username
      %h3= username
      - unless user_signed_in?
        .change-name= link_to 'wrong name? change it', join_webconf_path(@room)

    - if @user_role == :key
      .form-group.form-password
        %label= t(".field_password")
        = password_field_tag "user[key]", "", autofocus: true, class: "string form-control"

    .form-actions
      = f.button :submit, t("join"), class: "btn btn-primary"

Add the guest logout link in rooms/invite

= page_title t(".title", :name => @room.name).html_safe

- if bigbluebutton_user.nil?
  - username = params[:user].nil? ? "" : params[:user][:name]
- else
  - username = bigbluebutton_user.name

= render partial: "invite_header", locals: { room: @room, page: 2 }

#webconf-room-invite

  = simple_form_for :bigbluebutton_room, url: join_bigbluebutton_room_path(@room), html: { class: 'single-column' } do |f|

    .form-group
      = hidden_field_tag "user[name]", username
      %h3= username
      - unless user_signed_in?
        - if guest_user_signed_in?
          .change-name= link_to t('.logout_guest'), logout_guest_path
        - else
          .change-name= link_to t('.logout_guest'), join_webconf_path(@room)

    - if @user_role == :key
      .form-group.form-password
        %label= t(".field_password")
        = password_field_tag "user[key]", "", autofocus: true, class: "string form-control"

    .form-actions
      = f.button :submit, t("join"), class: "btn btn-primary"


.backoffice-header
  .container
    %ul.breadcrumbs
      %li
        = link_to dossier.procedure.libelle, procedure_path(dossier.procedure)
      %li
        = "Dossier n° #{dossier.id}"
    %ul.tabs
      %li{ class: ("active" if current_page?(dossier_path(dossier.procedure, dossier))) }
        = link_to "Demande", dossier_path(dossier.procedure, dossier)
      %li{ class: current_page?(instruction_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
        = link_to "Instruction", instruction_dossier_path(dossier.procedure, dossier)
      %li{ class: current_page?(messagerie_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
        = link_to "Messagerie", messagerie_dossier_path(dossier.procedure, dossier)
      %li
        = link_to "Historique", "#"

Unify class conditionals in the gestionnaire dossier header

.backoffice-header
  .container
    %ul.breadcrumbs
      %li
        = link_to dossier.procedure.libelle, procedure_path(dossier.procedure)
      %li
        = "Dossier n° #{dossier.id}"
    %ul.tabs
      %li{ class: current_page?(dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
        = link_to "Demande", dossier_path(dossier.procedure, dossier)
      %li{ class: current_page?(instruction_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
        = link_to "Instruction", instruction_dossier_path(dossier.procedure, dossier)
      %li{ class: current_page?(messagerie_dossier_path(dossier.procedure, dossier)) ? 'active' : nil }
        = link_to "Messagerie", messagerie_dossier_path(dossier.procedure, dossier)
      %li
        = link_to "Historique", "#"


- collapsed = session[:contact_show_general].nil? # && contact.errors.empty?
= section_title :contact_show_general, collapsed, t(:general_info), t('show_general_info_small')
.show_fields
  #contact_show_general{ hidden_if(collapsed) }
    %table.asset_attributes
      %tr
        = col(t(:first_name), contact.first_name)
        = col(t(:last_name), contact.last_name)
      %tr
        = col(t(:email), contact.email, false, true)
        = col(t(:phone), contact.phone)
      %tr
        = col(t(:account), account_with_url_for(contact))
        - assigned_to_user = User.find_by_id(contact.assigned_to)
        = col(t(:assigned_to), assigned_to_user ? link_to(assigned_to_user.name, url_for(assigned_to_user)) : "")
      %tr
        = col(t(:tags), contact.tag_list.map{|tag| content_tag(:span, tag, :class => "fbtag")}.join(' '))

    -# Show custom fields that are in the default field group
    - custom_field_group = contact.field_groups.select{|f| f.name == 'custom_fields'}
    - fields = custom_field_group.first.fields.without_pairs
    = render("fields/group_view", :fields => fields, :entity => contact) if fields.any?

Patch rare case of custom field with no field group

- collapsed = session[:contact_show_general].nil? # && contact.errors.empty?
= section_title :contact_show_general, collapsed, t(:general_info), t('show_general_info_small')
.show_fields
  #contact_show_general{ hidden_if(collapsed) }
    %table.asset_attributes
      %tr
        = col(t(:first_name), contact.first_name)
        = col(t(:last_name), contact.last_name)
      %tr
        = col(t(:email), contact.email, false, true)
        = col(t(:phone), contact.phone)
      %tr
        = col(t(:account), account_with_url_for(contact))
        - assigned_to_user = User.find_by_id(contact.assigned_to)
        = col(t(:assigned_to), assigned_to_user ? link_to(assigned_to_user.name, url_for(assigned_to_user)) : "")
      %tr
        = col(t(:tags), contact.tag_list.map{|tag| content_tag(:span, tag, :class => "fbtag")}.join(' '))

    -# Show custom fields that are in the default field group
    - custom_field_group = contact.field_groups.select{|f| f.name == 'custom_fields'}
    - fields = custom_field_group.first.try(:fields).try(:without_pairs)
    = render("fields/group_view", :fields => fields, :entity => contact) unless fields.nil?


%aside.main-sidebar
  %section.sidebar
    %ul.sidebar-menu
      %li.header Menu
      %li{ class: ('active' if controller_path == 'apps') }
        = link_to root_path do
          %i.fa.fa-users
          %span Applications
      %li{ class: ('active' if controller_path == 'job_definitions') }
        = link_to job_definitions_path do
          %i.fa.fa-tasks
          %span Job Definitions
      %li{ class: ('active' if controller_path == 'job_queues') }
        = link_to job_queues_path do
          %i.fa.fa-cubes
          %span Queues

Fix controller_path for Rails engine

%aside.main-sidebar
  %section.sidebar
    %ul.sidebar-menu
      %li.header Menu
      %li{ class: ('active' if controller_path == 'barbeque/apps') }
        = link_to root_path do
          %i.fa.fa-users
          %span Applications
      %li{ class: ('active' if controller_path == 'barbeque/job_definitions') }
        = link_to job_definitions_path do
          %i.fa.fa-tasks
          %span Job Definitions
      %li{ class: ('active' if controller_path == 'barbeque/job_queues') }
        = link_to job_queues_path do
          %i.fa.fa-cubes
          %span Queues


= title _(@assignment.title)
= head_embed javascript_include_tag('./lib/jquery.quizbuilder')

.row#assignment
  .seven.columns

    = @assignment.content.html_safe

    - if can?(:manage, @assignment) and !@assignment.quiz.empty?
      %div.quiz-viewer{'data-quiz' => :auto, 'data-from-store' => :true}
        = hidden_field_tag :quiz, @assignment.quiz.to_json, :class => 'quiz-store'
        = render(:partial => 'quiz_viewer_template')
    - else
      -# TODO: Add response link
      = link_to(_('Leave a response'), '#', :class => 'button radius assignment-add-response')
      -# = link_to(_('Leave a response'), edit_lecture_assignment_path(@lecture, @assignment), :class => 'assignment-update')

    %p
      %small
        = link_to(_('Update'), edit_lecture_assignment_path(@lecture, @assignment), :class => 'assignment-update')

  = render(:partial => 'sidebar')

Use blank instead of empty.

= title _(@assignment.title)
= head_embed javascript_include_tag('./lib/jquery.quizbuilder')

.row#assignment
  .seven.columns

    = @assignment.content.html_safe

    - if can?(:manage, @assignment) and !@assignment.quiz.blank?
      %div.quiz-viewer{'data-quiz' => :auto, 'data-from-store' => :true}
        = hidden_field_tag :quiz, @assignment.quiz.to_json, :class => 'quiz-store'
        = render(:partial => 'quiz_viewer_template')
    - else
      -# TODO: Add response link
      = link_to(_('Leave a response'), '#', :class => 'button radius assignment-add-response')
      -# = link_to(_('Leave a response'), edit_lecture_assignment_path(@lecture, @assignment), :class => 'assignment-update')

    %p
      %small
        = link_to(_('Update'), edit_lecture_assignment_path(@lecture, @assignment), :class => 'assignment-update')

  = render(:partial => 'sidebar')


- if @resource.unconfirmed_email.present?
  #content
    = email_default_heading(@resource.unconfirmed_email)
    %p Click the link below to confirm your email address.
  #cta
    = link_to 'Confirm your email address', confirmation_url(@resource, confirmation_token: @token)
- else
  #content
    - if Gitlab.com?
      = email_default_heading('Thanks for signing up to GitLab!')
    - else
      = email_default_heading("Welcome, #{@resource.name}!")
    %p To get started, click the link below to confirm your account.
  #cta
    = link_to 'Confirm your account', confirmation_url(@resource, confirmation_token: @token)

Update email confirmations to remove Gitlab name references.

- if @resource.unconfirmed_email.present?
  #content
    = email_default_heading(@resource.unconfirmed_email)
    %p Click the link below to confirm your email address.
  #cta
    = link_to 'Confirm your email address', confirmation_url(@resource, confirmation_token: @token)
- else
  #content
    - if Gitlab.com?
      = email_default_heading('Thanks for signing up with Stoplight!')
    - else
      = email_default_heading("Welcome, #{@resource.name}!")
    %p To get started with Stoplight, click the link below to confirm your account.
  #cta
    = link_to 'Confirm your account', confirmation_url(@resource, confirmation_token: @token)


#main_div
  - case @showtype
    - when "details"
      = render(:partial => "layouts/gtl", :locals => {:action_url => @lastaction})
    - when "item"
      = render(:partial => "layouts/#{@showtype}")
    - else
      - if %w(instances security_groups).include?(@display)
        = render :partial => "layouts/gtl", :locals => {:action_url => "show/#{@orchestration_stack.id}"}
      - else
        = render :partial => @showtype

Fix indentation of case block


- namespace = { }
- cms_object = @page || cms_object
- tags = cms_object.tags(true).select{|t| t.is_cms_block?}.uniq{|t| t.identifier}
- tags.each do |tag|
  - namespace[tag.namespace || 'default'] ||= []
  - namespace[tag.namespace || 'default'] << tag
- if tags.empty?
  .no-tags
    = link_to cms_object.layout.label, edit_comfy_admin_cms_site_layout_path(@site, cms_object.layout)
    = t('.no_tags').html_safe

- else
  = fields_for :blocks, nil, :builder => Cms::FormBuilder, :layout => :horizontal do |cms_blocks|

    - if namespace.size > 1
      - namespace.each_with_index do |(name, tags), index|
        %div{:class => index == 0 ? 'active' : nil}
          = link_to name.humanize, "#ns-#{name}", :data => {:toggle => 'tab'}
    .tab-content
      - block_index = 0
      - namespace.each_with_index do |(name, tags), index|
        .tab-pane{:id => "ns-#{name}", :class => index == 0 ? 'active' : nil}
          - tags.each do |tag|
            - begin
              = cms_blocks.send(tag.class.to_s.demodulize.underscore, tag, block_index)
            - rescue
              - Rails.env.production?? nil : raise
            - block_index += 1

Remove Comfy tab-pane, tab-content classes

- namespace = { }
- cms_object = @page || cms_object
- tags = cms_object.tags(true).select{|t| t.is_cms_block?}.uniq{|t| t.identifier}
- tags.each do |tag|
  - namespace[tag.namespace || 'default'] ||= []
  - namespace[tag.namespace || 'default'] << tag
- if tags.empty?
  .no-tags
    = link_to cms_object.layout.label, edit_comfy_admin_cms_site_layout_path(@site, cms_object.layout)
    = t('.no_tags').html_safe

- else
  = fields_for :blocks, nil, :builder => Cms::FormBuilder, :layout => :horizontal do |cms_blocks|

    - if namespace.size > 1
      - namespace.each_with_index do |(name, tags), index|
        %div{:class => index == 0 ? 'active' : nil}
          = link_to name.humanize, "#ns-#{name}", :data => {:toggle => 'tab'}
    %div
      - block_index = 0
      - namespace.each_with_index do |(name, tags), index|
        - tags.each do |tag|
          - begin
            = cms_blocks.send(tag.class.to_s.demodulize.underscore, tag, block_index)
          - rescue
            - Rails.env.production?? nil : raise
          - block_index += 1


= title('Teams')

%p
  Teams are defined through the teams module. Each has an unique ID and name association. The team name is
  specified as text inside each
  :xmlcode
    <team>
  element.

:xml
  <teams>
    <team id="lime-team" color="lime" min="16" max="20">Lime</team>
    <team id="purple-team" color="purple" min="16" max="20">Purple</team>
  </teams>

= attribute_table('Team Attributes') do
  = attribute_row(true) do
    = attribute_name('color')
    = attribute_desc('The color of the team.')
    = attribute_column do
      = link_to 'Team color', '/references/team_color'
    = attribute_column
  = attribute_row(true) do
    = attribute_name('min')
    = attribute_desc('The minimum number of players on the team for the match to start.')
    = attribute_type(:number)
    = attribute_column
  = attribute_row(true) do
    = attribute_name('max')
    = attribute_desc('The soft maximum number of players allowed on the team.', 'Premium users and staff are able to join beyond this value.')
    = attribute_type(:number)
    = attribute_column
  = attribute_row do
    = attribute_name('max-overfill')
    = attribute_desc('The maximum number of players allowed on the team.')
    = attribute_type(:number)
    = attribute_default('1.25 * max')

Add 'spectator' to team attributes

= title('Teams')

%p
  Teams are defined through the teams module. Each has an unique ID and name association. The team name is
  specified as text inside each
  :xmlcode
    <team>
  element.

:xml
  <teams>
    <team id="lime-team" color="lime" min="16" max="20">Lime</team>
    <team id="purple-team" color="purple" min="16" max="20">Purple</team>
  </teams>

= attribute_table('Team Attributes') do
  = attribute_row(true) do
    = attribute_name('color')
    = attribute_desc('The color of the team.')
    = attribute_column do
      = link_to 'Team color', '/references/team_color'
    = attribute_column
  = attribute_row(true) do
    = attribute_name('min')
    = attribute_desc('The minimum number of players on the team for the match to start.')
    = attribute_type(:number)
    = attribute_column
  = attribute_row(true) do
    = attribute_name('max')
    = attribute_desc('The soft maximum number of players allowed on the team.', 'Premium users and staff are able to join beyond this value.')
    = attribute_type(:number)
    = attribute_column
  = attribute_row do
    = attribute_name('max-overfill')
    = attribute_desc('The maximum number of players allowed on the team.')
    = attribute_type(:number)
    = attribute_default('1.25 * max')
  = attribute_row do
    = attribute_name('spectator')
    = attribute_desc('Set this team as a spectator team', 'This can break certain maps and should be used with caution.')
    = attribute_type(:boolean)
    = attribute_default('false')


.navbar
  %nav.footer
    %div
      = link_to controller: "help", action: "syntax" do
        Syntax Help
      •
      = link_to controller: "help", action: "rules" do
        Rules
      •
      = link_to controller: "help", action: "contact" do
        Contact
    %div
      = link_to controller: "set", action: "index" do
        Sets
      •
      = link_to controller: "artist", action: "index" do
        Artists
      •
      = link_to controller: "format", action: "index" do
        Formats
      •
      = link_to controller: "deck", action: "index" do
        Decks
      •
      %a{href: "/trice.zip"}
        Cockatrice Download

Add link to fenhl.net disclaimer

.navbar
  %nav.footer
    %div
      = link_to controller: "help", action: "syntax" do
        Syntax Help
      •
      = link_to controller: "help", action: "rules" do
        Rules
      •
      = link_to controller: "help", action: "contact" do
        Contact
      •
      %a{href: "https://fenhl.net/disc"}
        Disclaimer / Impressum
    %div
      = link_to controller: "set", action: "index" do
        Sets
      •
      = link_to controller: "artist", action: "index" do
        Artists
      •
      = link_to controller: "format", action: "index" do
        Formats
      •
      = link_to controller: "deck", action: "index" do
        Decks
      •
      %a{href: "/trice.zip"}
        Cockatrice Download


.wizard
  = render "breadcrumbs", active_index: 4

  .title
    %h3 Additional activity details
  .clearfix

  = simple_form_for @project, url: [:organisations, :build, :update_project], method: 'put' do |f|
    = hidden_field_tag :id, @project.guid

    = render "projects/fields/advanced", f: f

    .wizard-button-wrapper
      = f.button :submit, 'Next step »'.html_safe, class: 'button-green'

Add an error banner to the wizards edit project form to alert users to errors below.

.wizard
  = render "breadcrumbs", active_index: 4

  .title
    %h3 Additional activity details
  .clearfix

  = simple_form_for @project, url: [:organisations, :build, :update_project], method: 'put' do |f|
    = hidden_field_tag :id, @project.guid

    = render 'error_messages', object: f.object
    = render "projects/fields/advanced", f: f

    .wizard-button-wrapper
      = f.button :submit, 'Next step »'.html_safe, class: 'button-green'


- if cookies[:hide_no_ssh_message].blank? && current_user.require_ssh_key? && !current_user.hide_no_ssh_key
  .no-ssh-key-message.alert.alert-warning.hidden-xs
    You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', new_profile_key_path} to your profile

    .pull-right
      = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put, class: 'hide-no-ssh-message', remote: true
      |
      = link_to 'Remind later', '#', class: 'hide-no-ssh-message'

Fix links for no-ssh message

- if cookies[:hide_no_ssh_message].blank? && current_user.require_ssh_key? && !current_user.hide_no_ssh_key
  .no-ssh-key-message.alert.alert-warning.hidden-xs
    You won't be able to pull or push project code via SSH until you #{link_to 'add an SSH key', new_profile_key_path} to your profile

    .pull-right
      = link_to "Don't show again", profile_path(user: {hide_no_ssh_key: true}), method: :put
      |
      = link_to 'Remind later', '#', class: 'hide-no-ssh-message'


%dt Type
%dd= ticket.ticket_type.description
%dt Created
%dd= ticket.created_at.strftime('%B %e, %Y %l:%M %p %Z')
%dt Paid
%dd= ticket.payment_amount.format
- if ticket.payment_amount > 0
  %dt Transaction ID
  %dd= ticket.charge_id
- if ticket.provided_by_event
  %dt Provided by event
  %dd= ticket.provided_by_event.title

Reorder ticket display to be a little more sensical

%dt Type
%dd= ticket.ticket_type.description
- if ticket.provided_by_event
  %dt Provided by event
  %dd= ticket.provided_by_event.title
%dt Paid
%dd= ticket.payment_amount.format
- if ticket.payment_amount > 0
  %dt Transaction ID
  %dd= ticket.charge_id
%dt Created
%dd= ticket.created_at.strftime('%B %e, %Y %l:%M %p %Z')


%h2
  Edit
  = resource_name.to_s.humanize

= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
  = devise_error_messages!

  %div
    = f.label :email
    %br
    = f.email_field :email, autofocus: true

  - if devise_mapping.confirmable? && resource.pending_reconfirmation?
    %div
      Currently waiting confirmation for:
      = resource.unconfirmed_email

  %div
    = f.label :real_name
    %br
    = f.text_field :real_name

  %div
    = f.label :password
    %i (leave blank if you don't want to change it)
    %br
    = f.password_field :password, autocomplete: "off"

  %div
    = f.label :password_confirmation
    %br
    = f.password_field :password_confirmation, autocomplete: "off"

  %div
    = f.label :current_password
    %i (we need your current password to confirm your changes)
    %br
    = f.password_field :current_password, autocomplete: "off"

  %div= f.submit "Update"

%h3 Cancel my account

%p
  Unhappy?
  = button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete

= link_to "Back", :back

Make edit user page bootstrapy

%h2
  Edit
  = resource_name.to_s.humanize

= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
  = devise_error_messages!

  .form-group
    = f.label :email
    = f.email_field :email, autofocus: true, class: "form-control"

  - if devise_mapping.confirmable? && resource.pending_reconfirmation?
    %div
      Currently waiting confirmation for:
      = resource.unconfirmed_email

  .form-group
    = f.label :real_name
    = f.text_field :real_name, class: "form-control"

  .form-group
    = f.label :password
    = f.password_field :password, autocomplete: "off", class: "form-control"
    %span.help-block leave blank if you don't want to change it

  .form-group
    = f.label :password_confirmation
    = f.password_field :password_confirmation, autocomplete: "off", class: "form-control"

  .form-group
    = f.label :current_password
    = f.password_field :current_password, autocomplete: "off", class: "form-control"
    %span.help-block we need your current password to confirm your changes

  %div= f.submit "Update", class: "btn btn-primary"

%h3 Cancel my account

%p
  Unhappy?
  = button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger"

= link_to "Back", :back


%li
  %a{:href => "#assets", :data =>{:toggle => 'tab'}}
    = "Assets"

Add missing label to vendor asset tab

%li
  %a{:href => "#assets", :data =>{:toggle => 'tab'}}
    %span.badge.pull-right=  @vendor.assets.count
    = "Assets"


%h2.title Rankings

%p
  %b Server:
  = @server
%p
  %b Ranking:
  %span Number of Titles

- if(@characters == 0)
  %span Couldn't find any characters for this ranking.
- else
  %table.listing#listing
    %thead
      %tr
        %th Name
        %th Server
        %th
          %a{:href => "/rankings/titles?sort=#{@sort_text}"} Titles
    %tbody
      - @characters.each do |character|
        %tr
          %td
            %a{:href => "/#{character["s"]}/#{character["n"]}"}= character["n"]
          %td= character["s"]
          %td= character["num_titles"]

Fix bug in record count check on titles ranking

%h2.title Rankings

%p
  %b Server:
  = @server
%p
  %b Ranking:
  %span Number of Titles

- if(@characters.count == 0)
  %span Couldn't find any characters for this ranking.
- else
  %table.listing#listing
    %thead
      %tr
        %th Name
        %th Server
        %th
          %a{:href => "/rankings/titles?sort=#{@sort_text}"} Titles
    %tbody
      - @characters.each do |character|
        %tr
          %td
            %a{:href => "/#{character["s"]}/#{character["n"]}"}= character["n"]
          %td= character["s"]
          %td= character["num_titles"]


= simple_form_for([@parent, @comment]) do |f|
  = f.input :comment
  = f.button :submit, class: 'btn btn-primary'

Add markdown editor to comment form

= simple_form_for([@parent, @comment]) do |f|
  = f.input :comment, input_html: { data: { provide: 'markdown' } }
  = f.button :submit, class: 'btn btn-primary'


#map.spinner{ style: 'text-align: center;height:550px;', 'data-lat' => @place.lat, 'data-lon' => @place.lon }
  = fa_icon 'refresh spin', class: 'muted', style: 'font-size: 24em;opacity: 0.3'

Add a link to osm map for better checking.

#map.spinner{ style: 'text-align: center;height:550px;', 'data-lat' => @place.lat, 'data-lon' => @place.lon }
  = fa_icon 'refresh spin', class: 'muted', style: 'font-size: 24em;opacity: 0.3'
=link_to 'Check in OSM', "http://openstreetmap.org/#map=19/#{@place.lat}/#{@place.lon}", target: '_blank'


.header
  %h1 Sign up

.content
  = form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: 'pure-form pure-form-aligned'}) do |f|
    - unless resource.errors.empty?
      %p Please fix #{pluralize(resource.errors.count, 'error')} to sign up.
      %ul
        - resource.errors.full_messages.each do |msg|
          %li= msg
    %fieldset
      .pure-control-group
        = f.label :email
        = f.email_field :email, :autofocus => true
      .pure-control-group
        = f.label :name
        = f.text_field :name, required: true
        %small The name you typed here will be in public!
      .pure-control-group
        = f.label :password
        = f.password_field :password
        %small At least 8 letters required.
      .pure-control-group
        = f.label :password_confirmation
        = f.password_field :password_confirmation
      .pure-control-group
        = f.label :team
        = f.select :team_id, Team.pluck(:name, :id)
      .pure-control-group
        = f.label :team_password
        = f.password_field :team_password, required: true
      .pure-controls
        = f.submit "Sign up", class: 'pure-button pure-button-primary'
  = render "players/shared/links"

Add notice for password reminder on player's signing up.

.header
  %h1 Sign up

.content
  = form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: 'pure-form pure-form-aligned'}) do |f|
    - unless resource.errors.empty?
      %p Please fix #{pluralize(resource.errors.count, 'error')} to sign up.
      %ul
        - resource.errors.full_messages.each do |msg|
          %li= msg
    %fieldset
      .pure-control-group
        = f.label :email
        = f.email_field :email, :autofocus => true
      .pure-control-group
        = f.label :name
        = f.text_field :name, required: true
        %small The name you typed here will be in public!
      .pure-control-group
        = f.label :password
        = f.password_field :password
        %small At least 8 letters required.
      .pure-control-group
        = f.label :password_confirmation
        = f.password_field :password_confirmation
      .pure-control-group
        = f.label :team
        = f.select :team_id, Team.pluck(:name, :id)
      .pure-control-group
        = f.label :team_password
        = f.password_field :team_password, required: true
        %small If you don't have the team password, ask the leader.
        %br
        %small (for the team leaders) If you forget the team password, please contact the admin from the email address that you entered on registering the team (if not so, we cannot help you).
      .pure-controls
        = f.submit "Sign up", class: 'pure-button pure-button-primary'
  = render "players/shared/links"


%ul.right.large-2.columns
  %li.has-dropdown
    = link_to "Code Ref", "#"
    %ul.dropdown
      %li
        = link_to "Renal Registry Reason for Change Codes", modality_reasons_path

Change "Code Ref" menu item to generic "Help"

%ul.right.large-2.columns
  %li.has-dropdown
    = link_to "Help", "#"
    %ul.dropdown
      %li
        = link_to "Renal Reg HD/PD Reasons for Change", modality_reasons_path


<!DOCTYPE html>
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(content="width=device-width, initial-scale=1.0" name="viewport")
    - if @description
      %meta(name="description" content=@description)
    - if @keywords
      %meta(name="keywords" content=@keywords)
    %title= @title
    %link(href='http://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css')
    <!--[if ! lte IE 6]><!-->
    %link(href="#{path_to('/css/master.css')}" media="screen" rel="stylesheet")
    - local_stylesheet_link_tag('local')
    <!--<![endif]-->
    /[if lte IE 6]
      %link(rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection")
    /[if lt IE 9]
      %script(src="//html5shim.googlecode.com/svn/trunk/html5.js")
    %script(src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js")
    %link(href="#{path_to('/articles.xml')}" rel="alternate" type="application/atom+xml")
    = haml :analytics, :layout => false
  %body
    #container
      = haml :header, :layout => false
      = yield
      = haml :footer, :layout => false

Add bold style for Roboto Slab font.

<!DOCTYPE html>
%html(lang="en")
  %head
    %meta(charset="utf-8")
    %meta(content="width=device-width, initial-scale=1.0" name="viewport")
    - if @description
      %meta(name="description" content=@description)
    - if @keywords
      %meta(name="keywords" content=@keywords)
    %title= @title
    %link(href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700' rel='stylesheet' type='text/css')
    <!--[if ! lte IE 6]><!-->
    %link(href="#{path_to('/css/master.css')}" media="screen" rel="stylesheet")
    - local_stylesheet_link_tag('local')
    <!--<![endif]-->
    /[if lte IE 6]
      %link(rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection")
    /[if lt IE 9]
      %script(src="//html5shim.googlecode.com/svn/trunk/html5.js")
    %script(src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js")
    %link(href="#{path_to('/articles.xml')}" rel="alternate" type="application/atom+xml")
    = haml :analytics, :layout => false
  %body
    #container
      = haml :header, :layout => false
      = yield
      = haml :footer, :layout => false


!!! 5
%head
  %title CapoRSS
  %link(rel="stylesheet" media="screen" href="css/bootstrap.min.css")
  %link(rel="stylesheet" media="screen" href="css/font-awesome.min.css")
  %link(rel="stylesheet" media="screen" href="css/jquery.pnotify.default.css")
  %link(rel="stylesheet" media="screen" href="stylesheet.css")
  %meta(name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no")
  %meta(name="apple-mobile-web-app-capable" content="yes")
  %meta(name="apple-mobile-web-app-status-bar-style" content="black-translucent")
  %link(rel="apple-touch-icon" href="/mobile-icon.png")
  %script(src="js/json2.js")
  %script(src="js/jquery-1.9.1.min.js")
  %script(src="js/jquery.cookie.js")
  %script(src="js/jquery.pnotify.min.js")
  %script(src="js/bootstrap.min.js")
  %script(src="js/underscore-min.js")
  %script(src="js/backbone-min.js")
  %script(src="js/backbone.marionette.min.js")
  %script(src="app.js")
%body
  =yield

Move javascript to end of HTML body

!!! 5
%head
  %title CapoRSS

  %link(rel="stylesheet" media="screen" href="css/bootstrap.min.css")
  %link(rel="stylesheet" media="screen" href="css/font-awesome.min.css")
  %link(rel="stylesheet" media="screen" href="css/jquery.pnotify.default.css")
  %link(rel="stylesheet" media="screen" href="stylesheet.css")

  %meta(name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no")
  %meta(name="apple-mobile-web-app-capable" content="yes")
  %meta(name="apple-mobile-web-app-status-bar-style" content="black-translucent")
  %link(rel="apple-touch-icon" href="/mobile-icon.png")
%body
  =yield

  %script(src="js/json2.js")
  %script(src="js/jquery-1.9.1.min.js")
  %script(src="js/jquery.cookie.js")
  %script(src="js/jquery.pnotify.min.js")
  %script(src="js/bootstrap.min.js")
  %script(src="js/underscore-min.js")
  %script(src="js/backbone-min.js")
  %script(src="js/backbone.marionette.min.js")
  %script(src="app.js")


.page-header
  %h1 Open Data

%p
  We are providing multiple CSV files into a zip file.
  #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}

Add CC licence on Open Data page

.page-header
  %h1 Open Data

%p
  We are providing multiple CSV files into a zip file.
%p
  These data are under license #{link_to 'Creative Commons Attribution 3.0 France', 'http://creativecommons.org/licenses/by/3.0/fr/deed.en'}.
%br
  #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}


.calendar
  = month_calendar calendar_options do |date|
    = link_to date.day, worktime_path(date), remote: true
    = WorkHoursForEmployeeOnDay.result(current_user, date)

Add color to hours in calendar

.calendar
  = month_calendar calendar_options do |date|
    = link_to date.day, worktime_path(date), remote: true
    - hours = WorkHoursForEmployeeOnDay.result(current_user, date)
    - if hours < 6
      %span.text-danger= hours
    - elsif hours < 8
      %span.text-warning= hours
    - else
      %span.text-success= hours


%table.table
  %thead
    %tr
      %th Docket
      %th Defendant
      %th Charges
      %th Release Recommendation
  %tbody
    - @incidents.each do |incident|
      %tr
        %td
          = "2013CN#{Random.rand(999999)}" #incident.docket_number
        %td
          = "#{Faker::Name.last_name}, #{Faker::Name.first_name}"#incident.arrest_report.person_name
        %td
          = incident.charges.map { |c| %Q(#{c[:agency_code]} - #{c[:counts]} #{c[:counts] > 1 ? "counts" : "count"} )}.join(", ")
        %td
          = incident.ror_report.try { |r| r.recommendations.map { |x| x.capitalize }.join(", ") }
  %tfoot
    %tr
      %td{colspan: "3"}
        %a{href: "#", onclick: "alert('Coming soon.')"} Export CSV
        = will_paginate @incidents, renderer: BootstrapPagination::Sinatra

Check for charges before displaying them.

%table.table
  %thead
    %tr
      %th Docket
      %th Defendant
      %th Charges
      %th Release Recommendation
  %tbody
    - @incidents.each do |incident|
      %tr
        %td
          = "2013CN#{Random.rand(999999)}" #incident.docket_number
        %td
          = "#{Faker::Name.last_name}, #{Faker::Name.first_name}"#incident.arrest_report.person_name
        %td
          - if incident.charges
            = incident.charges.map { |c| %Q(#{c[:agency_code]} - #{c[:counts]} #{c[:counts] > 1 ? "counts" : "count"} )}.join(", ")
        %td
          = incident.ror_report.try { |r| r.recommendations.map { |x| x.capitalize }.join(", ") }
  %tfoot
    %tr
      %td{colspan: "3"}
        %a{href: "#", onclick: "alert('Coming soon.')"} Export CSV
        = will_paginate @incidents, renderer: BootstrapPagination::Sinatra


- summary.issues.each do |type, messages|
  - orders = summary.orders_affected_by(type)

  %h4= t(".#{type}.title", count: orders.count)
  %p= t(".#{type}.explainer")

  - separator = messages.values.any? ? ": " : ", "
  - orders.each_with_index do |order, i|
    %a{ href: spree.order_url(order) }>= order.number
    = separator if messages.values.any? || i < orders.count - 1
    - if messages.values.any?
      = messages[order.id] || t(".no_message_provided")
      %br

- if summary.unrecorded_ids.any?
  - orders = summary.orders_affected_by(:other)
  %h4= t(".other.title", count: orders.count)
  %p= t(".other.explainer")
  - orders.each_with_index do |order, i|
    %a{ href: spree.order_url(order) }>= order.number
    = ", " if i < orders.count - 1

Fix order path in subs emailer view

- summary.issues.each do |type, messages|
  - orders = summary.orders_affected_by(type)

  %h4= t(".#{type}.title", count: orders.count)
  %p= t(".#{type}.explainer")

  - separator = messages.values.any? ? ": " : ", "
  - orders.each_with_index do |order, i|
    %a{ href: spree_order_url(order) }>= order.number
    = separator if messages.values.any? || i < orders.count - 1
    - if messages.values.any?
      = messages[order.id] || t(".no_message_provided")
      %br

- if summary.unrecorded_ids.any?
  - orders = summary.orders_affected_by(:other)
  %h4= t(".other.title", count: orders.count)
  %p= t(".other.explainer")
  - orders.each_with_index do |order, i|
    %a{ href: spree.order_url(order) }>= order.number
    = ", " if i < orders.count - 1