Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
d07b9510
Commit
d07b9510
authored
Feb 21, 2020
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modtools: Show affiliations tab first
parent
a1a2b501
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
29 deletions
+28
-29
src/templates/moderator_tools_modal.js
src/templates/moderator_tools_modal.js
+28
-29
No files found.
src/templates/moderator_tools_modal.js
View file @
d07b9510
...
...
@@ -152,73 +152,72 @@ export default (o) => html`
<ul class="nav nav-pills justify-content-center">
<li role="presentation" class="nav-item">
<a class="nav-link active" id="
roles-tab" href="#roles-tabpanel" aria-controls="roles-tabpanel" role="tab" data-toggle="tab">Role
s</a>
<a class="nav-link active" id="
affiliations-tab" href="#affiliations-tabpanel" aria-controls="affiliations-tabpanel" role="tab" data-toggle="tab">Affiliation
s</a>
</li>
<li role="presentation" class="nav-item">
<a class="nav-link" id="
affiliations-tab" href="#affiliations-tabpanel" aria-controls="affiliations-tabpanel" role="tab" data-toggle="tab">Affiliation
s</a>
<a class="nav-link" id="
roles-tab" href="#roles-tabpanel" aria-controls="roles-tabpanel" role="tab" data-toggle="tab">Role
s</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane tab-pane--columns active" id="
roles-tabpanel" role="tabpanel" aria-labelledby="role
s-tab">
<form class="converse-form query-
role
">
<p class="helptext pb-3">
${
i18n_helptext_
role
}
</p>
<div class="tab-pane tab-pane--columns active" id="
affiliations-tabpanel" role="tabpanel" aria-labelledby="affiliation
s-tab">
<form class="converse-form query-
affiliation
">
<p class="helptext pb-3">
${
i18n_helptext_
affiliation
}
</p>
<div class="form-group">
<label for="role"><strong>
${
i18n_role
}
:</strong></label>
<label for="affiliation">
<strong>
${
i18n_affiliation
}
:</strong>
</label>
<div class="row">
<div class="col">
<select class="custom-select select-
role" name="role
">
${
o
.
roles
.
map
(
item
=>
role
_option
(
Object
.
assign
({
item
},
o
)))}
<select class="custom-select select-
affiliation" name="affiliation
">
${
o
.
affiliations
.
map
(
item
=>
affiliation
_option
(
Object
.
assign
({
item
},
o
)))}
</select>
</div>
<div class="col">
<input type="submit" class="btn btn-primary" name="users_with_
role
" value="
${
i18n_show_users
}
"/>
<input type="submit" class="btn btn-primary" name="users_with_
affiliation
" value="
${
i18n_show_users
}
"/>
</div>
</div>
<div class="row">
<div class="col pt-2"><p class="helptext pb-3">
${
get
RoleHelpText
(
o
.
role
)}
</p></div>
<div class="col pt-2"><p class="helptext pb-3">
${
get
AffiliationHelpText
(
o
.
affiliation
)}
</p></div>
</div>
</div>
</form>
<div class="scrollable-container">
<ul class="list-group list-group--users">
${
o
.
loading_users_with_role
?
html
`<li class="list-group-item">
${
spinner
()}
</li>`
:
''
}
${
(
o
.
users_with_role
&&
o
.
users_with_role
.
length
===
0
)
?
html
`<li class="list-group-item">
${
i18n_no_users_with_role
}
</li>`
:
''
}
${
(
o
.
users_with_role
||
[]).
map
(
item
=>
role_list_item
(
Object
.
assign
({
item
},
o
)))
}
${
(
o
.
loading_users_with_affiliation
)
?
html
`<li class="list-group-item">
${
spinner
()}
</li>`
:
''
}
${
(
Array
.
isArray
(
o
.
users_with_affiliation
)
&&
o
.
users_with_affiliation
.
length
===
0
)
?
html
`<li class="list-group-item">
${
i18n_no_users_with_aff
}
</li>`
:
''
}
${
(
o
.
users_with_affiliation
instanceof
Error
)
?
html
`<li class="list-group-item">
${
o
.
users_with_affiliation
.
message
}
</li>`
:
(
o
.
users_with_affiliation
||
[]).
map
(
item
=>
affiliation_list_item
(
Object
.
assign
({
item
},
o
)))
}
</ul>
</div>
</div>
<div class="tab-pane tab-pane--columns" id="affiliations-tabpanel" role="tabpanel" aria-labelledby="affiliations-tab">
<form class="converse-form query-affiliation">
<p class="helptext pb-3">
${
i18n_helptext_affiliation
}
</p>
<div class="tab-pane tab-pane--columns" id="roles-tabpanel" role="tabpanel" aria-labelledby="roles-tab">
<form class="converse-form query-role">
<p class="helptext pb-3">
${
i18n_helptext_role
}
</p>
<div class="form-group">
<label for="affiliation">
<strong>
${
i18n_affiliation
}
:</strong>
</label>
<label for="role"><strong>
${
i18n_role
}
:</strong></label>
<div class="row">
<div class="col">
<select class="custom-select select-
affiliation" name="affiliation
">
${
o
.
affiliations
.
map
(
item
=>
affiliation
_option
(
Object
.
assign
({
item
},
o
)))}
<select class="custom-select select-
role" name="role
">
${
o
.
roles
.
map
(
item
=>
role
_option
(
Object
.
assign
({
item
},
o
)))}
</select>
</div>
<div class="col">
<input type="submit" class="btn btn-primary" name="users_with_
affiliation
" value="
${
i18n_show_users
}
"/>
<input type="submit" class="btn btn-primary" name="users_with_
role
" value="
${
i18n_show_users
}
"/>
</div>
</div>
<div class="row">
<div class="col pt-2"><p class="helptext pb-3">
${
get
AffiliationHelpText
(
o
.
affiliation
)}
</p></div>
<div class="col pt-2"><p class="helptext pb-3">
${
get
RoleHelpText
(
o
.
role
)}
</p></div>
</div>
</div>
</form>
<div class="scrollable-container">
<ul class="list-group list-group--users">
${
(
o
.
loading_users_with_affiliation
)
?
html
`<li class="list-group-item">
${
spinner
()}
</li>`
:
''
}
${
(
Array
.
isArray
(
o
.
users_with_affiliation
)
&&
o
.
users_with_affiliation
.
length
===
0
)
?
html
`<li class="list-group-item">
${
i18n_no_users_with_aff
}
</li>`
:
''
}
${
(
o
.
users_with_affiliation
instanceof
Error
)
?
html
`<li class="list-group-item">
${
o
.
users_with_affiliation
.
message
}
</li>`
:
(
o
.
users_with_affiliation
||
[]).
map
(
item
=>
affiliation_list_item
(
Object
.
assign
({
item
},
o
)))
}
${
o
.
loading_users_with_role
?
html
`<li class="list-group-item">
${
spinner
()}
</li>`
:
''
}
${
(
o
.
users_with_role
&&
o
.
users_with_role
.
length
===
0
)
?
html
`<li class="list-group-item">
${
i18n_no_users_with_role
}
</li>`
:
''
}
${
(
o
.
users_with_role
||
[]).
map
(
item
=>
role_list_item
(
Object
.
assign
({
item
},
o
)))
}
</ul>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment