Sha256: 7d5d39b2b7a926a6f9255652dad39fb23dad41841e85af56062283834e019c58

Contents?: true

Size: 522 Bytes

Versions: 12

Compression:

Stored size: 522 Bytes

Contents

% max_id_len = users.map { |u| u.id.size }.max
% max_name_len = users.map { |u| u.firstname.size + u.lastname.size + 1 }.max
% max_email_len = users.map { |u| u.mail? ? u.mail.size : 0 }.max
%
% if users.size > 1
<%= 'id'.ljust(max_id_len).yellow %> | <%= 'name'.center(max_name_len).yellow %> | <%= 'e-mail'.center(max_email_len).yellow + "\n" %>
% end
%
% users.each do |u|
%   name = u.firstname + ' ' + u.lastname
<%= u.id.ljust(max_id_len) %>   <%= name.ljust(max_name_len) %>   <%= "#{u.mail? && u.mail}\n" %>
% end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
redmine_cli-0.7.0 lib/assets/templates/en/user/find.erb
redmine_cli-0.6.1 lib/assets/templates/en/user/find.erb
redmine_cli-0.6.0 lib/assets/templates/en/user/find.erb
redmine_cli-0.5.1 lib/assets/templates/en/user/find.erb
redmine_cli-0.5.0 lib/assets/templates/en/user/find.erb
redmine_cli-0.4.1 lib/assets/templates/en/user/find.erb
redmine_cli-0.4.0 lib/assets/templates/en/user/find.erb
redmine_cli-0.3.1 lib/assets/templates/en/user/find.erb
redmine_cli-0.3.0 lib/assets/templates/en/user/find.erb
redmine_cli-0.2.2 lib/assets/templates/user/find.erb
redmine_cli-0.2.1 lib/assets/templates/user/find.erb
redmine_cli-0.2.0 lib/assets/templates/user/find.erb