纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

  1. @using System.Web.Http
  2. @using System.Web.Http.Controllers
  3. @using System.Web.Http.Description
  4. @using ICSSoft.WebAPI.Areas.HelpPage
  5. @using ICSSoft.WebAPI.Areas.HelpPage.Models
  6. @model IGrouping<HttpControllerDescriptor, ApiDescription>
  7. @{
  8. var controllerDocumentation = ViewBag.DocumentationProvider != null ?
  9. ViewBag.DocumentationProvider.GetDocumentation(Model.Key) :
  10. null;
  11. }
  12. <h2 id="@Model.Key.ControllerName">@Model.Key.ControllerName</h2>
  13. @if (!String.IsNullOrEmpty(controllerDocumentation))
  14. {
  15. <p>@controllerDocumentation</p>
  16. }
  17. <table class="help-page-table">
  18. <thead>
  19. <tr><th>API</th><th>Description</th></tr>
  20. </thead>
  21. <tbody>
  22. @foreach (var api in Model)
  23. {
  24. <tr>
  25. <td class="api-name"><a href="@Url.Action("Api", "Help", new { apiId = api.GetFriendlyId() })">@api.HttpMethod.Method @api.RelativePath</a></td>
  26. <td class="api-documentation">
  27. @if (api.Documentation != null)
  28. {
  29. <p>@api.Documentation</p>
  30. }
  31. else
  32. {
  33. <p>No documentation available.</p>
  34. }
  35. </td>
  36. </tr>
  37. }
  38. </tbody>
  39. </table>