Sha256: 659bf9b1351e396cf873953a3b0d84590a2cb549bf62c2182c72444622c2a74e

Contents?: true

Size: 1.8 KB

Versions: 3

Compression:

Stored size: 1.8 KB

Contents

.panel.panel-default.card
  .panel-heading.card-header
    .row
      .col-md-8
        - parents_of_log(log).each do |parent|
          = link_to(log.message, request.fullpath.sub('/' + log.to_param, '/' + parent.to_param))
          = ' > '
        %p= log.message.html_safe

      .col-md-4.text-right
        - if log.prev_log
          = link_to 'Prev', request.fullpath.sub('/' + log.to_param, '/' + log.prev_log.to_param), class: 'btn btn-primary'

        - if log.next_log
          = link_to 'Next', request.fullpath.sub('/' + log.to_param, '/' + log.next_log.to_param), class: 'btn btn-primary'

  .panel-body.card-body
    .row
      .col-md-6
        %p
          - status_class = bootstrap_class_for_status(log.status)
          %span{:class => (defined?(EffectiveBootstrap) ? "badge badge-#{status_class}" : "label label-#{status_class}")}= log.status
          = log.created_at.strftime("%F %H:%M:%S")
          = '(' + time_ago_in_words(log.created_at) + ' ago)'

      .col-md-6
        - if log.user.present?
          %p
            %strong User:
            = (log.user.to_s.starts_with?('#<User:0x') ? (log.user.email rescue log.user) : log.user)
        - if (log.associated.present? rescue false)
          %p
            %strong Associated:
            - 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-md-12
          %p
            %strong= "#{key.to_s.titleize}:"
          = format_log_details_value(log, key)

    - if log.logs.present?
      %hr
      %p This log contains #{log.logs_count} additional sub entries:

      - unless log.datatable.nil?
        = render_datatable(log.datatable)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_logging-2.1.2 app/views/effective/logs/_log.html.haml
effective_logging-2.1.1 app/views/effective/logs/_log.html.haml
effective_logging-2.1.0 app/views/effective/logs/_log.html.haml