mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Display button to add a group when no group has been selected.
https://meta.discourse.org/t/new-button-on-groups/44546
This commit is contained in:
parent
eb6ef0311e
commit
0e41b1181a
@ -0,0 +1,11 @@
|
|||||||
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
|
|
||||||
|
export default Ember.Controller.extend({
|
||||||
|
adminGroupsType: Ember.inject.controller(),
|
||||||
|
sortedGroups: Ember.computed.alias("adminGroupsType.sortedGroups"),
|
||||||
|
|
||||||
|
@computed("sortedGroups")
|
||||||
|
messageKey(sortedGroups) {
|
||||||
|
return `admin.groups.${sortedGroups.length > 0 ? 'none_selected' : 'no_custom_groups'}`;
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,9 @@
|
|||||||
|
<div class="groups-type-index">
|
||||||
|
<p>{{i18n messageKey}}</p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{#link-to 'adminGroup' 'new' class="btn"}}
|
||||||
|
{{fa-icon "plus"}} {{i18n 'admin.groups.new'}}
|
||||||
|
{{/link-to}}
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -1,4 +1,5 @@
|
|||||||
<div class='row groups'>
|
<div class='row groups'>
|
||||||
|
{{#if sortedGroups}}
|
||||||
<div class='content-list span6'>
|
<div class='content-list span6'>
|
||||||
<h3>{{i18n 'admin.groups.edit'}}</h3>
|
<h3>{{i18n 'admin.groups.edit'}}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@ -22,8 +23,9 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class='content-editor'>
|
<div class="span13">
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -696,6 +696,10 @@ section.details {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
border-color: dark-light-choose(scale-color($primary, $lightness: 75%), scale-color($secondary, $lightness: 25%));
|
border-color: dark-light-choose(scale-color($primary, $lightness: 75%), scale-color($secondary, $lightness: 25%));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-list {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Customise area
|
// Customise area
|
||||||
|
@ -2568,6 +2568,8 @@ en:
|
|||||||
add_owners: Add owners
|
add_owners: Add owners
|
||||||
incoming_email: "Custom incoming email address"
|
incoming_email: "Custom incoming email address"
|
||||||
incoming_email_placeholder: "enter email address"
|
incoming_email_placeholder: "enter email address"
|
||||||
|
none_selected: "Select a group to get started"
|
||||||
|
no_custom_groups: "Create a new custom group"
|
||||||
|
|
||||||
api:
|
api:
|
||||||
generate_master: "Generate Master API Key"
|
generate_master: "Generate Master API Key"
|
||||||
|
Loading…
Reference in New Issue
Block a user