index.mustache 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <%
  2. # Copyright (C) 2011 - present Instructure, Inc.
  3. #
  4. # This file is part of Canvas.
  5. #
  6. # Canvas is free software: you can redistribute it and/or modify it under
  7. # the terms of the GNU Affero General Public License as published by the Free
  8. # Software Foundation, version 3 of the License.
  9. #
  10. # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
  11. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License along
  16. # with this program. If not, see <http://www.gnu.org/licenses/>.
  17. %>
  18. <% content_for :page_title do %><%= t :page_title, "Canvas Plugins" %><% end %>
  19. <%
  20. add_crumb t('#crumbs.plugins', "Plugins")
  21. %>
  22. <span class="small pull-right">
  23. Revision: <%= Canvas.revision || t('#canvas_revision_unknown', "Unknown") %>
  24. </span>
  25. <h2>
  26. <%= t :page_title, "Canvas Plugins" %>
  27. </h2>
  28. <% if @plugins.any? %>
  29. <table class="ic-Table ic-Table--striped">
  30. <thead>
  31. <tr>
  32. <th><%= t :name, "Name" %></th>
  33. <th><%= t :description, "Description" %></th>
  34. <th><%= t :tag, "Tag" %></th>
  35. <th><%= t :website, "Website" %></th>
  36. <th><%= t :author, "Author" %></th>
  37. <th><%= t :version, "Version" %></th>
  38. <th>&nbsp;</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <% @plugins.each do |plugin| %>
  43. <tr class="<%= cycle('odd', 'even') %>">
  44. <td class='name' nowrap="nowrap">
  45. <% if plugin.has_settings_partial? %>
  46. <a class="name" href="<%= plugin_path(plugin.id) %>"><%= h plugin.name %></a>
  47. <% else %>
  48. <span class="name"><%= h plugin.name %></span>
  49. <% end %>
  50. </td>
  51. <td class='description'><%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %></td>
  52. <td class='tag'><%= h plugin.tag %></td>
  53. <td class='website'>
  54. <% if plugin.website.present? %>
  55. <a href="<%= plugin.website %>" class="icon-link not_external"></a>
  56. <% end %>
  57. </td>
  58. <td class="author"><%= plugin.author_website.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_website) %></td>
  59. <td class="version"><%= h plugin.version %></td>
  60. <td class="configure"><%= link_to("", plugin_path(plugin.id), :class => "Button Button--small icon-settings") if plugin.has_settings_partial? %></td>
  61. </tr>
  62. <% end %>
  63. </tbody>
  64. </table>
  65. <% else %>
  66. <p class="nodata"><%= t :no_plugins, "There are no Canvas plugins installed" %></p>
  67. <% end %>