fix
This commit is contained in:
parent
b5a6167202
commit
b6a896558e
5 changed files with 8 additions and 39 deletions
|
@ -581,7 +581,7 @@ export default class CUD extends Component {
|
|||
{selectedList && this.getFormValue(prefix + 'useSegmentation') &&
|
||||
<TableSelect id={prefix + 'segment'} withHeader dropdown dataUrl={`rest/segments-table/${selectedList}`} columns={segmentsColumns} selectionLabelIndex={1} />
|
||||
}
|
||||
<CheckBox id={prefix + "work_list_current_namespace"} label={t('namespace')} text={t('workWithCurrentNamespace')}/>
|
||||
<CheckBox id={prefix + "work_list_current_namespace"} label={t('namespaceFiltering')} text={t('workWithCurrentNamespace')}/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -759,7 +759,7 @@ export default class CUD extends Component {
|
|||
{!useNamespaceSendConfig &&
|
||||
<TableSelect id="send_configuration" label={t('sendConfiguration')} withHeader dropdown dataUrl={`rest/send-configurations-table`} columns={sendConfigurationsColumns} selectionLabelIndex={1} />
|
||||
}
|
||||
<CheckBox id="work_send_config_current_namespace" label={t('namespace')} text={t('workWithCurrentNamespace')}/>
|
||||
<CheckBox id="work_send_config_current_namespace" label={t('namespaceFiltering')} text={t('workWithCurrentNamespace')}/>
|
||||
|
||||
{sendSettings}
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ import {
|
|||
requiresAuthenticatedUser,
|
||||
Title,
|
||||
Toolbar,
|
||||
withPageHelpers,
|
||||
getNamespaceChooser
|
||||
withPageHelpers
|
||||
} from '../lib/page';
|
||||
import {
|
||||
withAsyncErrorHandler,
|
||||
|
@ -76,12 +75,8 @@ export default class List extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
|
||||
const t = this.props.t;
|
||||
var pathname = window.location.href;
|
||||
var url = new URL(pathname);
|
||||
var namespace = url.searchParams.get("namespace");
|
||||
|
||||
|
||||
const columns = [
|
||||
{ data: 1, title: t('name') },
|
||||
{ data: 2, title: t('id'), render: data => <code>{data}</code> },
|
||||
|
@ -113,7 +108,6 @@ export default class List extends Component {
|
|||
const status = data[5];
|
||||
const campaignSource = data[7];
|
||||
|
||||
|
||||
if (perms.includes('viewStats')) {
|
||||
actions.push({
|
||||
label: <Icon icon="envelope" title={t('status')}/>,
|
||||
|
@ -178,7 +172,6 @@ export default class List extends Component {
|
|||
return (
|
||||
<div>
|
||||
{tableRestActionDialogRender(this)}
|
||||
|
||||
<Toolbar>
|
||||
{this.state.createPermitted &&
|
||||
<ButtonDropdown buttonClassName="btn-primary" menuClassName="dropdown-menu-right" label={t('createCampaign')}>
|
||||
|
@ -189,19 +182,10 @@ export default class List extends Component {
|
|||
}
|
||||
</Toolbar>
|
||||
|
||||
<Toolbar>
|
||||
{getNamespaceChooser(t)}
|
||||
</Toolbar>
|
||||
|
||||
<Title>{t('campaigns')}</Title>
|
||||
{!namespace &&
|
||||
<Table ref={node => this.table = node} withHeader dataUrl="rest/campaigns-table" columns={columns} />
|
||||
}
|
||||
{!!namespace &&
|
||||
<Table ref={node => this.table = node} withHeader dataUrl={`rest/campaigns-namespace/${namespace}`} columns={columns} />
|
||||
}
|
||||
|
||||
<Table ref={node => this.table = node} withHeader dataUrl="rest/campaigns-table" columns={columns} />
|
||||
</div>
|
||||
);
|
||||
|
||||
}
|
||||
}
|
|
@ -699,20 +699,3 @@ export function getLanguageChooser(t) {
|
|||
return languageChooser;
|
||||
}
|
||||
|
||||
export function getNamespaceChooser(t) {
|
||||
|
||||
const namespaceOptions = [];
|
||||
namespaceOptions.push(
|
||||
<DropdownLink to={`/campaigns`}>{t('All')}</DropdownLink>,
|
||||
<DropdownLink to={`/campaigns?namespace=1`}>{t('Root')}</DropdownLink>
|
||||
)
|
||||
|
||||
|
||||
const namespaceChooser = (
|
||||
<ButtonDropdown buttonClassName="btn-primary" menuClassName="dropdown-menu-right" label={t('namespaceFilter')}>
|
||||
{namespaceOptions}
|
||||
</ButtonDropdown>
|
||||
);
|
||||
|
||||
return namespaceChooser;
|
||||
}
|
|
@ -148,6 +148,7 @@
|
|||
"description": "Description",
|
||||
"namespace": "Namespace",
|
||||
"namespace_plural": "Namespaces",
|
||||
"namespaceFiltering": "Namespace filtering",
|
||||
"remove": "Remove",
|
||||
"insertNewEntryBeforeThisOne": "Insert new entry before this one",
|
||||
"moveUp": "Move up",
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
"description": "Descripciçon",
|
||||
"namespace": "Espacio de nombres",
|
||||
"namespace_plural": "Espacios de nombres",
|
||||
"namespaceFiltering": "Filtrar espacio de nombres",
|
||||
"remove": "Eliminar",
|
||||
"insertNewEntryBeforeThisOne": "Insert new entry before this one",
|
||||
"moveUp": "Move up",
|
||||
|
|
Loading…
Reference in a new issue