forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html.erb
More file actions
72 lines (63 loc) · 2.99 KB
/
Copy pathindex.html.erb
File metadata and controls
72 lines (63 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<%
# Copyright (C) 2011 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>
<% add_crumb t('crumbs.users', "Users") %>
<% @active_tab = "users" %>
<% content_for :page_title do %>
<% if @query %>
<%= t('search_for_user', 'User Search results for %{user_name}', :user_name => (params[:user][:name] rescue '')) %>
<% else %>
<%= t('all_users', 'All Users') %>
<% end %>
<% end %>
<% content_for :right_side do %>
<div class="rs-margin-bottom">
<a href="<%= context_url(@context, :context_groups_url) %>" class="btn button-sidebar-wide user_groups"><i class="icon-group"></i> <%= t('buttons.user_groups', 'View User Groups') %></a>
<% if service_enabled?(:avatars) %>
<a href="<%= context_url(@context, :context_avatars_url) %>" class="btn button-sidebar-wide manage_profile_pictures"><i class="icon-student-view"></i> <%= t('buttons.manage_profile_pictures', 'Manage Profile Pictures') %></a>
<% end %>
</div>
<% if @enrollment_terms.size > 1 %>
<h2><%= t('titles.choose_term', 'Choose Term') %></h2>
<div class="rs-margin-bottom">
<label for="enrollment_term"><%= before_label('show_users_for_term', 'Show users with enrollments in the term') %></label><br />
<%= form_tag(account_users_path, :method => :get) do %>
<input name="focus" type="hidden" value="enrollment_term_id"/>
<%= render :partial => 'shared/enrollment_term_select', :locals => { :terms => @enrollment_terms, :selected_id => params[:enrollment_term_id] && params[:enrollment_term_id].to_i } %>
<% end %>
</div>
<% end %>
<%= render :partial => 'shared/accounts_right_side_shared' %>
<%= render :partial => 'accounts/add_course_or_user', :locals => {:hide_add_course => true} %>
<% end %>
<% if @query %>
<h1><%= t('titles.search_results', 'Search results for "%{search_term}"', :search_term => (params[:user][:name] rescue '')) %></h1>
<%= t('no_results_found', "No Results Found") if @users.empty? %>
<% else %>
<h1><%= t('titles.all_users', 'All Users') %></h1>
<% end %>
<%= will_paginate(@users, :style=>"margin-bottom: 1em;") %>
<ul class="users">
<% @users.each do |user| %>
<li id="user_<%= user.id %>" class="user">
<%= link_to(user.last_name_first_or_unnamed, context_url(@context, :context_user_url, user)) %>
</li>
<% end %>
</ul>
<%= will_paginate(@users, :style=>"margin-top: 1em;") %>
<% js_bundle 'legacy/users_index' %>
<% js_bundle 'focus_helper' %>