Sha256: 33c27069395d62219a5b1d84447ae9cd483cf209b6e3f9521980081b92dcf9bb

Contents?: true

Size: 1.78 KB

Versions: 2

Compression:

Stored size: 1.78 KB

Contents

.panel{:class => "panel-#{bootstrap_class_for_status(log.status)}"}
  .panel-heading
    - parents_of_log(log).each do |parent|
      = link_to(log.message, (request.fullpath.gsub(log.to_param, parent.to_param) rescue '#'))
      = ' > '
    %strong= log.message
    .pull-right
      = link_to_if(log.prev_log.present?, '< Prev', (request.fullpath.gsub(log.to_param, log.prev_log.try(:to_param).to_s))) { 'Prev' }
      = ' - '
      = link_to_if(log.next_log.present?, 'Next >', (request.fullpath.gsub(log.to_param, log.next_log.try(:to_param).to_s))) { 'Next' }

  .panel-body
    .row
      .col-lg-6
        %span.label{:class => "label-#{bootstrap_class_for_status(log.status)}"}= log.status
        &nbsp;
        = log.created_at.strftime("%Y-%m-%d %H:%M:%S")
        = '(' + time_ago_in_words(log.created_at) + ' ago)'

      .col-lg-6
        - if log.user.present?
          %strong User:
          &nbsp;
          = (log.user.to_s.starts_with?('#<User:0x') ? (log.user.email rescue log.user) : log.user)
        - if log.associated.present?
          %br
          %strong Regarding:
          &nbsp;
          - if log.associated.to_s.starts_with?('#<')
            = "#{log.associated.class.name} ##{log.associated.to_param}"
          - else
            = log.associated

    - log.details.each do |key, value|
      - next unless value.present?
      .row
        .col-lg-12
          %br
          %p
            %strong= "#{key.to_s.titleize}:"
          = format_log_details_value(value)

    - if log.logs.present?
      .row
        .col-lg-12
          %br
          %p
            %strong Additional Entries:
            = "this log contains #{log.logs_count} additional sub entries"
      - if log.datatable.present?
        %hr
        .row
          .col-lg-12= render_datatable log.datatable

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_logging-1.2.0 app/views/effective/logs/_log.html.haml
effective_logging-1.1.3 app/views/effective/logs/_log.html.haml