Chris@1464: <%= title l(:label_plugins) %> Chris@0: Chris@0: <% if @plugins.any? %> Chris@0: Chris@0: <% @plugins.each do |plugin| %> Chris@1464: Chris@1464: Chris@0: Chris@1517: Chris@1464: Chris@0: Chris@0: <% end %> Chris@0:
<%=h plugin.name %> Chris@0: <%= content_tag('span', h(plugin.description), :class => 'description') unless plugin.description.blank? %> Chris@909: <%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %> Chris@909: <%= plugin.author_url.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_url) %><%= plugin.version %><%= link_to(l(:button_configure), plugin_settings_path(plugin)) if plugin.configurable? %>
Chris@1517:

<%= l(:label_check_for_updates) %>

Chris@0: <% else %> Chris@0:

<%= l(:label_no_data) %>

Chris@0: <% end %> Chris@1517: Chris@1517: <%= javascript_tag do %> Chris@1517: $(document).ready(function(){ Chris@1517: $("#check-for-updates").click(function(e){ Chris@1517: e.preventDefault(); Chris@1517: $.ajax({ Chris@1517: dataType: "jsonp", Chris@1517: url: "http://www.redmine.org/plugins/check_updates", Chris@1517: data: <%= raw_json plugin_data_for_updates(@plugins) %>, Chris@1517: timeout: 3000, Chris@1517: beforeSend: function(){ Chris@1517: $('#ajax-indicator').show(); Chris@1517: }, Chris@1517: success: function(data){ Chris@1517: $('#ajax-indicator').hide(); Chris@1517: $("table.plugins td.version span").addClass("unknown"); Chris@1517: $.each(data, function(plugin_id, plugin_data){ Chris@1517: var s = $("tr#plugin-"+plugin_id+" td.version span"); Chris@1517: s.removeClass("icon-checked icon-warning unknown"); Chris@1517: if (plugin_data.url) { Chris@1517: if (s.parent("a").length>0) { Chris@1517: s.unwrap(); Chris@1517: } Chris@1517: s.addClass("found"); Chris@1517: s.wrap($("").attr("href", plugin_data.url).attr("target", "_blank")); Chris@1517: } Chris@1517: if (plugin_data.c == s.text()) { Chris@1517: s.addClass("icon-checked"); Chris@1517: } else if (plugin_data.c) { Chris@1517: s.addClass("icon-warning"); Chris@1517: s.attr("title", "<%= escape_javascript l(:label_latest_compatible_version) %>: "+plugin_data.c); Chris@1517: } Chris@1517: }); Chris@1517: $("table.plugins td.version span.unknown").addClass("icon-help").attr("title", "<%= escape_javascript l(:label_unknown_plugin) %>"); Chris@1517: }, Chris@1517: error: function(){ Chris@1517: $('#ajax-indicator').hide(); Chris@1517: alert("Unable to retrieve plugin informations from www.redmine.org"); Chris@1517: } Chris@1517: }); Chris@1517: }); Chris@1517: }); Chris@1517: <% end if @plugins.any? %>