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