<commit_before>- content_for :title do
  = @title = @trip.title
- content_for :extracss do
  :css
    .observations.medium.grid .observation, .observations.medium.grid .photos, .observations.medium.grid .icon {
      width: 170px;
      height: 170px;
    }
    #sidenav {
      width: 210px;
      padding: 0;
      background-color: #fff;
    }
    #sidenav > li:first-child > a {
      -webkit-border-radius: 6px 6px 0 0;
      -moz-border-radius: 6px 6px 0 0;
      border-radius: 6px 6px 0 0;
    }
    #sidenav > li:last-child > a {
      -webkit-border-radius: 0 0 6px 6px;
      -moz-border-radius: 0 0 6px 6px;
      border-radius: 0 0 6px 6px;
    }
    #sidenav > li > a {
      display: block;
      width: 210px \9;
      margin: 0 0 -1px;
      padding: 8px 14px;
      border: 1px solid #e5e5e5;
    }
    .observationcontrols {margin-top:10px;}
- content_for :extrajs do
  :javascript
    $('.observationcontrols').observationControls()
    $("#comment_body").textcompleteUsers( );
- content_for :extrahead do
  %meta{:property => "og:image", :content => html_attributize(@shareable_image_url)}
  %meta{:property => "og:description", :content => html_attributize(@shareable_description)}
  %meta{:name => "twitter:card", :content => "summary"}
  %meta{:name => "og:title", :content => html_attributize(@title)}
.container
  %ul.breadcrumb
    %li
      - if @trip.parent.is_a?(Project)
        = link_to t(:x_journal, :user => @trip.parent.title), project_journal_path(@trip.parent)
      - else
        = link_to possessive_noun(@trip.user, t(:journal).downcase), journal_by_login_path(@trip.user.login)
    %li.active
      = link_to @trip.title, @trip
      - if @trip.is_a?(Trip)
        = surround '(', ')' do
          =t :trip
    %li.pull-right.prevnext
      - if @prev
        = link_to @prev do
          %i.fa.fa-chevron-left
          = truncate @prev.title
      - if @next
        = '|' if @prev
        = link_to @next do
          = truncate @next.title
          %i.fa.fa-chevron-right
  .row.upstacked
    .col-md-3
      %ul#sidenav.sidenav.nav.nav-list{:data => {:spy => "affix"}}
        %li= link_to t(:summary), "#summary"
        - unless @trip.body.blank?
          %li= link_to t(:description), "#description"
        - unless @trip.observations.blank?
          %li= link_to t(:observations), "#observations"
        - if @trip.is_a?(Trip)
          %li= link_to t(:check_list), "#check_list"
        %li= link_to t(:comments), "#comments"
    .col-md-9
      %section{:id => "summary"}
        - if @trip.editable_by?(current_user)
          .btn-group.pull-right
            = link_to @trip.is_a?(Trip) ? edit_trip_path(@trip) : edit_post_path(@trip), :class => "btn btn-default" do
              %i.fa.fa-edit
              = t(:edit)
        %h1= @title
        - if @trip.is_a?(Trip)
          .subtitle.text-muted.lead
            = l(@trip.start_time, :format => :long) if @trip.start_time
            \-
            = l(@trip.stop_time, :format => :long) if @trip.start_time

      - unless @trip.body.blank?
        %section.stacked.post{:id => "description"}
          = formatted_user_text(@trip.body, :tags => Post::ALLOWED_TAGS, :attributes => Post::ALLOWED_ATTRIBUTES)
          .small.text-muted.stacked
            =t :posted_by
            = succeed ',' do
              = user_image @trip.user, :size => "mini", :class => "img-rounded"
              = link_to_user @trip.user
            =l @trip.published_at, :format => :long if @trip.published?
      - unless @trip.observations.blank?
        %section{:id => "observations"}
          .observationcontrols.pull-right
          %h2=t :observations
          .observations.medium.grid
            - compact do
              = render :partial => "observations/cached_component", :collection => @trip.observations
          - if @trip.is_a?(Trip)
            .text-muted
              :ruby
                obs_params = {
                  :d1 => @trip.start_time.iso8601,
                  :d2 => @trip.stop_time.iso8601,
                  :user_id => @trip.user_id
                }
                obs_params[:place_id] = @trip.place_id unless @trip.place_id.blank?
              = link_to observations_url(obs_params), :class => "readmore" do
                View observations made between 
                =l @trip.start_time, :format => :short
                =t :and
                =l @trip.stop_time, :format => :short
      - if @trip.is_a?(Trip)
        %section{:id => "check_list"}
          %h2=t :check_list
          - if @trip_taxa.blank?
            .text-muted.nocontent=t :no_taxa_listed
          - else
            .row
              .col-xs-6
                %h4 Observed
                - if @trip.trip_purposes.blank?
                  %ul.taxon_links.plain
                    - for trip_taxon in @trip_taxa_observed
                      %li
                        = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
                - else
                  - for trip_purpose in @trip.trip_purposes
                    %h5
                      = trip_purpose.resource.default_name.name
                      - if trip_purpose.complete?
                        .label.label-success{data: {tip: "Complete list of taxa observed. Taxa not on this list were not observed."}}=t :complete
                    %ul.taxon_links.plain
                      - for trip_taxon in @trip_taxa_observed
                        - if trip_taxon.ancestor_ids.include?(trip_purpose.resource_id)
                          %li
                            = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
                  - unless @trip_taxa_untargeted.blank?
                    %h5 Everything else
                    %ul.taxon_links.plain
                      - for trip_taxon in @trip_taxa_untargeted
                        %li
                          = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
              .col-xs-6
                %h4 Sought but not found
                %ul.taxon_links.plain
                  - for trip_taxon in @trip_taxa_unobserved
                    %li
                      = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
      %section{:id => "comments"}
        - if @trip.published_at
          = render :partial => 'comments/comments', :locals => { :parent => @trip, :header_tag => :h2 }
        - else
          = render :partial => 'comments/comments', :locals => { :parent => @trip, :header_tag => :h2, :hide_form => true }
        .upstacked
          = render :partial => "shared/flagging", :locals => { :instance => @post }
<commit_msg>Layout fix for menu on posts.<commit_after>- content_for :title do
  = @title = @trip.title
- content_for :extracss do
  :css
    .observations.medium.grid .observation, .observations.medium.grid .photos, .observations.medium.grid .icon {
      width: 170px;
      height: 170px;
    }
    #sidenav {
      width: 175px;
      padding: 0;
      background-color: #fff;
    }
    @media (min-width: 992px) {
      #sidenav {
        width: 210px;
      }
    }
    @media (min-width: 1200px) {
      #sidenav {
        width: 275px;
      }
    }
    #sidenav > li:first-child > a {
      -webkit-border-radius: 6px 6px 0 0;
      -moz-border-radius: 6px 6px 0 0;
      border-radius: 6px 6px 0 0;
    }
    #sidenav > li:last-child > a {
      -webkit-border-radius: 0 0 6px 6px;
      -moz-border-radius: 0 0 6px 6px;
      border-radius: 0 0 6px 6px;
    }
    #sidenav > li > a {
      display: block;
      width: 210px \9;
      margin: 0 0 -1px;
      padding: 8px 14px;
      border: 1px solid #e5e5e5;
    }
    .observationcontrols {margin-top:10px;}
- content_for :extrajs do
  :javascript
    $('.observationcontrols').observationControls()
    $("#comment_body").textcompleteUsers( );
- content_for :extrahead do
  %meta{:property => "og:image", :content => html_attributize(@shareable_image_url)}
  %meta{:property => "og:description", :content => html_attributize(@shareable_description)}
  %meta{:name => "twitter:card", :content => "summary"}
  %meta{:name => "og:title", :content => html_attributize(@title)}
.container
  %ul.breadcrumb
    %li
      - if @trip.parent.is_a?(Project)
        = link_to t(:x_journal, :user => @trip.parent.title), project_journal_path(@trip.parent)
      - else
        = link_to possessive_noun(@trip.user, t(:journal).downcase), journal_by_login_path(@trip.user.login)
    %li.active
      = link_to @trip.title, @trip
      - if @trip.is_a?(Trip)
        = surround '(', ')' do
          =t :trip
    %li.pull-right.prevnext
      - if @prev
        = link_to @prev do
          %i.fa.fa-chevron-left
          = truncate @prev.title
      - if @next
        = '|' if @prev
        = link_to @next do
          = truncate @next.title
          %i.fa.fa-chevron-right
  .row.upstacked
    .col-xs-3
      %ul#sidenav.sidenav.nav.nav-list{:data => {:spy => "affix"}}
        %li= link_to t(:summary), "#summary"
        - unless @trip.body.blank?
          %li= link_to t(:description), "#description"
        - unless @trip.observations.blank?
          %li= link_to t(:observations), "#observations"
        - if @trip.is_a?(Trip)
          %li= link_to t(:check_list), "#check_list"
        %li= link_to t(:comments), "#comments"
    .col-xs-9
      %section{:id => "summary"}
        - if @trip.editable_by?(current_user)
          .btn-group.pull-right
            = link_to @trip.is_a?(Trip) ? edit_trip_path(@trip) : edit_post_path(@trip), :class => "btn btn-default" do
              %i.fa.fa-edit
              = t(:edit)
        %h1= @title
        - if @trip.is_a?(Trip)
          .subtitle.text-muted.lead
            = l(@trip.start_time, :format => :long) if @trip.start_time
            \-
            = l(@trip.stop_time, :format => :long) if @trip.start_time

      - unless @trip.body.blank?
        %section.stacked.post{:id => "description"}
          = formatted_user_text(@trip.body, :tags => Post::ALLOWED_TAGS, :attributes => Post::ALLOWED_ATTRIBUTES)
          .small.text-muted.stacked
            =t :posted_by
            = succeed ',' do
              = user_image @trip.user, :size => "mini", :class => "img-rounded"
              = link_to_user @trip.user
            =l @trip.published_at, :format => :long if @trip.published?
      - unless @trip.observations.blank?
        %section{:id => "observations"}
          .observationcontrols.pull-right
          %h2=t :observations
          .observations.medium.grid
            - compact do
              = render :partial => "observations/cached_component", :collection => @trip.observations
          - if @trip.is_a?(Trip)
            .text-muted
              :ruby
                obs_params = {
                  :d1 => @trip.start_time.iso8601,
                  :d2 => @trip.stop_time.iso8601,
                  :user_id => @trip.user_id
                }
                obs_params[:place_id] = @trip.place_id unless @trip.place_id.blank?
              = link_to observations_url(obs_params), :class => "readmore" do
                View observations made between 
                =l @trip.start_time, :format => :short
                =t :and
                =l @trip.stop_time, :format => :short
      - if @trip.is_a?(Trip)
        %section{:id => "check_list"}
          %h2=t :check_list
          - if @trip_taxa.blank?
            .text-muted.nocontent=t :no_taxa_listed
          - else
            .row
              .col-xs-6
                %h4 Observed
                - if @trip.trip_purposes.blank?
                  %ul.taxon_links.plain
                    - for trip_taxon in @trip_taxa_observed
                      %li
                        = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
                - else
                  - for trip_purpose in @trip.trip_purposes
                    %h5
                      = trip_purpose.resource.default_name.name
                      - if trip_purpose.complete?
                        .label.label-success{data: {tip: "Complete list of taxa observed. Taxa not on this list were not observed."}}=t :complete
                    %ul.taxon_links.plain
                      - for trip_taxon in @trip_taxa_observed
                        - if trip_taxon.ancestor_ids.include?(trip_purpose.resource_id)
                          %li
                            = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
                  - unless @trip_taxa_untargeted.blank?
                    %h5 Everything else
                    %ul.taxon_links.plain
                      - for trip_taxon in @trip_taxa_untargeted
                        %li
                          = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
              .col-xs-6
                %h4 Sought but not found
                %ul.taxon_links.plain
                  - for trip_taxon in @trip_taxa_unobserved
                    %li
                      = render "shared/taxon", :taxon => trip_taxon.taxon, :link_url => trip_taxon.taxon
      %section{:id => "comments"}
        - if @trip.published_at
          = render :partial => 'comments/comments', :locals => { :parent => @trip, :header_tag => :h2 }
        - else
          = render :partial => 'comments/comments', :locals => { :parent => @trip, :header_tag => :h2, :hide_form => true }
        .upstacked
          = render :partial => "shared/flagging", :locals => { :instance => @post }

{'fraction_non_alphanumeric': 0.13084180501718715, 'fraction_numerical': 0.011628757405104951, 'mean_word_length': 1.752969599355748, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1184249', 'n_tokens_mistral': 4663, 'n_tokens_neox': 4346, 'n_words': 867}