Skip to content

Commit

Permalink
SAM-2894 Consolidate authorIndex*.jsp files (sakaiproject#2676)
Browse files Browse the repository at this point in the history
This change consolidates authorIndex.jsp and authorIndex_noHeader.jsp
into one file (using authorIndex.jsp as the authoritative version)
named authorIndex_content.jsp. An authorIndex_container.jsp was created
which just includes this _content file. All the faces-config, where
updated to reference the authorIndex_container.jsp.
  • Loading branch information
master-bob authored and ottenhoff committed May 27, 2016
1 parent f9cdbd7 commit e575fb1
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 479 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void processAction(ActionEvent ae) throws AbortProcessingException

// create an assessment based on the title entered and the assessment
// template selected
// #1 - read from form authorIndex.jsp
// #1 - read from form authorIndex_content.jsp
String assessmentTitle = TextFormat.convertPlaintextToFormattedTextNoHighUnicode(log, author.getAssessTitle());

//HUONG's EDIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public EditAssessmentListener()
public void processAction(ActionEvent ae) throws AbortProcessingException
{

// #1a - come from authorIndex.jsp, load the assessment
// #1a - come from authorIndex_content.jsp, load the assessment
// goto editAssessment.jsp if successful
AuthorBean author = (AuthorBean) ContextUtil.lookupBean("author");
String editType = ContextUtil.lookupParam("editType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void processAction(ActionEvent ae) throws AbortProcessingException
// #2 - even if assessment is set to dead, we intend to remove any resources
// s.deleteResources(resourceIdList);

//#3 - goto authorIndex.jsp so fix the assessment List in author bean by
//#3 - goto authorIndex_content.jsp so fix the assessment List in author bean by
// removing an assessment from the list
AuthorBean author = (AuthorBean) ContextUtil.lookupBean(
"author");
Expand Down
10 changes: 5 additions & 5 deletions samigo/samigo-app/src/webapp/WEB-INF/faces-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,11 @@
</navigation-case>
<navigation-case>
<from-outcome>author</from-outcome>
<to-view-id>/jsf/author/authorIndex.jsp</to-view-id>
<to-view-id>/jsf/author/authorIndex_container.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>sortCore</from-outcome>
<to-view-id>/jsf/author/authorIndex.jsp</to-view-id>
<to-view-id>/jsf/author/authorIndex_container.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>poolUpdateError</from-outcome>
Expand Down Expand Up @@ -967,7 +967,7 @@
</navigation-case>
<navigation-case>
<from-outcome>removeAssessment</from-outcome>
<to-view-id>/jsf/author/authorIndex.jsp</to-view-id>
<to-view-id>/jsf/author/authorIndex_container.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>removeMatchItem</from-outcome>
Expand All @@ -983,15 +983,15 @@
</navigation-case>
<navigation-case>
<from-outcome>saveSettings</from-outcome>
<to-view-id>/jsf/author/authorIndex.jsp</to-view-id>
<to-view-id>/jsf/author/authorIndex_container.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>saveSettingsAndConfirmPublish</from-outcome>
<to-view-id>/jsf/author/publishAssessment.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>publishAssessment</from-outcome>
<to-view-id>/jsf/author/authorIndex.jsp</to-view-id>
<to-view-id>/jsf/author/authorIndex_container.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>confirmRemoveItemAttachment</from-outcome>
Expand Down
31 changes: 31 additions & 0 deletions samigo/samigo-app/src/webapp/jsf/author/authorIndex_container.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<%--
~ /**
~ * Copyright (c) 2016, The Apereo Foundation
~ *
~ * Licensed under the Educational Community License, Version 2.0 (the "License");
~ * you may not use this file except in compliance with the License.
~ * You may obtain a copy of the License at
~ *
~ * http://opensource.org/licenses/ecl2
~ *
~ * Unless required by applicable law or agreed to in writing, software
~ * distributed under the License is distributed on an "AS IS" BASIS,
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ * See the License for the specific language governing permissions and
~ * limitations under the License.
~ */
--%>

<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://www.sakaiproject.org/samigo" prefix="samigo" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<f:view>
<%@ include file="../author/authorIndex_content.jsp"%>
</f:view>
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
Expand Down Expand Up @@ -29,7 +28,7 @@
**********************************************************************************/
--%>
-->
<f:view>

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><%= request.getAttribute("html.head") %>
<title><h:outputText value="#{authorFrontDoorMessages.auth_front_door}" /></title>
Expand Down Expand Up @@ -468,4 +467,3 @@ $(document).ready(function() {
</div>
</body>
</html>
</f:view>
Loading

0 comments on commit e575fb1

Please sign in to comment.