/
show.html.haml
174 lines (169 loc) · 7.97 KB
/
show.html.haml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
- @pagetitle = "Home of #{@displayed_user}"
- @layouttype = 'custom'
- @crumb_list = [@pagetitle]
/ user
.grid_4.alpha.box.box-shadow#userinfo
/ avatar
= user_icon(@displayed_user, 200, 'home-avatar') if @displayed_user.email
/ info
%h1
%span#home-realname
= @displayed_user.realname
%br/
%span#home-username= @displayed_user.login if @displayed_user.login
/ mail
- unless User.current.is_nobody?
%p
= mail_to(@displayed_user.email, sprite_tag('email', title: 'Send mail to user'), title: 'Send mail to user')
= mail_to(@displayed_user.email, nil, title: 'Send mail to user')
/ groups
- gs = @displayed_user.groups.pluck(:title)
- unless gs.empty?
%p Member of the group
%ul
- gs.each do |group|
%li= link_to(group, controller: 'groups', action: 'show', title: group)
/ roles
- grs = @displayed_user.roles.global.pluck(:title)
- if grs.present?
%p Has the role
%ul
- grs.each do |role|
%li= role
/ edit
- if @is_displayed_user
%p
- if CONFIG['proxy_auth_mode'] == :on
- unless CONFIG['proxy_auth_account_page'].blank?
= link_to sprited_text('user_edit', 'Edit your account'), "#{CONFIG['proxy_auth_account_page']}"
%br/
- else
= link_to(sprited_text('user_edit', 'Edit your account'), { controller: 'user', action: 'save_dialog', user: User.current }, {id: 'save_dialog', remote: true})
%br/
- if @configuration['change_password'] && CONFIG['proxy_auth_mode'] != :on
= link_to(sprited_text('key', 'Change your password'), { controller: 'user', action: 'password_dialog', user: User.current }, {id: 'password_dialog', remote: true})
%br/
= link_to(sprited_text('email', 'Change your notifications'), user_notifications_path)
%br/
.grid_12.omega.box.box-shadow
#involved
.box-header.header-tabs
%ul
%li
%a{href: "#ipackages", title: "Packages that you are involved with"} Involved Packages
%li
%a{href: "#iprojects", title: "Projects that you are involved with"} Involved Projects
%li
%a{href: "#iowned", title: "Projects/Packages where you are responsible for the maintenance"} Owned Project/Packages
.tab#ipackages
- if @ipackages.length > 0
#ipackages-wrapper{ "data-url": url_for(controller: 'package', action: 'show', project: 'REPLACEPRJ', package: 'REPLACEPKG') }
- content_for :ready_function do
var ipackages = [ #{escape_nested_list(@ipackages)}];
renderPackagesProjectsTable({packages: ipackages, length: 10, name: 'ipackages-wrapper'});
- else
%p
%i
= @displayed_user.login
is not involved in any packages
.tab#iprojects
- if @iprojects.blank?
%p
%i
= @displayed_user.login
is not involved in any projects
- else
#projects-table-wrapper{"data-url" => "#{url_for(controller: 'project', action: 'show', project: 'REPLACEIT')}"}
- content_for :head_javascript do
var main_projects = [ #{escape_nested_list(@iprojects)} ];
var excl_projects = [];
- content_for :ready_function do
renderProjectsTable(length=10);
$('#excludefilter').change(renderProjectsTable);
.tab#iowned
- if @owned.blank?
%p
%i
= @displayed_user.login
is not involved in any projects
- else
#iowned-wrapper{ "data-url": url_for(controller: 'package', action: 'show', project: 'REPLACEPRJ', package: 'REPLACEPKG') }
- content_for :ready_function do
var iowned = [ #{escape_nested_list(@owned)} ];
renderPackagesProjectsTable({packages: iowned, length: 15, name: 'iowned-wrapper'});
.clear
- if @is_displayed_user
.grid_16.alpha.omega.box.box-shadow
#reviews
.box-header.header-tabs
%ul
%li
%a{href: "#reviews-in", title: "Requests that #{@displayed_user.login} has to review"} Incoming Reviews
= sprite_tag('reload', title: 'Reload', class: 'result_reload', data: { table: 'reviews_in_table' })
= image_tag('ajax-loader.gif', class: 'result_spinner hidden')
.tab#reviews-in
= render(partial: 'webui/shared/requests_table', locals: { id: 'reviews_in_table', source_url: user_requests_path(@displayed_user) })
.grid_16.alpha.omega.box.box-shadow
#requests
.box-header.header-tabs
%ul
%li
%a#requests-in-tab{href: "#requests-in", title: "Requests that #{@displayed_user.login} has to merge"} Incoming Requests
= sprite_tag('reload', title: 'Reload', class: 'result_reload', data: { table: 'requests_in_table' })
= image_tag('ajax-loader.gif', class: 'result_spinner hidden')
%li
%a#requests-out-tab{href: "#requests-out", title: "Requests that #{@displayed_user.login} has sent"} Outgoing Requests
= sprite_tag('reload', title: 'Reload', class: 'result_reload hidden', data: { table: 'requests_out_table' })
= image_tag('ajax-loader.gif', class: 'result_spinner hidden')
%li
%a#requests-declined-tab{href: "#requests-declined", title: "Requests from #{@displayed_user.login} that are declined"} Declined Requests
= sprite_tag('reload', title: 'Reload', class: 'result_reload hidden', data: { table: 'requests_declined_table' })
= image_tag('ajax-loader.gif', class: 'result_spinner hidden')
%li
%a#all-requests-tab{href: "#all-requests", title: "All Requests from #{@displayed_user.login}"} All Requests
= sprite_tag('reload', title: 'Reload', class: 'result_reload hidden', data: { table: 'all_requests_table' })
= image_tag('ajax-loader.gif', class: 'result_spinner hidden')
.tab#requests-in
= render(partial: 'webui/shared/requests_table', locals: { id: 'requests_in_table', source_url: user_requests_path(@displayed_user) })
.tab#requests-out
= render(partial: 'webui/shared/requests_table', locals: { id: 'requests_out_table', source_url: user_requests_path(@displayed_user) })
.tab#requests-declined
= render(partial: 'webui/shared/requests_table', locals: { id: 'requests_declined_table', source_url: user_requests_path(@displayed_user) })
.tab#all-requests
= render(partial: 'webui/shared/requests_table', locals: { id: 'all_requests_table', source_url: user_requests_path(@displayed_user) })
- if @patchinfos.present?
.grid_16.alpha.omega.box.box-shadow
#patchinfos
.box-header.header-tabs
%ul
%li
%a{href: "#patchinfos-in", title: "Requests that #{@displayed_user.login} has to merge"} Maintenance Requests
.tab#patchinfos-in
%table.compact#open-patchinfos-table{title: "Running Maintenance Updates"}
%thead
%tr
%th Project
%th Package
%th Issues
%th{style: "width: 1%"} Actions
%tbody
- @patchinfos.each do |pi|
%tr
- shortened_prj, shortened_pkg = elide_two(pi[:package][:project], pi[:package][:name], 60)
%td= link_to shortened_prj, controller: :project, action: :show, project: pi[:package][:project]
%td= link_to shortened_pkg, controller: :package, action: :show, project: pi[:package][:project], package: pi[:package][:name]
%td
- pi[:issues].each do |i|
= link_to i[:label], i[:url], title: i[:summary]
,
%td= link_to sprite_tag('monitor', title: 'Monitor'), action: :monitor, project: pi[:package][:project], pkgname: pi[:package][:name], controller: :project
= javascript_tag do
:plain
$(function() {
$('#open-patchinfos-table').dataTable();
});
- content_for :ready_function do
$( "#involved" ).tabs();
$( "#reviews" ).tabs();
$( "#requests" ).tabs();
$( "#patchinfos" ).tabs();