mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
REFACTOR: Remove d-button block helpers (#11970)
This commit is contained in:
parent
2bc739eaa5
commit
c40c858233
@ -13,8 +13,6 @@
|
|||||||
|
|
||||||
<div class="admin-footer">
|
<div class="admin-footer">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{{#d-button action=(action "reset") disabled=resetDisabled class="btn-default"}}
|
{{d-button action=(action "reset") disabled=resetDisabled class="btn-default" label="admin.customize.email_style.reset"}}
|
||||||
{{i18n "admin.customize.email_style.reset"}}
|
|
||||||
{{/d-button}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
<div class="admin-footer">
|
<div class="admin-footer">
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{{#d-button action=(action "save") disabled=saveDisabled class="btn-primary"}}
|
{{d-button action=(action "save") disabled=saveDisabled class="btn-primary" translatedLabel=saveButtonText}}
|
||||||
{{saveButtonText}}
|
|
||||||
{{/d-button}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,13 +43,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{{#d-button
|
{{d-button
|
||||||
action=(action "save")
|
action=(action "save")
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
|
translatedLabel=saveButtonText
|
||||||
}}
|
}}
|
||||||
{{saveButtonText}}
|
|
||||||
{{/d-button}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
{{#if value}}
|
{{#if value}}
|
||||||
{{#d-button class="btn-default group-manage-logs-filter" action=(action "clearFilter") actionParam=type}}
|
{{d-button class="btn-default group-manage-logs-filter" action=(action "clearFilter") actionParam=type icon="times-circle" translatedLabel=(concat label ": " filterText)}}
|
||||||
<span>{{label}}</span>: {{filterText}}
|
|
||||||
{{d-icon "times-circle"}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -1,33 +1,23 @@
|
|||||||
<tr class="group-manage-logs-row">
|
<tr class="group-manage-logs-row">
|
||||||
<td>
|
<td>
|
||||||
{{#d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.action key="action")}}
|
{{d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.action key="action") translatedLabel=log.actionTitle}}
|
||||||
{{log.actionTitle}}
|
|
||||||
{{/d-button}}
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<span>{{avatar log.acting_user imageSize="tiny"}}</span>
|
<span>{{avatar log.acting_user imageSize="tiny"}}</span>
|
||||||
|
{{d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.acting_user.username key="acting_user") translatedLabel=log.acting_user.username}}
|
||||||
{{#d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.acting_user.username key="acting_user")}}
|
|
||||||
{{log.acting_user.username}}
|
|
||||||
{{/d-button}}
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{#if log.target_user}}
|
{{#if log.target_user}}
|
||||||
<span>{{avatar log.target_user imageSize="tiny"}}</span>
|
<span>{{avatar log.target_user imageSize="tiny"}}</span>
|
||||||
|
{{d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.target_user.username key="target_user") translatedLabel=log.target_user.username}}
|
||||||
{{#d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.target_user.username key="target_user")}}
|
|
||||||
{{log.target_user.username}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{{#if log.subject}}
|
{{#if log.subject}}
|
||||||
{{#d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.subject key="subject")}}
|
{{d-button class="btn-default" action=(action "filter") actionParam=(hash value=log.subject key="subject") translatedLabel=log.subject}}
|
||||||
{{log.subject}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
<div class="control-group buttons">
|
<div class="control-group buttons">
|
||||||
{{#d-button action=(action "save")
|
{{d-button action=(action "save")
|
||||||
disabled=saving
|
disabled=saving
|
||||||
class="btn btn-primary group-manage-save"
|
class="btn btn-primary group-manage-save"
|
||||||
|
translatedLabel=savingText
|
||||||
}}
|
}}
|
||||||
{{savingText}}
|
|
||||||
{{/d-button}}
|
|
||||||
|
|
||||||
{{#if saved}}
|
{{#if saved}}
|
||||||
<span>{{i18n "saved"}}</span>
|
<span>{{i18n "saved"}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -45,13 +45,12 @@
|
|||||||
{{i18n "ip_lookup.other_accounts"}}
|
{{i18n "ip_lookup.other_accounts"}}
|
||||||
<strong>{{totalOthersWithSameIP}}</strong>
|
<strong>{{totalOthersWithSameIP}}</strong>
|
||||||
{{#if other_accounts.length}}
|
{{#if other_accounts.length}}
|
||||||
{{#d-button
|
{{d-button
|
||||||
class="btn-danger pull-right"
|
class="btn-danger pull-right"
|
||||||
action=(action "deleteOtherAccounts")
|
action=(action "deleteOtherAccounts")
|
||||||
icon="exclamation-triangle"
|
icon="exclamation-triangle"
|
||||||
|
translatedLabel=(i18n "ip_lookup.delete_other_accounts" count=otherAccountsToDelete)
|
||||||
}}
|
}}
|
||||||
{{i18n "ip_lookup.delete_other_accounts" count=otherAccountsToDelete}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</dt>
|
</dt>
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
{{#each periods as |p|}}
|
{{#each periods as |p|}}
|
||||||
{{#d-button action=(action "changePeriod") class="btn-default" actionParam=p}}
|
{{d-button action=(action "changePeriod") class="btn-default" actionParam=p translatedLabel=(period-title p)}}
|
||||||
{{period-title p}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -75,9 +75,7 @@
|
|||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
{{#if showSignupLink}}
|
{{#if showSignupLink}}
|
||||||
{{#d-button class="btn-large" id="new-account-link" action=(route-action "showCreateAccount")}}
|
{{d-button class="btn-large" id="new-account-link" action=(route-action "showCreateAccount") label="create_account.title"}}
|
||||||
{{i18n "create_account.title"}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -182,9 +182,7 @@
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
{{#unless hasAuthOptions}}
|
{{#unless hasAuthOptions}}
|
||||||
{{#d-button class="btn-large" id="login-link" action=(route-action "showLogin") disabled=formSubmitted}}
|
{{d-button class="btn-large" id="login-link" action=(route-action "showLogin") disabled=formSubmitted label="log_in"}}
|
||||||
{{i18n "log_in"}}
|
|
||||||
{{/d-button}}
|
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
<div class="disclaimer">{{html-safe disclaimerHtml}}</div>
|
<div class="disclaimer">{{html-safe disclaimerHtml}}</div>
|
||||||
|
@ -110,7 +110,5 @@
|
|||||||
{{/d-modal-body}}
|
{{/d-modal-body}}
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{#d-button class="btn-primary" disabled=buttonDisabled action=(action "performMove")}}
|
{{d-button class="btn-primary" disabled=buttonDisabled action=(action "performMove") icon="sign-out-alt" translatedLabel=buttonTitle}}
|
||||||
{{d-icon "sign-out-alt"}} {{buttonTitle}}
|
|
||||||
{{/d-button}}
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,14 +43,13 @@
|
|||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{#d-button
|
{{d-button
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
action=(action "saveEmail")
|
action=(action "saveEmail")
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
|
translatedLabel=saveButtonText
|
||||||
}}
|
}}
|
||||||
{{saveButtonText}}
|
|
||||||
{{/d-button}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -24,15 +24,13 @@
|
|||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{#d-button
|
{{d-button
|
||||||
class="btn-primary"
|
class="btn-primary"
|
||||||
action=(action "changeUsername")
|
action=(action "changeUsername")
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled=saveDisabled
|
disabled=saveDisabled
|
||||||
|
translatedLabel=saveButtonText
|
||||||
}}
|
}}
|
||||||
{{saveButtonText}}
|
|
||||||
{{/d-button}}
|
|
||||||
|
|
||||||
{{#if saved}}{{i18n "saved"}}{{/if}}
|
{{#if saved}}{{i18n "saved"}}{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,3 +160,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.group-manage-logs-controls {
|
||||||
|
button {
|
||||||
|
.d-icon {
|
||||||
|
// flip the icon order for the remove button
|
||||||
|
order: 2;
|
||||||
|
margin: 0 0 0 0.45em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user