Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.border-dotted { | ||
border-style: dotted !important; | ||
} | ||
|
||
.border-2 { | ||
border-width: 2px !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#search-results { | ||
.search-result { | ||
min-width: 22rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/api/app/views/webui2/webui/search/_request_bugowner_change_dialog.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.modal.fade#request-bugowner-change-modal{ tabindex: -1, role: 'dialog', aria: { labelledby: 'request-bugowner-change-modal-label', hidden: true } } | ||
.modal-dialog.modal-dialog-centered{ role: 'document' } | ||
.modal-content | ||
= form_tag(request_set_bugowner_request_path, method: :post) do | ||
.modal-header | ||
%h5.modal-title#request-bugowner-change-modal-label Submit Request to Change Bugowner | ||
.modal-body | ||
%p.font-italic | ||
A user or a group is required. | ||
.form-group | ||
= render partial: 'webui/autocomplete', locals: { html_id: 'user', label: 'User:', required: false, | ||
data: { source: autocomplete_users_path } } | ||
.form-group | ||
= render partial: 'webui/autocomplete', locals: { html_id: 'group', label: 'Group:', required: false, | ||
data: { source: autocomplete_groups_path } } | ||
.form-group | ||
For: | ||
- projects_and_packages.each do |project_and_package| | ||
:ruby | ||
project = project_and_package[:project] | ||
package = project_and_package[:package] | ||
tag = "#{project}/#{package}" | ||
|
||
- if projects_and_packages.length > 1 | ||
.custom-control.custom-checkbox | ||
= check_box_tag('project[]', tag, false, class: 'custom-control-input') | ||
= label_tag(project, tag, class: 'custom-control-label') | ||
- else | ||
.custom-control.custom-checkbox | ||
= check_box_tag('project', project, true, class: 'custom-control-input') | ||
= label_tag(project, tag, class: 'custom-control-label') | ||
= hidden_field_tag('package', package) | ||
.form-group | ||
= label_tag(:description, 'Description:') | ||
%abbr.text-danger{ title: 'required' } * | ||
~ text_area_tag(:description, nil, size: '40x3', class: 'form-control', required: true) | ||
|
||
.modal-footer | ||
= render partial: 'webui2/shared/dialog_action_buttons', locals: { submit_tag_text: 'Submit' } |
38 changes: 38 additions & 0 deletions
38
src/api/app/views/webui2/webui/search/_results_owner.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.mt-4#search-results | ||
%h4 Results: | ||
- results.each do |result| | ||
.search_result.mt-3 | ||
%h6 | ||
Responsible for | ||
#{project_or_package_link project: result.project, package: result.package, short: false} | ||
in #{result.rootproject} | ||
|
||
%ul.list-unstyled | ||
- users_and_groups = result.users.merge(result.groups) { |_role, user, group| user.concat(group) } | ||
- users_and_groups.each do |role, records| | ||
%li.mt-3 | ||
:ruby | ||
emails = records.map(&:email).reject(&:blank?).join(', ') | ||
= role.capitalize.pluralize | ||
- if emails.present? && User.session | ||
= mail_to(emails) do | ||
%i.far.fa-envelope.ml-1{ title: "Send email to #{role.pluralize(records.size)}" } | ||
.d-flex.flex-wrap.flex-column.flex-md-row | ||
- records.each do |record| | ||
.card.m-1.p-2.search-result | ||
.row.no-gutters | ||
.col-auto | ||
= link_to(user_or_group_show_path(record)) do | ||
= image_tag_for(record, size: 60, custom_class: 'align-self-center shadow-lg border border-secondary rounded border-2') | ||
.col | ||
.card-body.p-0.pl-2 | ||
%ul.list-unstyled | ||
%li{ title: record.name } | ||
= truncate(record.name, length: 40) | ||
- if record.is_a?(User) && record.realname.present? | ||
%li.small | ||
= record.login | ||
%li.float-right | ||
- if record.email.present? && User.session | ||
= mail_to(record.email) do | ||
%i.far.fa-envelope{ title: "Send email to #{record.class.name.downcase}" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters