DEV: Update eslint-config-discourse, use prettier for hbs (#414)
This commit is contained in:
parent
4fe2ded608
commit
4070985316
|
@ -41,8 +41,8 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
yarn prettier -v
|
yarn prettier -v
|
||||||
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
if [ 0 -lt $(find assets admin/assets -type f \( -name "*.scss" -or -name "*.js" -or -name "*.es6" -or -name "*.hbs" \) 2> /dev/null | wc -l) ]; then
|
||||||
yarn prettier --list-different "assets/**/*.{scss,js,es6}"
|
yarn prettier --list-different "assets/**/*.{scss,js,es6,hbs}"
|
||||||
fi
|
fi
|
||||||
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
if [ 0 -lt $(find test -type f \( -name "*.js" -or -name "*.es6" \) 2> /dev/null | wc -l) ]; then
|
||||||
yarn prettier --list-different "test/**/*.{js,es6}"
|
yarn prettier --list-different "test/**/*.{js,es6}"
|
||||||
|
@ -50,7 +50,12 @@ jobs:
|
||||||
|
|
||||||
- name: Ember template lint
|
- name: Ember template lint
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts admin/assets/javascripts
|
run: yarn ember-template-lint --no-error-on-unmatched-pattern assets/javascripts
|
||||||
|
|
||||||
|
# Separated due to https://github.com/ember-template-lint/ember-template-lint/issues/2758
|
||||||
|
- name: Ember template lint (admin)
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
run: yarn ember-template-lint --no-error-on-unmatched-pattern admin/assets/javascripts
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="search-assigned-to">{{i18n "search.advanced.assigned.label"}}</label>
|
<label class="control-label" for="search-assigned-to">{{i18n
|
||||||
|
"search.advanced.assigned.label"
|
||||||
|
}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{email-group-user-chooser
|
{{email-group-user-chooser
|
||||||
value=searchedTerms.assigned
|
value=searchedTerms.assigned
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">{{i18n "discourse_assign.admin.groups.manage.interaction.assign"}}</label>
|
<label class="control-label">{{i18n
|
||||||
<label for="visiblity">{{i18n "discourse_assign.admin.groups.manage.interaction.assignable_levels.title"}}</label>
|
"discourse_assign.admin.groups.manage.interaction.assign"
|
||||||
|
}}</label>
|
||||||
|
<label for="visiblity">{{i18n
|
||||||
|
"discourse_assign.admin.groups.manage.interaction.assignable_levels.title"
|
||||||
|
}}</label>
|
||||||
|
|
||||||
{{combo-box
|
{{combo-box
|
||||||
name="alias"
|
name="alias"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{#if currentUser.can_assign}}
|
{{#if currentUser.can_assign}}
|
||||||
{{#link-to "userActivity.assigned"}}
|
{{#link-to "userActivity.assigned"}}
|
||||||
{{d-icon "user-plus"}} {{i18n "discourse_assign.assigned"}}
|
{{d-icon "user-plus"}}
|
||||||
|
{{i18n "discourse_assign.assigned"}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -1,13 +1,13 @@
|
||||||
{{!--
|
{{!
|
||||||
The `~` syntax strip spaces between the elements, making it produce
|
The `~` syntax strip spaces between the elements, making it produce
|
||||||
`<a class=topic-post-badges>Some text</a><span class=topic-post-badges>`,
|
`<a class=topic-post-badges>Some text</a><span class=topic-post-badges>`,
|
||||||
with no space between them.
|
with no space between them.
|
||||||
This causes the topic-post-badge to be considered the same word as "text"
|
This causes the topic-post-badge to be considered the same word as "text"
|
||||||
at the end of the link, preventing it from line wrapping onto its own line.
|
at the end of the link, preventing it from line wrapping onto its own line.
|
||||||
--}}
|
}}
|
||||||
{{#if bulkSelectEnabled}}
|
{{#if bulkSelectEnabled}}
|
||||||
<td class="bulk-select topic-list-data">
|
<td class="bulk-select topic-list-data">
|
||||||
<input type="checkbox" class="bulk-select">
|
<input type="checkbox" class="bulk-select" />
|
||||||
</td>
|
</td>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<td class="main-link clearfix topic-list-data" colspan="1">
|
<td class="main-link clearfix topic-list-data" colspan="1">
|
||||||
|
@ -21,7 +21,13 @@
|
||||||
{{~topic-featured-link topic}}
|
{{~topic-featured-link topic}}
|
||||||
{{~/if}}
|
{{~/if}}
|
||||||
{{~#if showTopicPostBadges}}
|
{{~#if showTopicPostBadges}}
|
||||||
{{~raw "topic-post-badges" unread=topic.unread unseen=topic.unseen url=topic.lastUnreadUrl newDotText=newDotText}}
|
{{~raw
|
||||||
|
"topic-post-badges"
|
||||||
|
unread=topic.unread
|
||||||
|
unseen=topic.unseen
|
||||||
|
url=topic.lastUnreadUrl
|
||||||
|
newDotText=newDotText
|
||||||
|
}}
|
||||||
{{~/if}}
|
{{~/if}}
|
||||||
</span>
|
</span>
|
||||||
<div class="link-bottom-line">
|
<div class="link-bottom-line">
|
||||||
|
@ -31,7 +37,13 @@
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
||||||
{{raw "list/action-list" topic=topic postNumbers=topic.liked_post_numbers className="likes" icon="heart"}}
|
{{raw
|
||||||
|
"list/action-list"
|
||||||
|
topic=topic
|
||||||
|
postNumbers=topic.liked_post_numbers
|
||||||
|
className="likes"
|
||||||
|
icon="heart"
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
{{#if expandPinned}}
|
{{#if expandPinned}}
|
||||||
{{raw "list/topic-excerpt" topic=topic}}
|
{{raw "list/topic-excerpt" topic=topic}}
|
||||||
|
@ -44,8 +56,16 @@
|
||||||
|
|
||||||
{{raw "list/posts-count-column" topic=topic}}
|
{{raw "list/posts-count-column" topic=topic}}
|
||||||
|
|
||||||
<td class="num views {{topic.viewsHeat}} topic-list-data">{{number topic.views numberKey="views_long"}}</td>
|
<td class="num views {{topic.viewsHeat}} topic-list-data">{{number
|
||||||
{{raw "list/activity-column" topic=topic class="num topic-list-data" tagName="td"}}
|
topic.views
|
||||||
|
numberKey="views_long"
|
||||||
|
}}</td>
|
||||||
|
{{raw
|
||||||
|
"list/activity-column"
|
||||||
|
topic=topic
|
||||||
|
class="num topic-list-data"
|
||||||
|
tagName="td"
|
||||||
|
}}
|
||||||
<td class="topic-list-data">
|
<td class="topic-list-data">
|
||||||
{{#if topic.assigned_to_user}}
|
{{#if topic.assigned_to_user}}
|
||||||
{{assign-actions-dropdown
|
{{assign-actions-dropdown
|
||||||
|
@ -63,9 +83,6 @@
|
||||||
reassign=reassign
|
reassign=reassign
|
||||||
}}
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{assign-actions-dropdown
|
{{assign-actions-dropdown topic=topic unassign=unassign}}
|
||||||
topic=topic
|
|
||||||
unassign=unassign
|
|
||||||
}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
|
@ -1,6 +1,7 @@
|
||||||
{{#unless skipHeader}}
|
{{#unless skipHeader}}
|
||||||
<thead class="topic-list-header assigned-topic-list-header">
|
<thead class="topic-list-header assigned-topic-list-header">
|
||||||
{{raw "topic-list-header"
|
{{raw
|
||||||
|
"topic-list-header"
|
||||||
canBulkSelect=canBulkSelect
|
canBulkSelect=canBulkSelect
|
||||||
canDoBulkActions=canDoBulkActions
|
canDoBulkActions=canDoBulkActions
|
||||||
toggleInTitle=toggleInTitle
|
toggleInTitle=toggleInTitle
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
{{#if showAvatar}}
|
{{#if showAvatar}}
|
||||||
{{#link-to "group.assigned.show" filter.username_lower (query-params order=order ascending=ascending search=search)}}
|
{{#link-to
|
||||||
|
"group.assigned.show"
|
||||||
|
filter.username_lower
|
||||||
|
(query-params order=order ascending=ascending search=search)
|
||||||
|
}}
|
||||||
<div class="assign-image">
|
<div class="assign-image">
|
||||||
<a href={{filter.userPath}} data-user-card={{filter.username}}>{{avatar filter imageSize="large"}}</a>
|
<a href={{filter.userPath}} data-user-card={{filter.username}}>{{avatar
|
||||||
|
filter
|
||||||
|
imageSize="large"
|
||||||
|
}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="assign-names">
|
<div class="assign-names">
|
||||||
|
@ -14,7 +21,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{else if groupName}}
|
{{else if groupName}}
|
||||||
{{#link-to "group.assigned.show" filter (query-params order=order ascending=ascending search=search)}}
|
{{#link-to
|
||||||
|
"group.assigned.show"
|
||||||
|
filter
|
||||||
|
(query-params order=order ascending=ascending search=search)
|
||||||
|
}}
|
||||||
<div class="assign-image">
|
<div class="assign-image">
|
||||||
{{d-icon "group-plus"}}
|
{{d-icon "group-plus"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +38,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#link-to "group.assigned.show" filter (query-params order=order ascending=ascending search=search)}}
|
{{#link-to
|
||||||
|
"group.assigned.show"
|
||||||
|
filter
|
||||||
|
(query-params order=order ascending=ascending search=search)
|
||||||
|
}}
|
||||||
<div class="assign-everyone">
|
<div class="assign-everyone">
|
||||||
{{i18n "discourse_assign.group_everyone"}}
|
{{i18n "discourse_assign.group_everyone"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{{#link-to "group.assigned"}}
|
{{#link-to "group.assigned"}}
|
||||||
{{d-icon "group-plus" class="glyph"}}{{i18n "discourse_assign.assigned"}} ({{group.assignment_count}})
|
{{d-icon "group-plus" class="glyph"}}{{i18n "discourse_assign.assigned"}}
|
||||||
|
({{group.assignment_count}})
|
||||||
{{/link-to}}
|
{{/link-to}}
|
|
@ -4,11 +4,13 @@
|
||||||
</span>
|
</span>
|
||||||
<div class="empty-state-body">
|
<div class="empty-state-body">
|
||||||
<p>
|
<p>
|
||||||
{{html-safe (i18n
|
{{html-safe
|
||||||
"user.no_assignments_body"
|
(i18n
|
||||||
icon=(d-icon "user-plus")
|
"user.no_assignments_body"
|
||||||
preferencesUrl=(get-url "/my/preferences/notifications")
|
icon=(d-icon "user-plus")
|
||||||
)}}
|
preferencesUrl=(get-url "/my/preferences/notifications")
|
||||||
|
)
|
||||||
|
}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -10,7 +10,11 @@
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
{{#load-more
|
||||||
|
class="paginated-topics-list"
|
||||||
|
selector=".paginated-topics-list .topic-list tr"
|
||||||
|
action=(action "loadMore")
|
||||||
|
}}
|
||||||
|
|
||||||
{{basic-assigned-topic-list
|
{{basic-assigned-topic-list
|
||||||
topicList=model
|
topicList=model
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<section class="user-secondary-navigation group-assignments">
|
<section class="user-secondary-navigation group-assignments">
|
||||||
{{#mobile-nav class="activity-nav" desktopClass="action-list activity-list nav-stacked"}}
|
{{#mobile-nav
|
||||||
|
class="activity-nav"
|
||||||
|
desktopClass="action-list activity-list nav-stacked"
|
||||||
|
}}
|
||||||
{{#if isDesktop}}
|
{{#if isDesktop}}
|
||||||
<div class="search-div">
|
<div class="search-div">
|
||||||
{{input
|
{{input
|
||||||
|
|
|
@ -12,10 +12,16 @@
|
||||||
<div class="topic-excerpt">
|
<div class="topic-excerpt">
|
||||||
{{html-safe topic.excerpt}}
|
{{html-safe topic.excerpt}}
|
||||||
{{#if topic.excerptTruncated}}
|
{{#if topic.excerptTruncated}}
|
||||||
{{#unless topic.canClearPin}}<a href={{topic.url}}>{{i18n "read_more"}}</a>{{/unless}}
|
{{#unless topic.canClearPin}}<a href={{topic.url}}>{{i18n
|
||||||
|
"read_more"
|
||||||
|
}}</a>{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if topic.canClearPin}}
|
{{#if topic.canClearPin}}
|
||||||
<a href {{action "clearPin" topic}} title={{i18n "topic.clear_pin.help"}}>{{i18n "topic.clear_pin.title"}}</a>
|
<a
|
||||||
|
href
|
||||||
|
{{action "clearPin" topic}}
|
||||||
|
title={{i18n "topic.clear_pin.help"}}
|
||||||
|
>{{i18n "topic.clear_pin.title"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -37,18 +43,23 @@
|
||||||
reassign=reassign
|
reassign=reassign
|
||||||
}}
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{assign-actions-dropdown
|
{{assign-actions-dropdown topic=topic unassign=unassign}}
|
||||||
topic=topic
|
|
||||||
unassign=unassign
|
|
||||||
}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<div class="topic-item-stats clearfix">
|
<div class="topic-item-stats clearfix">
|
||||||
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
{{discourse-tags topic mode="list" tagsForUser=tagsForUser}}
|
||||||
<div class="pull-right topic-list-num">
|
<div class="pull-right topic-list-num">
|
||||||
{{raw "list/activity-column" topic=topic tagName="div" class="num activity last"}}
|
{{raw
|
||||||
<a href={{topic.lastPostUrl}} title="{{i18n "last_post"}}: {{html-safe raw-date topic.bumped_at}}">{{topic.last_poster_username}}</a>
|
"list/activity-column"
|
||||||
|
topic=topic
|
||||||
|
tagName="div"
|
||||||
|
class="num activity last"
|
||||||
|
}}
|
||||||
|
<a
|
||||||
|
href={{topic.lastPostUrl}}
|
||||||
|
title="{{i18n 'last_post'}}: {{html-safe raw-date topic.bumped_at}}"
|
||||||
|
>{{topic.last_poster_username}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{#unless hideCategory}}
|
{{#unless hideCategory}}
|
||||||
<div class="category">
|
<div class="category">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{#d-modal-body class="assign"}}
|
{{#d-modal-body class="assign"}}
|
||||||
<div>
|
<div>
|
||||||
<div class="control-group {{if this.assigneeError "assignee-error"}}">
|
<div class="control-group {{if this.assigneeError 'assignee-error'}}">
|
||||||
<label>{{i18n "discourse_assign.assign_modal.assignee_label"}}</label>
|
<label>{{i18n "discourse_assign.assign_modal.assignee_label"}}</label>
|
||||||
{{email-group-user-chooser
|
{{email-group-user-chooser
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
|
@ -13,7 +13,9 @@
|
||||||
mobilePlacementStrategy="absolute"
|
mobilePlacementStrategy="absolute"
|
||||||
filterPlaceholder=placeholderKey
|
filterPlaceholder=placeholderKey
|
||||||
includeGroups=true
|
includeGroups=true
|
||||||
customSearchOptions=(hash assignableGroups=true defaultSearchResults=this.assignSuggestions)
|
customSearchOptions=(hash
|
||||||
|
assignableGroups=true defaultSearchResults=this.assignSuggestions
|
||||||
|
)
|
||||||
groupMembersOf=allowedGroups
|
groupMembersOf=allowedGroups
|
||||||
maximum=1
|
maximum=1
|
||||||
autofocus=autofocus
|
autofocus=autofocus
|
||||||
|
@ -22,7 +24,8 @@
|
||||||
}}
|
}}
|
||||||
{{#if this.assigneeError}}
|
{{#if this.assigneeError}}
|
||||||
<span class="error-label">
|
<span class="error-label">
|
||||||
{{d-icon "exclamation-triangle"}} {{i18n "discourse_assign.assign_modal.choose_assignee"}}
|
{{d-icon "exclamation-triangle"}}
|
||||||
|
{{i18n "discourse_assign.assign_modal.choose_assignee"}}
|
||||||
</span>
|
</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,16 +44,26 @@
|
||||||
|
|
||||||
<div class="control-group assign-status">
|
<div class="control-group assign-status">
|
||||||
<label>
|
<label>
|
||||||
{{i18n "discourse_assign.assign_modal.note_label"}} <span class="label-optional">{{i18n "discourse_assign.assign_modal.optional_label"}}</span>
|
{{i18n "discourse_assign.assign_modal.note_label"}} <span
|
||||||
|
class="label-optional"
|
||||||
|
>{{i18n "discourse_assign.assign_modal.optional_label"}}</span>
|
||||||
</label>
|
</label>
|
||||||
{{textarea id="assign-modal-note" value=model.note key-down=(action "handleTextAreaKeydown")}}
|
{{textarea
|
||||||
|
id="assign-modal-note"
|
||||||
|
value=model.note
|
||||||
|
key-down=(action "handleTextAreaKeydown")
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{d-button
|
{{d-button
|
||||||
label= (if model.reassign "discourse_assign.reassign.title" "discourse_assign.assign_modal.assign")
|
label=(if
|
||||||
|
model.reassign
|
||||||
|
"discourse_assign.reassign.title"
|
||||||
|
"discourse_assign.assign_modal.assign"
|
||||||
|
)
|
||||||
icon=inviteIcon
|
icon=inviteIcon
|
||||||
action=(action "assign")
|
action=(action "assign")
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
|
|
|
@ -17,7 +17,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#load-more class="paginated-topics-list" selector=".paginated-topics-list .topic-list tr" action=(action "loadMore")}}
|
{{#load-more
|
||||||
|
class="paginated-topics-list"
|
||||||
|
selector=".paginated-topics-list .topic-list tr"
|
||||||
|
action=(action "loadMore")
|
||||||
|
}}
|
||||||
{{basic-assigned-topic-list
|
{{basic-assigned-topic-list
|
||||||
topicList=model
|
topicList=model
|
||||||
hideCategory=hideCategory
|
hideCategory=hideCategory
|
||||||
|
|
Loading…
Reference in New Issue