##// END OF EJS Templates
Introduce virtual MenuNodes (#15880)....
Introduce virtual MenuNodes (#15880). They are characterized by having a blank url. they will only be rendered if the user is authorized to see at least one of its children. they render as links which do nothing when clicked. Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15501 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14686:7467c145c03c
r15119:53710d80fc88
Show More
plugins.html.erb
63 lines | 2.5 KiB | text/plain | TextLexer
/ app / views / admin / plugins.html.erb
Jean-Philippe Lang
Adds missing html titles (#14517)....
r11820 <%= title l(:label_plugins) %>
Jean-Philippe Lang
Moves plugin list to its own administration menu item....
r2035
<% if @plugins.any? %>
Jean-Philippe Lang
Adds url and author_url plugin attributes (#2162)....
r2039 <table class="list plugins">
Jean-Philippe Lang
Adds plugin id attribute....
r2036 <% @plugins.each do |plugin| %>
Jean-Philippe Lang
Code cleanup: implement Plugin#to_param for generating routes....
r10766 <tr id="plugin-<%= plugin.id %>" class="<%= cycle('odd', 'even') %>">
Jean-Philippe Lang
Removed unneeded #h calls in views....
r13661 <td class="name"><span class="name"><%= plugin.name %></span>
<%= content_tag('span', plugin.description, :class => 'description') unless plugin.description.blank? %>
<%= content_tag('span', link_to(plugin.url, plugin.url), :class => 'url') unless plugin.url.blank? %>
Toshi MARUYAMA
replace tabs to spaces at app/views/admin/plugins.html.erb...
r7224 </td>
Jean-Philippe Lang
Removed unneeded #h calls in views....
r13661 <td class="author"><%= plugin.author_url.blank? ? plugin.author : link_to(plugin.author, plugin.author_url) %></td>
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 <td class="version"><span class="icon"><%= plugin.version %></span></td>
Jean-Philippe Lang
Code cleanup: implement Plugin#to_param for generating routes....
r10766 <td class="configure"><%= link_to(l(:button_configure), plugin_settings_path(plugin)) if plugin.configurable? %></td>
Jean-Philippe Lang
Moves plugin list to its own administration menu item....
r2035 </tr>
<% end %>
</table>
Jean-Philippe Lang
Missing closing tag (#3177)....
r12777 <p><a href="#" id="check-for-updates"><%= l(:label_check_for_updates) %></a></p>
Jean-Philippe Lang
Moves plugin list to its own administration menu item....
r2035 <% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767
<%= javascript_tag do %>
$(document).ready(function(){
$("#check-for-updates").click(function(e){
e.preventDefault();
$.ajax({
dataType: "jsonp",
Jean-Philippe Lang
Check plugins updates using https (#17722)....
r13632 url: "https://www.redmine.org/plugins/check_updates",
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 data: <%= raw_json plugin_data_for_updates(@plugins) %>,
timeout: 3000,
beforeSend: function(){
$('#ajax-indicator').show();
},
success: function(data){
$('#ajax-indicator').hide();
$("table.plugins td.version span").addClass("unknown");
$.each(data, function(plugin_id, plugin_data){
var s = $("tr#plugin-"+plugin_id+" td.version span");
Jean-Philippe Lang
Replace uses of image_tag() with CSS (#21256)....
r14686 s.removeClass("icon-ok icon-warning unknown");
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 if (plugin_data.url) {
if (s.parent("a").length>0) {
s.unwrap();
}
s.addClass("found");
s.wrap($("<a></a>").attr("href", plugin_data.url).attr("target", "_blank"));
}
if (plugin_data.c == s.text()) {
Jean-Philippe Lang
Replace uses of image_tag() with CSS (#21256)....
r14686 s.addClass("icon-ok");
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 } else if (plugin_data.c) {
s.addClass("icon-warning");
Jean-Philippe Lang
Adds strings to locales (#3177)....
r12768 s.attr("title", "<%= escape_javascript l(:label_latest_compatible_version) %>: "+plugin_data.c);
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 }
});
Jean-Philippe Lang
Adds strings to locales (#3177)....
r12769 $("table.plugins td.version span.unknown").addClass("icon-help").attr("title", "<%= escape_javascript l(:label_unknown_plugin) %>");
Jean-Philippe Lang
Adds "Check for updates" for installed plugins (#3177)....
r12767 },
error: function(){
$('#ajax-indicator').hide();
alert("Unable to retrieve plugin informations from www.redmine.org");
}
});
});
});
<% end if @plugins.any? %>