You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2011/08/12 15:16:10 UTC
svn commit: r1157091 - in /incubator/deltacloud/trunk/server/views/docs:
collection.html.haml index.html.haml operation.html.haml
Author: mfojtik
Date: Fri Aug 12 13:16:10 2011
New Revision: 1157091
URL: http://svn.apache.org/viewvc?rev=1157091&view=rev
Log:
UI: Added jquery.mobile ui to autogenerated documentation
Modified:
incubator/deltacloud/trunk/server/views/docs/collection.html.haml
incubator/deltacloud/trunk/server/views/docs/index.html.haml
incubator/deltacloud/trunk/server/views/docs/operation.html.haml
Modified: incubator/deltacloud/trunk/server/views/docs/collection.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/docs/collection.html.haml?rev=1157091&r1=1157090&r2=1157091&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/docs/collection.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/docs/collection.html.haml Fri Aug 12 13:16:10 2011
@@ -1,37 +1,26 @@
-%h2
- = @collection.name.to_s.titlecase
+=header "Deltacloud API #{settings.version} documentation", :back => 'false'
+=subheader @collection.name.to_s.titlecase
-%p #{@collection.description}
-
-%br
-
-%h3 Operations:
-
-%table
- %thead
- %tr
- %th Name
- %th Description
- %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+ %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
+ %li{ :'data-role' => 'list-divider'}
+ %h3
+ Collection description:
+ %li
+ %br
+ %p{ :'data-role' => 'fieldcontain'}=@collection.description
+ %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
+ %h3 Operations:
- @operations.keys.sort_by { |k| k.to_s }.each do |operation|
- %tr
- %td{:style => "width:15em"}
- %a{:href => api_url_for("docs/#{@collection.name.to_s}/#{operation}")} #{operation}
- %td{:style => "width:10em"} #{@operations[operation].description}
-
-%h3 Features:
-
-%table
- %thead
- %tr
- %th Name
- %th Description
- %th Modified Operations
- %tbody
+ %li{ :'data-role' => 'list-divider'}
+ %a{:href => api_url_for("docs/#{@collection.name.to_s}/#{operation}"), :'data-ajax' => 'false'} #{operation}
+ %li
+ %br
+ %p=@operations[operation].description
+ %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
+ %h3 Defined features:
- @features.sort_by { |f| f.name.to_s }.each do |feature|
- %tr
- %td= feature.name
- %td= feature.description
- %td
- - feature.operations.each do |op|
- %a{:href => api_url_for("docs/#{@collection.name.to_s}/#{op.name}")} #{op.name}
+ %li{ :'data-role' => 'list-divider'}=feature.name
+ %li
+ %br
+ %p=feature.description
Modified: incubator/deltacloud/trunk/server/views/docs/index.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/docs/index.html.haml?rev=1157091&r1=1157090&r2=1157091&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/docs/index.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/docs/index.html.haml Fri Aug 12 13:16:10 2011
@@ -1,15 +1,11 @@
-%h2 API Documentation
+=header "Deltacloud API #{settings.version} documentation", :back => 'false'
+=subheader "Note: This documentation is autogenerated and thus not supported"
-%h3 Collections:
-
-%table
- %thead
- %tr
- %th Name
- %th Description
- %tbody
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+ %ul{ :'data-role' => :listview, :'data-inset' => 'true'}
- collections.keys.sort_by { |k| k.to_s }.each do |collection|
- %tr
- %td{:style => "width:15em"}
- %a{:href => api_url_for("docs/#{collection}")} #{collection}
- %td{:style => "width:10em"} #{collections[collection].description}
+ %li
+ %a{:href => api_url_for("docs/#{collection}"), :'data-ajax' => 'false'}
+ %h3=collection.to_s.capitalize.tr('_', ' ')
+ %p=collections[collection].description
+
Modified: incubator/deltacloud/trunk/server/views/docs/operation.html.haml
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/views/docs/operation.html.haml?rev=1157091&r1=1157090&r2=1157091&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/views/docs/operation.html.haml (original)
+++ incubator/deltacloud/trunk/server/views/docs/operation.html.haml Fri Aug 12 13:16:10 2011
@@ -1,43 +1,33 @@
-%h2
- = action_method(@operation.name, @collection.name).to_s.upcase
- = action_url
+=header "Deltacloud API #{settings.version} documentation", :back => 'false'
+=subheader "#{action_method(@operation.name, @collection.name).to_s.upcase} /api/#{@collection.name}/#{@operation.name}"
-%p
- #{@operation.description}
+%div{ :'data-role' => :content, :'data-theme' => 'c'}
+ %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
+ %li{ :'data-role' => 'list-divider'}
+ %h3
+ Description:
+ %li
+ %br
+ %p=@operation.description
-%br
-
-%h2 Parameters:
-
-
-%table
- %thead
- %tr
- %th Name
- %th Type
- %th Class
- %th Valid values
- %th Description
- %tbody
+ %ul{ :'data-role' => :listview , :'data-inset' => :true, :'data-divider-theme' => 'd'}
+ %li{ :'data-role' => 'list-divider', :'data-divider-theme' => 'a'}
+ %h3 Parameters:
- @operation.each_param do |p|
- %tr
- %td{:style => "width:15em"}
- %em #{p.name}
- %td{:style => "width:10em"} #{p.type}
- %td #{p.klass}
- %td{:style => "width:10em"} #{p.options.join(', ')}
- %td #{p.description}
+ %li{ :'data-role' => 'list-divider'}
+ =p.name
+ %span{ :class => 'ui-li-count'}
+ =[p.type,p.klass].join(',')
+ %li
+ %br
+ %p=p.description.empty? ? '<strong>FIXME:</strong> No description for this parameter' : p.description
- @features.sort { |a,b| a.name.to_s <=> b.name.to_s }.each do |f|
- %tr
- %th{:colspan => 4}
- Feature #{f.name}
- %th{:colspan => 1}
- %em= f.description
- f.decl.operation(@operation.name).each_param do |p|
- %tr
- %td{:style => "width:15em"}
- %em #{p.name}
- %td{:style => "width:10em"} #{p.type}
- %td #{p.klass}
- %td{:style => "width:10em"} #{p.options.join(', ')}
- %td #{p.description}
+ %li{ :'data-role' => 'list-divider'}
+ =p.name
+ %span{ :class => 'ui-li-count'}
+ =[p.type,p.klass].join(',')
+ %li
+ %br
+ %p=p.description.empty? ? '<strong>FIXME:</strong> No description for this parameter' : p.description
+