Index: content-bundles/resources/types_es.properties =================================================================== --- content-bundles/resources/types_es.properties (revision 117690) +++ content-bundles/resources/types_es.properties (working copy) @@ -62,6 +62,7 @@ action.reorder=Reordenar edit.access4=Mostrar a los grupos seleccionados avail.hide20=Ocultar este elemento y sus contenidos +avail.hide30=Ocultar esta carpeta dejando disponible el acceso a su contenido create.text=Nuevo documento de texto simple action.select=- Seleccione una acci\u00F3n - access.public.fldr=Esta carpeta y sus contenidos son p\u00FAblicos. Index: content-bundles/resources/types.properties =================================================================== --- content-bundles/resources/types.properties (revision 117690) +++ content-bundles/resources/types.properties (working copy) @@ -76,6 +76,7 @@ avail.hide10 = Hide this item #avail.hide2 = Hide this folder from non-administrators avail.hide20 = Hide this folder and its contents +avail.hide30 = Hide this folder but allow access to its contents avail.show = Show avail.show1 = Show this item avail.show2 = Show this folder Index: content-tool/tool/src/java/org/sakaiproject/content/tool/ListItem.java =================================================================== --- content-tool/tool/src/java/org/sakaiproject/content/tool/ListItem.java (revision 117690) +++ content-tool/tool/src/java/org/sakaiproject/content/tool/ListItem.java (working copy) @@ -124,6 +124,7 @@ protected static final Comparator PRIORITY_SORT_COMPARATOR = ContentHostingService.newContentHostingComparator(ResourceProperties.PROP_CONTENT_PRIORITY, true); public static final String DOT = "_"; + private static final String PROP_HIDDEN_TRUE = "true"; // SAK-23044 /** A long representing the number of milliseconds in one week. Used for date calculations */ public static final long ONE_DAY = 24L * 60L * 60L * 1000L; @@ -412,6 +413,7 @@ protected boolean isPubview = false; protected boolean hidden; + protected boolean hiddenWithAccessibleContent; protected boolean isAvailable; protected boolean useReleaseDate; protected Time releaseDate; @@ -863,6 +865,12 @@ this.retractDate = retractDate; } this.isAvailable = entity.isAvailable(); + + try { + this.hiddenWithAccessibleContent = props.getBooleanProperty(ResourceProperties.PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT); + } catch (Exception e) { + this.hiddenWithAccessibleContent = false; + } this.htmlFilter = entity.getProperties().getProperty(ResourceProperties.PROP_ADD_HTML); if (this.htmlFilter == null) { @@ -1411,7 +1419,9 @@ protected void captureAvailability(ParameterParser params, String index) { // availability - this.hidden = params.getBoolean("hidden" + index); + String hiddenParam = params.getString("hidden" + index); + this.hidden = PROP_HIDDEN_TRUE.equalsIgnoreCase(hiddenParam); + this.hiddenWithAccessibleContent = "hidden_with_accessible_content".equals(hiddenParam); boolean use_start_date = params.getBoolean("use_start_date" + index); boolean use_end_date = params.getBoolean("use_end_date" + index); @@ -2718,6 +2728,14 @@ { this.hidden = hidden; } + + /** + * @return the hiddenWithAccessibleContent + */ + public boolean isHiddenWithAccessibleContent() + { + return this.hiddenWithAccessibleContent; + } /** * @param hover @@ -3040,7 +3058,7 @@ //setCopyrightOnEntity(props); setConditionalReleaseOnEntity(props); setAccessOnEntity(edit); - setAvailabilityOnEntity(edit); + setAvailabilityOnEntity(props, edit); setQuotaOnEntity(props); setHtmlInlineOnEntity(props, edit); @@ -3170,8 +3188,13 @@ } - protected void setAvailabilityOnEntity(GroupAwareEdit edit) + protected void setAvailabilityOnEntity(ResourcePropertiesEdit props, GroupAwareEdit edit) { + if ( this.hiddenWithAccessibleContent ) { + props.addProperty(ResourceProperties.PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT, PROP_HIDDEN_TRUE); + } else { + props.removeProperty(ResourceProperties.PROP_HIDDEN_WITH_ACCESSIBLE_CONTENT); + } edit.setAvailability(hidden, releaseDate, retractDate); } @@ -3274,7 +3297,7 @@ setCopyrightOnEntity(props); setHtmlFilterOnEntity(props); setAccessOnEntity(edit); - setAvailabilityOnEntity(edit); + setAvailabilityOnEntity(props, edit); setHtmlInlineOnEntity(props, edit); if(! isUrl() && ! isCollection() && this.mimetype != null) Index: content-tool/tool/src/webapp/vm/resources/sakai_properties.vm =================================================================== --- content-tool/tool/src/webapp/vm/resources/sakai_properties.vm (revision 117690) +++ content-tool/tool/src/webapp/vm/resources/sakai_properties.vm (working copy) @@ -377,6 +377,12 @@ $tlang.getString("avail.show1") #end + #if($model.isCollection()) + + + #end Index: content-tool/tool/src/webapp/vm/resources/sakai_properties_scripts.vm =================================================================== --- content-tool/tool/src/webapp/vm/resources/sakai_properties_scripts.vm (revision 117690) +++ content-tool/tool/src/webapp/vm/resources/sakai_properties_scripts.vm (working copy) @@ -125,6 +125,10 @@ { tag.onclick = handleSetToHidden; } + else if(tag.id && tag.id.match(/^hidden_with_accessible_content_true${DOT}\d+$/)) + { + tag.onclick = handleSetToHidden; + } #if($model.isGroupPossible()) else if(tag.id && tag.id.match(/^access_mode_inherited${DOT}\d+$/)) { @@ -1394,8 +1398,9 @@ hidden_true.checked = false; } var hidden_false = document.getElementById("hidden_false${DOT}" + index); - if(hidden_false) - { + var hidden_with_accessible_content_true = document.getElementById("hidden_with_accessible_content_true${DOT}" + index); + if(hidden_false && (!hidden_with_accessible_content_true || !hidden_with_accessible_content_true.checked)) + { hidden_false.checked = true; } var use_start_date = document.getElementById("use_start_date${DOT}" + index); @@ -1412,7 +1417,8 @@ hidden_true.checked = false; } var hidden_false = document.getElementById("hidden_false${DOT}" + index); - if(hidden_false) + var hidden_with_accessible_content_true = document.getElementById("hidden_with_accessible_content_true${DOT}" + index); + if(hidden_false && (!hidden_with_accessible_content_true || !hidden_with_accessible_content_true.checked)) { hidden_false.checked = true; }