Bugfixes for managing the index item of a category.
parent
5b1150b8be
commit
2cd477eae2
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package org.librecms.ui.contentsections;
|
package org.librecms.ui.contentsections;
|
||||||
|
|
||||||
import com.arsdigita.cms.ui.authoring.multipartarticle.SectionPreviewPanel;
|
|
||||||
|
|
||||||
import org.libreccm.api.Identifier;
|
import org.libreccm.api.Identifier;
|
||||||
import org.libreccm.api.IdentifierParser;
|
import org.libreccm.api.IdentifierParser;
|
||||||
import org.libreccm.categorization.Categorization;
|
import org.libreccm.categorization.Categorization;
|
||||||
|
|
@ -33,8 +31,12 @@ import org.libreccm.core.CcmObject;
|
||||||
import org.libreccm.l10n.GlobalizationHelper;
|
import org.libreccm.l10n.GlobalizationHelper;
|
||||||
import org.libreccm.security.AuthorizationRequired;
|
import org.libreccm.security.AuthorizationRequired;
|
||||||
import org.libreccm.security.PermissionChecker;
|
import org.libreccm.security.PermissionChecker;
|
||||||
|
import org.librecms.contentsection.ContentItem;
|
||||||
|
import org.librecms.contentsection.ContentItemManager;
|
||||||
|
import org.librecms.contentsection.ContentItemVersion;
|
||||||
import org.librecms.contentsection.ContentSection;
|
import org.librecms.contentsection.ContentSection;
|
||||||
import org.librecms.contentsection.ContentSectionRepository;
|
import org.librecms.contentsection.ContentSectionRepository;
|
||||||
|
import org.librecms.contentsection.Folder;
|
||||||
import org.librecms.contentsection.privileges.AdminPrivileges;
|
import org.librecms.contentsection.privileges.AdminPrivileges;
|
||||||
|
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
|
|
@ -87,6 +89,12 @@ public class CategoriesController {
|
||||||
@Inject
|
@Inject
|
||||||
private CategorySystemModel categorySystemModel;
|
private CategorySystemModel categorySystemModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The {@link ContentItemManager}.
|
||||||
|
*/
|
||||||
|
@Inject
|
||||||
|
private ContentItemManager itemManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link ContentSectionModel} which stores the data of the current
|
* The {@link ContentSectionModel} which stores the data of the current
|
||||||
* content section for the view.
|
* content section for the view.
|
||||||
|
|
@ -824,6 +832,41 @@ public class CategoriesController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the index element of the root category.
|
||||||
|
*
|
||||||
|
* @param sectionIdentifier The identifier of the current
|
||||||
|
* {@link ContentSection}.
|
||||||
|
* @param context The mapping context of the assigned category
|
||||||
|
* system.
|
||||||
|
* @param indexElementUuid The UUID of the new index element.
|
||||||
|
*
|
||||||
|
* @return A redirect to the category page or the template for generating an
|
||||||
|
* error view.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(
|
||||||
|
"/{context}/categories/@index-element/{indexElementUuid}")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String setIndexElement(
|
||||||
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
|
@PathParam("context") final String context,
|
||||||
|
@PathParam("indexElementUuid") final String indexElementUuid
|
||||||
|
) {
|
||||||
|
final RetrieveResult<Category> result = retrieveCategory(
|
||||||
|
sectionIdentifier, context, "/"
|
||||||
|
);
|
||||||
|
|
||||||
|
return setIndexObject(
|
||||||
|
result,
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
context,
|
||||||
|
indexElementUuid
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the index element of a category.
|
* Sets the index element of a category.
|
||||||
*
|
*
|
||||||
|
|
@ -837,7 +880,7 @@ public class CategoriesController {
|
||||||
* @return A redirect to the category page or the template for generating an
|
* @return A redirect to the category page or the template for generating an
|
||||||
* error view.
|
* error view.
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path(
|
@Path(
|
||||||
"/{context}/categories/{categoryPath:(.+)?}/@index-element/{indexElementUuid}")
|
"/{context}/categories/{categoryPath:(.+)?}/@index-element/{indexElementUuid}")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
|
|
@ -851,41 +894,95 @@ public class CategoriesController {
|
||||||
final RetrieveResult<Category> result = retrieveCategory(
|
final RetrieveResult<Category> result = retrieveCategory(
|
||||||
sectionIdentifier, context, categoryPath
|
sectionIdentifier, context, categoryPath
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return setIndexObject(
|
||||||
|
result,
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
categoryPath,
|
||||||
|
indexElementUuid
|
||||||
|
);
|
||||||
|
// if (result.isSuccessful()) {
|
||||||
|
// final Category category = result.getResult();
|
||||||
|
// final Optional<Categorization> categorizationResult = category
|
||||||
|
// .getObjects()
|
||||||
|
// .stream()
|
||||||
|
// .filter(
|
||||||
|
// categorization -> Objects.equals(
|
||||||
|
// categorization.getUuid(), indexElementUuid
|
||||||
|
// )
|
||||||
|
// ).findAny();
|
||||||
|
// if (categorizationResult.isPresent()) {
|
||||||
|
// final CcmObject object = categorizationResult
|
||||||
|
// .get()
|
||||||
|
// .getCategorizedObject();
|
||||||
|
// try {
|
||||||
|
// categoryManager.setIndexObject(category, object);
|
||||||
|
// if (object instanceof ContentItem) {
|
||||||
|
// final ContentItem item = (ContentItem) object;
|
||||||
|
// final ContentItem live = itemManager.getDraftVersion(
|
||||||
|
// item,
|
||||||
|
// ContentItem.class
|
||||||
|
// );
|
||||||
|
// categoryManager.setIndexObject(category, live);
|
||||||
|
// }
|
||||||
|
// } catch (ObjectNotAssignedToCategoryException ex) {
|
||||||
|
// models.put("sectionIdentifier", sectionIdentifier);
|
||||||
|
// models.put("context", context);
|
||||||
|
// models.put("categoryPath", categoryPath);
|
||||||
|
// models.put("categorizationUuid", indexElementUuid);
|
||||||
|
// return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// models.put("sectionIdentifier", sectionIdentifier);
|
||||||
|
// models.put("context", context);
|
||||||
|
// models.put("categoryPath", categoryPath);
|
||||||
|
// models.put("categorizationUuid", indexElementUuid);
|
||||||
|
// return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
||||||
|
// }
|
||||||
|
// return String.format(
|
||||||
|
// "redirect:/%s/categorysystems/%s/categories/%s#objects-sections",
|
||||||
|
// sectionIdentifier,
|
||||||
|
// context,
|
||||||
|
// categoryPath
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// return result.getFailedResponseTemplate();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the index object of the root category. The object is still
|
||||||
|
* associated with the category after this, but no longer the index object
|
||||||
|
* of the category.
|
||||||
|
*
|
||||||
|
* @param sectionIdentifier The identifier of the current
|
||||||
|
* {@link ContentSection}.
|
||||||
|
* @param context The mapping context of the assigned category
|
||||||
|
* system.
|
||||||
|
*
|
||||||
|
* @return A redirect to the category page or the template for generating an
|
||||||
|
* error view.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/{context}/categories/@index-element/reset")
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String resetIndexElement(
|
||||||
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
|
@PathParam("context") final String context
|
||||||
|
) {
|
||||||
|
final RetrieveResult<Category> result = retrieveCategory(
|
||||||
|
sectionIdentifier, context, "/"
|
||||||
|
);
|
||||||
|
|
||||||
if (result.isSuccessful()) {
|
if (result.isSuccessful()) {
|
||||||
final Category category = result.getResult();
|
final Category category = result.getResult();
|
||||||
final Optional<Categorization> categorizationResult = category
|
categoryManager.resetIndexObject(category);
|
||||||
.getObjects()
|
|
||||||
.stream()
|
|
||||||
.filter(
|
|
||||||
categorization -> Objects.equals(
|
|
||||||
categorization.getUuid(), indexElementUuid
|
|
||||||
)
|
|
||||||
).findAny();
|
|
||||||
if (categorizationResult.isPresent()) {
|
|
||||||
final CcmObject object = categorizationResult
|
|
||||||
.get()
|
|
||||||
.getCategorizedObject();
|
|
||||||
try {
|
|
||||||
categoryManager.setIndexObject(category, object);
|
|
||||||
} catch (ObjectNotAssignedToCategoryException ex) {
|
|
||||||
models.put("sectionIdentifier", sectionIdentifier);
|
|
||||||
models.put("context", context);
|
|
||||||
models.put("categoryPath", categoryPath);
|
|
||||||
models.put("categorizationUuid", indexElementUuid);
|
|
||||||
return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
models.put("sectionIdentifier", sectionIdentifier);
|
|
||||||
models.put("context", context);
|
|
||||||
models.put("categoryPath", categoryPath);
|
|
||||||
models.put("categorizationUuid", indexElementUuid);
|
|
||||||
return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
|
||||||
}
|
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:/%s/categorysystems/%s/categories/%s#objects-sections",
|
"redirect:/%s/categorysystems/%s/categories/",
|
||||||
sectionIdentifier,
|
sectionIdentifier,
|
||||||
context,
|
context
|
||||||
categoryPath
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return result.getFailedResponseTemplate();
|
return result.getFailedResponseTemplate();
|
||||||
|
|
@ -893,7 +990,9 @@ public class CategoriesController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rests (removes) the index element of a category.
|
* Resets the index object of a category. The object is still associated
|
||||||
|
* with the category after this, but no longer the index object of the
|
||||||
|
* category.
|
||||||
*
|
*
|
||||||
* @param sectionIdentifier The identifier of the current
|
* @param sectionIdentifier The identifier of the current
|
||||||
* {@link ContentSection}.
|
* {@link ContentSection}.
|
||||||
|
|
@ -904,7 +1003,7 @@ public class CategoriesController {
|
||||||
* @return A redirect to the category page or the template for generating an
|
* @return A redirect to the category page or the template for generating an
|
||||||
* error view.
|
* error view.
|
||||||
*/
|
*/
|
||||||
@GET
|
@POST
|
||||||
@Path("/{context}/categories/{categoryPath:(.+)?}/@index-element/reset")
|
@Path("/{context}/categories/{categoryPath:(.+)?}/@index-element/reset")
|
||||||
@AuthorizationRequired
|
@AuthorizationRequired
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
|
@ -920,7 +1019,7 @@ public class CategoriesController {
|
||||||
final Category category = result.getResult();
|
final Category category = result.getResult();
|
||||||
categoryManager.resetIndexObject(category);
|
categoryManager.resetIndexObject(category);
|
||||||
return String.format(
|
return String.format(
|
||||||
"redirect:/%s/categorysystems/%s/categories/%s#objects-sections",
|
"redirect:/%s/categorysystems/%s/categories/%s",
|
||||||
sectionIdentifier,
|
sectionIdentifier,
|
||||||
context,
|
context,
|
||||||
categoryPath
|
categoryPath
|
||||||
|
|
@ -1220,7 +1319,47 @@ public class CategoriesController {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reorders subcategories.
|
* Reorders objects assigned to the root category.
|
||||||
|
*
|
||||||
|
* @param sectionIdentifier The identifier of the current
|
||||||
|
* {@link ContentSection}.
|
||||||
|
* @param context The mapping context of the assigned category
|
||||||
|
* system.
|
||||||
|
* @param objectIdentifier The identifier of the object to move.
|
||||||
|
* @param direction The direction of the move.
|
||||||
|
*
|
||||||
|
* @return A redirect to the details page of the parent category or the
|
||||||
|
* template for building an error message.
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path(
|
||||||
|
"/{context}/categories/@objects/{objectIdentifier}/order"
|
||||||
|
)
|
||||||
|
@AuthorizationRequired
|
||||||
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
|
public String orderObjects(
|
||||||
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
|
@PathParam("context") final String context,
|
||||||
|
@PathParam("objectIdentifier") final String objectIdentifier,
|
||||||
|
@FormParam("direction") final String direction
|
||||||
|
) {
|
||||||
|
final RetrieveResult<Category> result = retrieveCategory(
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
"/"
|
||||||
|
);
|
||||||
|
|
||||||
|
return orderObjects(
|
||||||
|
result,
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
objectIdentifier,
|
||||||
|
direction
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reorders objects assigned to a category.
|
||||||
*
|
*
|
||||||
* @param sectionIdentifier The identifier of the current
|
* @param sectionIdentifier The identifier of the current
|
||||||
* {@link ContentSection}.
|
* {@link ContentSection}.
|
||||||
|
|
@ -1246,9 +1385,147 @@ public class CategoriesController {
|
||||||
@FormParam("direction") final String direction
|
@FormParam("direction") final String direction
|
||||||
) {
|
) {
|
||||||
final RetrieveResult<Category> result = retrieveCategory(
|
final RetrieveResult<Category> result = retrieveCategory(
|
||||||
sectionIdentifier, context, categoryPath
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
categoryPath
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return orderObjects(
|
||||||
|
result,
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
objectIdentifier,
|
||||||
|
direction
|
||||||
|
);
|
||||||
|
//
|
||||||
|
// if (result.isSuccessful()) {
|
||||||
|
// final Category category = result.getResult();
|
||||||
|
//
|
||||||
|
// final Optional<Categorization> categorizationResult = category
|
||||||
|
// .getObjects()
|
||||||
|
// .stream()
|
||||||
|
// .filter(
|
||||||
|
// categorization -> Objects.equals(
|
||||||
|
// categorization.getUuid(), objectIdentifier
|
||||||
|
// )
|
||||||
|
// ).findAny();
|
||||||
|
// if (categorizationResult.isPresent()) {
|
||||||
|
// final CcmObject object = categorizationResult
|
||||||
|
// .get()
|
||||||
|
// .getCategorizedObject();
|
||||||
|
// try {
|
||||||
|
// switch (direction) {
|
||||||
|
// case "DECREASE":
|
||||||
|
// categoryManager.decreaseObjectOrder(
|
||||||
|
// object, category
|
||||||
|
// );
|
||||||
|
// break;
|
||||||
|
// case "INCREASE":
|
||||||
|
// categoryManager.increaseObjectOrder(
|
||||||
|
// object, category
|
||||||
|
// );
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// // Nothing
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// } catch (ObjectNotAssignedToCategoryException ex) {
|
||||||
|
// return String.format(
|
||||||
|
// "redirect:/%s/categorysystems/%s/categories/%s#objects-sections",
|
||||||
|
// sectionIdentifier,
|
||||||
|
// context,
|
||||||
|
// categoryManager.getCategoryPath(category)
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return String.format(
|
||||||
|
// "redirect:/%s/categorysystems/%s/categories/%s",
|
||||||
|
// sectionIdentifier,
|
||||||
|
// context,
|
||||||
|
// categoryManager.getCategoryPath(category)
|
||||||
|
// );
|
||||||
|
// } else {
|
||||||
|
// return result.getFailedResponseTemplate();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
private String setIndexObject(
|
||||||
|
final RetrieveResult<Category> result,
|
||||||
|
@PathParam("sectionIdentifier") final String sectionIdentifier,
|
||||||
|
@PathParam("context") final String context,
|
||||||
|
@PathParam("categoryPath") final String categoryPath,
|
||||||
|
@PathParam("indexElementUuid") final String indexElementUuid
|
||||||
|
) {
|
||||||
|
if (result.isSuccessful()) {
|
||||||
|
final Category category = result.getResult();
|
||||||
|
final List<Categorization> categorizationResult = category
|
||||||
|
.getObjects()
|
||||||
|
.stream()
|
||||||
|
.filter(
|
||||||
|
categorization -> Objects.equals(
|
||||||
|
categorization.getCategorizedObject().getUuid(),
|
||||||
|
indexElementUuid
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!categorizationResult.isEmpty()) {
|
||||||
|
for (final Categorization categorization : categorizationResult) {
|
||||||
|
final CcmObject object = categorization
|
||||||
|
.getCategorizedObject();
|
||||||
|
try {
|
||||||
|
categoryManager.setIndexObject(category, object);
|
||||||
|
if (object instanceof ContentItem) {
|
||||||
|
final ContentItem item = (ContentItem) object;
|
||||||
|
final ContentItem live = itemManager
|
||||||
|
.getDraftVersion(
|
||||||
|
item,
|
||||||
|
ContentItem.class
|
||||||
|
);
|
||||||
|
categoryManager.setIndexObject(category, live);
|
||||||
|
}
|
||||||
|
} catch (ObjectNotAssignedToCategoryException ex) {
|
||||||
|
models.put("sectionIdentifier", sectionIdentifier);
|
||||||
|
models.put("context", context);
|
||||||
|
models.put("categoryPath", categoryPath);
|
||||||
|
models.put("categorizationUuid", indexElementUuid);
|
||||||
|
return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
models.put("sectionIdentifier", sectionIdentifier);
|
||||||
|
models.put("context", context);
|
||||||
|
models.put("categoryPath", categoryPath);
|
||||||
|
models.put("categorizationUuid", indexElementUuid);
|
||||||
|
return "org/librecms/ui/contentsection/categorysystems/categorization-not-found.xhtml";
|
||||||
|
}
|
||||||
|
if ("/".equals(categoryPath)
|
||||||
|
|| category.getParentCategory() == null) {
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/categorysystems/%s/categories/",
|
||||||
|
sectionIdentifier,
|
||||||
|
context
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return String.format(
|
||||||
|
"redirect:/%s/categorysystems/%s/categories/%s",
|
||||||
|
sectionIdentifier,
|
||||||
|
context,
|
||||||
|
categoryPath
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return result.getFailedResponseTemplate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String orderObjects(
|
||||||
|
final RetrieveResult<Category> result,
|
||||||
|
final String sectionIdentifier,
|
||||||
|
final String context,
|
||||||
|
final String objectIdentifier,
|
||||||
|
final String direction
|
||||||
|
) {
|
||||||
if (result.isSuccessful()) {
|
if (result.isSuccessful()) {
|
||||||
final Category category = result.getResult();
|
final Category category = result.getResult();
|
||||||
|
|
||||||
|
|
@ -1358,7 +1635,7 @@ public class CategoriesController {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
final ContentSection section = sectionResult.get();
|
final ContentSection section = sectionResult.get();
|
||||||
if (permissionChecker.isPermitted(
|
if (!permissionChecker.isPermitted(
|
||||||
AdminPrivileges.ADMINISTER_CATEGORIES, section
|
AdminPrivileges.ADMINISTER_CATEGORIES, section
|
||||||
)) {
|
)) {
|
||||||
return RetrieveResult.failed(
|
return RetrieveResult.failed(
|
||||||
|
|
@ -1477,6 +1754,15 @@ public class CategoriesController {
|
||||||
category
|
category
|
||||||
.getObjects()
|
.getObjects()
|
||||||
.stream()
|
.stream()
|
||||||
|
.filter(
|
||||||
|
categorization -> categorization
|
||||||
|
.getCategorizedObject() instanceof ContentItem
|
||||||
|
)
|
||||||
|
.filter(
|
||||||
|
categorization -> ((ContentItem) categorization
|
||||||
|
.getCategorizedObject())
|
||||||
|
.getVersion() == ContentItemVersion.DRAFT
|
||||||
|
)
|
||||||
.map(this::buildCategorizedObjectModel)
|
.map(this::buildCategorizedObjectModel)
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ public class CategoryModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setObjects(final List<CategorizedObjectModel> objects) {
|
public void setObjects(final List<CategorizedObjectModel> objects) {
|
||||||
this.objects = new ArrayList<>();
|
this.objects = new ArrayList<>(objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getCategoryOrder() {
|
public long getCategoryOrder() {
|
||||||
|
|
|
||||||
|
|
@ -451,23 +451,15 @@
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
#{CmsAdminMessages['contentsections.categorystems.category.objects.name']}
|
#{CmsAdminMessages['contentsections.categorystems.category.objects.name']}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
#{CmsAdminMessages['contentsections.categorystems.category.objects.title']}
|
#{CmsAdminMessages['contentsections.categorystems.category.objects.title']}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
#{CmsAdminMessages['contentsections.categorystems.category.objects.type']}
|
#{CmsAdminMessages['contentsections.categorystems.category.objects.type']}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
#{CmsAdminMessages['contentsections.categorystems.category.objects.index']}
|
#{CmsAdminMessages['contentsections.categorystems.category.objects.index']}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th colspan="3">
|
<th colspan="3">
|
||||||
#{CmsAdminMessages['contentsections.categorystems.category.objects.actions']}
|
#{CmsAdminMessages['contentsections.categorystems.category.objects.actions']}
|
||||||
</th>
|
</th>
|
||||||
|
|
@ -498,7 +490,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="actions-order-col">
|
<td class="actions-order-col">
|
||||||
<c:if test="#{object.objectOrder != 1}">
|
<c:if test="#{object.objectOrder != 1}">
|
||||||
<form action="#"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{category.path}/@objects/#{object.objectId}/order"
|
||||||
method="post">
|
method="post">
|
||||||
<input name="direction"
|
<input name="direction"
|
||||||
value="DECREASE"
|
value="DECREASE"
|
||||||
|
|
@ -513,7 +505,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td class="actions-order-col">
|
<td class="actions-order-col">
|
||||||
<c:if test="#{object.objectOrder lt CategorySystemModel.selectedCategory.objects.size()}">
|
<c:if test="#{object.objectOrder lt CategorySystemModel.selectedCategory.objects.size()}">
|
||||||
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/@objects/#{object.objectId}/order"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{category.path}/@objects/#{object.objectId}/order"
|
||||||
method="post">
|
method="post">
|
||||||
<input name="direction"
|
<input name="direction"
|
||||||
value="INCREASE"
|
value="INCREASE"
|
||||||
|
|
@ -529,18 +521,24 @@
|
||||||
<td class="actions-setindex-col">
|
<td class="actions-setindex-col">
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="#{object.indexObject}">
|
<c:when test="#{object.indexObject}">
|
||||||
<a class="btn btn-danger"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{category.path}/@index-element/reset"
|
||||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/@index-element/#{object.objectUuid}">
|
method="post">
|
||||||
<bootstrap:svgIcon icon="bookmark-x" />
|
<button class="btn btn-danger"
|
||||||
<span>#{CmsAdminMessages['contentsections.categorystems.category.objects.index_object.reset']}</span>
|
type="submit">
|
||||||
</a>
|
<bootstrap:svgIcon icon="bookmark-x" />
|
||||||
|
<span>#{CmsAdminMessages['contentsections.categorystems.category.objects.index_object.reset']}</span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<c:otherwise>
|
||||||
<a class="btn btn-info"
|
<form action="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/categories#{category.path}/@index-element/#{object.objectUuid}"
|
||||||
href="#{mvc.basePath}/#{ContentSectionModel.sectionName}/categorysystems/#{CategorySystemModel.selectedCategorySystem.context}/@index-element/reset">
|
method="post">
|
||||||
<bootstrap:svgIcon icon="bookmark-star" />
|
<button class="btn btn-info"
|
||||||
<span>#{CmsAdminMessages['contentsections.categorystems.category.objects.index_object.set']}</span>
|
type="submit">
|
||||||
</a>
|
<bootstrap:svgIcon icon="bookmark-star" />
|
||||||
|
<span>#{CmsAdminMessages['contentsections.categorystems.category.objects.index_object.set']}</span>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue