foreman_users 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@
25
25
  # GET /foreman_users/new.json
26
26
  def new
27
27
  @foreman_users_user = ForemanUsers::User.new
28
- 5.times { @foreman_users_user.foreman_users_groups.build}
28
+ #5.times { @foreman_users_user.foreman_users_groups.build}
29
29
  respond_to do |format|
30
30
  format.html # new.html.erb
31
31
  format.json { render json: @foreman_users_user }
@@ -2,4 +2,60 @@
2
2
  <% title_actions button_group(link_to "新增", new_user_path) %>
3
3
  <% end %>
4
4
 
5
- <%= render 'list', :foreman_users_users => @foreman_users_user, :header => @title || _("users") %>
5
+ <%= javascript "jquery.cookie" %>
6
+ <% title header ||= "" %>
7
+ <table class="table table-bordered table-striped table-condensed" >
8
+ <thead>
9
+ <tr>
10
+ <th class="hidden-tablet hidden-xs">name</th>
11
+ <th class="hidden-xs">ensure</th>
12
+ <th class="hidden-xs">gid</th>
13
+ <th class="hidden-tablet hidden-xs">groups</th>
14
+ <th class="hidden-tablet hidden-xs">home</th>
15
+ <th class="hidden-tablet hidden-xs">password</th>
16
+ <th class="hidden-tablet hidden-xs">password_max_age</th>
17
+ <th class="hidden-tablet hidden-xs">password_min_age</th>
18
+ <th class="hidden-tablet hidden-xs">shell</th>
19
+ <th class="hidden-tablet hidden-xs">uid</th>
20
+ <th>操作</th>
21
+ </tr>
22
+ </thead>
23
+ <tbody>
24
+ <% foreman_users_users.each do |user| %>
25
+ <tr>
26
+ <td class="hidden-tablet hidden-xs"><%= user.username %></td>
27
+ <td class="hidden-xs"><%= user.ensure %></td>
28
+ <td class="hidden-xs"><%= user.gid %></td>
29
+ <td class="hidden-tablet hidden-xs"><%= user.groups %></td>
30
+ <td class="hidden-tablet hidden-xs"><%= user.home %></td>
31
+ <td class="hidden-tablet hidden-xs"><%= user.password %></td>
32
+ <td class="hidden-tablet hidden-xs"><%= user.password_max_age %></td>
33
+ <td class="hidden-tablet hidden-xs"><%= user.password_min_age %></td>
34
+ <td class="hidden-tablet hidden-xs"><%= user.shell %></td>
35
+ <td class="hidden-tablet hidden-xs"><%= user.uid %></td>
36
+ <td>
37
+ <%= link_to '查看', user %>
38
+ <%= link_to '编辑', edit_foreman_users_user_path(user) %>
39
+ <%= link_to '删除', user, method: :delete, data: { confirm: 'Are you sure?' } %>
40
+ </td>
41
+ </tr>
42
+ <% end %>
43
+ </tbody>
44
+ </table>
45
+ <div id="confirmation-modal" class="modal fade">
46
+ <div class="modal-dialog">
47
+ <div class="modal-content">
48
+ <div class="modal-header">
49
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
50
+ <h4 class="modal-title"><%= _('Please Confirm') %></h4>
51
+ </div>
52
+ <div class="modal-body">
53
+ </div>
54
+ <div class="modal-footer">
55
+ <button type="button" class="btn btn-default" data-dismiss="modal"><%= _('Cancel') %></button>
56
+ <button type="button" class="btn btn-primary" onclick="submit_modal_form()"><%= _('Submit') %></button>
57
+ </div>
58
+ </div><!-- /.modal-content -->
59
+ </div><!-- /.modal-dialog -->
60
+ </div><!-- /.modal -->
61
+ <%= will_paginate_with_info foreman_users_users, :more => " - "+_("<b class='select_count'>0</b> selected") %>
@@ -1,3 +1,3 @@
1
1
  module ForemanUsers
2
- VERSION = '0.0.20'
2
+ VERSION = '0.0.21'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_users
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: