Skip to content
Permalink
Browse files

fixed the translations - #65784, added the content creation to associ…

…ated content
  • Loading branch information...
maximstrukov committed Feb 20, 2019
1 parent 499610a commit 38e5da2cbe65b65af507dcb525cc955ba0570272
@@ -21,6 +21,36 @@ var eZMailingContentSelectionModule = function () {
}
}), udwContainer);
});

$("button.js-novaezmailing-create-content", $app).click(function () {
var token = document.querySelector('meta[name="CSRF-Token"]').content;
var siteaccess = document.querySelector('meta[name="SiteAccess"]').content;
var udwContainer = $("#react-udw").get(0);
var parentLocationId = $(this).data('parent-location-id');
var title = $(this).find('span').html();
ReactDOM.render(React.createElement(eZ.modules.UniversalDiscovery, {
onCancel: function () {
ReactDOM.unmountComponentAtNode(udwContainer)
},
title: title,
multiple: false,
startingLocationId: 1,
canSelectContent: function (data) {
var contentDisabled = true;
if (data.item.pathString.split('/').includes(parentLocationId.toString()) && $('.c-choose-content-type__list .is-selected').length > 0) {
contentDisabled = false;
}
$('button.m-ud__action--create-content').prop("disabled", contentDisabled);
},
restInfo: {token: token, siteaccess: siteaccess},
visibleTabs: ['create'],
activeTab: 'create',
onConfirm: function (response) {
ReactDOM.unmountComponentAtNode(udwContainer);
location.reload();
}
}), udwContainer);
});
}

return {init: _init};
@@ -31,9 +31,7 @@ var eZMailingSubItemsModule = function () {
totalCount: subitemsList.ChildrenCount,
handleEditItem: function (content) {
var contentId = content._id;
var versionNumber = content.CurrentVersion.Version.VersionInfo.versionNo;
var langCode = content.mainLanguageCode;
alert("/admin/content/edit/draft/" + contentId + "/" + versionNumber + "/" + langCode);
},
generateLink: function (locationId) {
return window.Routing.generate('_ezpublishLocation', {locationId: locationId});
@@ -67,7 +67,7 @@ campaign.details.name: Name
campaign.details.sender: Sender
campaign.details.report_email: Report Email
campaign.details.siteaccess_limit: Siteaccess limit
campaign.details.mailing_lists: Mailing Lists
campaign.details.mailing_lists: Mailing List|Mailing Lists
campaign.details.associated_content: Associated content
campaign.edit.name: Name
campaign.edit.location: Location
@@ -135,6 +135,7 @@ mailing.mailing_tabs.confirm_sending: Confirm the sending
mailing.mailing_tabs.mailing_lists_count1: Campaign defines
mailing.mailing_tabs.mailing_lists_count2: Mailing Lists
mailing.mailing_tabs.mailing_list_reach: The reach of this Mailing is
mailing.mailing_tabs.create_content: Create Content
mailing.edit.mailing: Mailing
mailing_list.edit.name: Name
mailing_list.edit.title: Edit
@@ -50,7 +50,7 @@ dashboard.see_mailing_lists: Voir les listes de diffusion
dashboard.see_users: Voir les utilisateurs
dashboard.last_user_updated: Dernier utilisateur mis à jour
dashboard.last_broadcast: Dernières diffusions
campaign.tabs.campaign: Campagne|Campagnes
campaign.tabs.campaign: Campagne
campaign.tabs.associated_content: Contenu eZ associé
campaign.tabs.mailings: Envoi
campaign.tabs.create: Créer
@@ -135,6 +135,7 @@ mailing.mailing_tabs.confirm_sending: Confirmer l'envoi
mailing.mailing_tabs.mailing_lists_count1: La campagne définit
mailing.mailing_tabs.mailing_lists_count2: listes de diffusion
mailing.mailing_tabs.mailing_list_reach: La portée de cet envoi est de
mailing.mailing_tabs.create_content: Créer du contenu
mailing.edit.mailing: Envoi
mailing_list.edit.name: Nom
mailing_list.edit.title: Modifier
@@ -27,7 +27,7 @@
</tr>
{% endif %}
<tr>
<th>{{"campaign.details.mailing_lists"|trans}}</th>
<th>{{"campaign.details.mailing_lists"|transchoice(item.mailingLists|length, {})}}</th>
<td>
<div class="list-group">
{% for mailingList in item.mailingLists %}
@@ -78,6 +78,12 @@
</svg>
<span>{{"mailing.mailing_tabs.confirm"|trans}}</span>
</button>
<button type="button" class="btn btn-sm btn-primary js-novaezmailing-create-content" data-parent-location-id="{{ item.location.id }}">
<svg class="ez-icon">
<use xlink:href="/bundles/ezplatformadminui/img/ez-icons.svg#create"></use>
</svg>
<span>{{"mailing.mailing_tabs.create_content"|trans}}</span>
</button>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="novaezmailingmailingtestmodal">
<div class="modal-dialog" role="document">

0 comments on commit 38e5da2

Please sign in to comment.
You can’t perform that action at this time.