diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-05 20:45:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-05 20:45:04 +0000 |
commit | 96f83cc8f0f032554f771a59da22303cd473b878 (patch) | |
tree | 355a0d2ed653a5426c59ebf6a1fe65eba024b4d0 /app/views/users | |
parent | eabc04d8368824965d3ac8de3fa84502e9c05d38 (diff) | |
download | redmine-96f83cc8f0f032554f771a59da22303cd473b878.tar.gz redmine-96f83cc8f0f032554f771a59da22303cd473b878.zip |
trunk moved from /trunk/redmine to /trunk
git-svn-id: http://redmine.rubyforge.org/svn/trunk@67 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/_form.rhtml | 30 | ||||
-rw-r--r-- | app/views/users/add.rhtml | 6 | ||||
-rw-r--r-- | app/views/users/edit.rhtml | 6 | ||||
-rw-r--r-- | app/views/users/list.rhtml | 46 |
4 files changed, 88 insertions, 0 deletions
diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml new file mode 100644 index 000000000..089d4d23c --- /dev/null +++ b/app/views/users/_form.rhtml @@ -0,0 +1,30 @@ +<%= error_messages_for 'user' %> + +<!--[form:user]--> +<div class="box"> +<h3><%=l(:label_information_plural)%></h3> +<p><%= f.text_field :login, :required => true, :size => 25 %></p> +<p><%= f.text_field :firstname, :required => true %></p>
+<p><%= f.text_field :lastname, :required => true %></p> +<p><%= f.text_field :mail, :required => true %></p>
+<p><%= f.select :language, lang_options_for_select %></p>
+
+<% for @custom_value in @custom_values %> + <p><%= custom_field_tag_with_label @custom_value %></p> +<% end %>
+
+<p><%= f.check_box :admin %></p>
+<p><%= f.check_box :mail_notification %></p>
+</div> + +<div class="box"> +<h3><%=l(:label_authentication)%></h3> +<% unless @auth_sources.empty? %> +<p><%= f.select :auth_source_id, [[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] } %></p> +<% end %> +<p><label for="password"><%=l(:field_password)%><span class="required"> *</span></label> +<%= password_field_tag 'password', nil, :size => 25 %></p> +<p><label for="password_confirmation"><%=l(:field_password_confirmation)%><span class="required"> *</span></label> +<%= password_field_tag 'password_confirmation', nil, :size => 25 %></p> +</div> +<!--[eoform:user]--> diff --git a/app/views/users/add.rhtml b/app/views/users/add.rhtml new file mode 100644 index 000000000..d4c6a15f4 --- /dev/null +++ b/app/views/users/add.rhtml @@ -0,0 +1,6 @@ +<h2><%=l(:label_user_new)%></h2> + +<% labelled_tabular_form_for :user, @user, :url => { :action => "add" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_create) %> +<% end %>
\ No newline at end of file diff --git a/app/views/users/edit.rhtml b/app/views/users/edit.rhtml new file mode 100644 index 000000000..2332b70ad --- /dev/null +++ b/app/views/users/edit.rhtml @@ -0,0 +1,6 @@ +<h2><%=l(:label_user)%></h2> + +<% labelled_tabular_form_for :user, @user, :url => { :action => "edit" } do |f| %> +<%= render :partial => 'form', :locals => { :f => f } %> +<%= submit_tag l(:button_save) %> +<% end %> diff --git a/app/views/users/list.rhtml b/app/views/users/list.rhtml new file mode 100644 index 000000000..9f4438138 --- /dev/null +++ b/app/views/users/list.rhtml @@ -0,0 +1,46 @@ +<h2><%=l(:label_user_plural)%></h2> +
+<table class="listTableContent">
+<tr class="ListHead"> + <%= sort_header_tag('login', :caption => l(:field_login)) %>
+ <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
+ <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
+ <th><%=l(:field_mail)%></th>
+ <%= sort_header_tag('admin', :caption => l(:field_admin)) %>
+ <%= sort_header_tag('status', :caption => l(:field_status)) %>
+ <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
+ <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on)) %>
+ <th></th>
+</tr> +<% for user in @users %> + <tr class="<%= cycle("odd", "even") %>">
+ <td><%= link_to user.login, :action => 'edit', :id => user %></td>
+ <td><%= user.firstname %></td>
+ <td><%= user.lastname %></td>
+ <td><%= user.mail %></td>
+ <td align="center"><%= image_tag 'true' if user.admin? %></td>
+ <td align="center"><%= image_tag 'locked' if user.locked? %><%= image_tag 'user_new' if user.registered? %></td>
+ <td align="center"><%= format_time(user.created_on) %></td>
+ <td align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
+ <td align="center">
+ <%= start_form_tag :action => 'edit', :id => user %>
+ <% if user.locked? %>
+ <%= hidden_field_tag 'user[status]', User::STATUS_ACTIVE %>
+ <%= submit_tag l(:button_unlock), :class => "button-small" %>
+ <% else %>
+ <%= hidden_field_tag 'user[status]', User::STATUS_LOCKED %>
+ <%= submit_tag l(:button_lock), :class => "button-small" %>
+ <% end %>
+ <%= end_form_tag %>
+ </td> + </tr> +<% end %> +</table> +
+<p><%= pagination_links_full @user_pages %>
+[ <%= @user_pages.current.first_item %> - <%= @user_pages.current.last_item %> / <%= @user_count %> ]
+</p>
+ +<p> +<%= link_to '» ' + l(:label_user_new), :action => 'add' %> +</p>
\ No newline at end of file |