%html

%ead
  %syle{:type => 'text/css'}=css
%ody
  %l.breadcrumb.well{:style=>'margin-bottom:0;'}
    %i
      %{ :href => url('/docs') } Documentation
      %san.divider='/'
    %li
      %a{ :href => url(collection.docs_url)}=collection.collection_name.to_s.split('_').map {|p| p.capitalize }.join(' ')
      %san.divider='/'
    %li.active=operation.operation_name.to_s.capitalize
  .container
    %1.pull-right=operation.operation_name
    %lockquote.clearfix
      %{ :style => 'width : 400px;font-size:90%;padding-top:1em'}
        =operation.description

    %3 URL
    %able.table.table-bordered
      %body
        %r
          %d{:style => 'width:50px;'}
            %srong=operation.http_method.to_s.upcase
          %d
            %{ :href=> url(operation.full_path) }=operation.full_path

    %3 Parameters
    - if (operation.params + operation.features_params).empty?
      .alert
        This operation does not have any query parameters defined.
    - else
      %able.table.table-bordered
        %head
          %r.well
            %h Name
            %h Type
            %h Valid values
            %h Description
        %body
          - (operation.params + operation.features_params).each do |p|
            %r
              %d
                %m=p.name
                ="<sup style='color:red;'>*</sup>" if p.required?
              %d=p.klass.to_s.capitalize
              %d=p.values
              %d
                %sall=p.description
        %tfoot
          %tr
            %td{ :colspan => 4, :style => 'font-size:small;text-align:right;'}='<sup style="color:red;">*</sup> - required parameter'