Skip to content

Commit

Permalink
SAK-31098 postem bootstrap improvements (sakaiproject#3851)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff authored Feb 5, 2017
1 parent b61a551 commit 736a257
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ create_update=Add/Update Feedback File
#notification=Notification
#Unused
#divid='_id27'
#feedback_title=Feedback File:
feedback_title=Feedback File
feedback_instructions=Instructions:
#Unused
#tab_feedback_first=Comma-delimited files must be saved in .csv format. Tab-delimited files must be saved in .txt format.
Expand Down
38 changes: 23 additions & 15 deletions postem/postem-app/src/webapp/postem/create_gradebook.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -19,54 +19,62 @@
<sakai:view title="#{msgs.title_new}">
<h:form enctype="multipart/form-data">

<h3><h:outputText value="#{msgs.create_update}"/></h3>
<div class="page-header">
<h1><h:outputText value="#{msgs.create_update}"/></h1>
</div>

<h:panelGroup styleClass="alertMessage" rendered="#{PostemTool.displayErrors}">
<h:messages globalOnly="true" layout="table" />
</h:panelGroup>

<sakai:panel_titled>
<h:outputText style="font-weight: bold;" value="#{msgs.feedback_instructions}"/>
<div class="instruction">
<strong><h:outputText value="#{msgs.feedback_instructions}"/></strong>
<f:verbatim><br /></f:verbatim>
<h:outputText value="#{msgs.feedback_first}"/>
<f:verbatim><br /></f:verbatim>
<h:outputText value="#{msgs.feedback_second}"/>
<f:verbatim><br /></f:verbatim>
<h:outputText value="#{msgs.feedback_third}"/>
</sakai:panel_titled>
</div>

<sakai:panel_titled>
<h:panelGrid styleClass="jsfFormTable" width="80%" columns="2">
<h:outputLabel for="title" styleClass="shorttext" style="font-weight: bold;">
<h:outputText value="#{msgs.gradebook_title}"/>
</h:outputLabel>
<h:inputText id="title" value="#{PostemTool.currentGradebook.title}"/>
</h:panelGrid>
<div class="form-group row">
<h:outputLabel for="title" value="#{msgs.gradebook_title}" styleClass="form-group-label col-xs-2" />
<div class="col-xs-4">
<h:inputText id="title" value="#{PostemTool.currentGradebook.title}"/>
</div>
</div>
<%--
<corejsf:upload value="#{PostemTool.csv}" />
--%>
<div class="form-group row">
<h:outputLabel for="choosefile" value="#{msgs.feedback_title}" styleClass="form-group-label col-xs-2" />
<div class="col-xs-4">
<sakai:button_bar>
<%-- (gsilver) cannot pass a needed title atribute to these next items --%>
<sakai:button_bar_item
id="choosefile"
action="#{PostemTool.processAddAttachRedirect}"
value="#{msgs.gradebook_choosefile}"/>
<h:outputText value="#{PostemTool.attachmentTitle}"/>
</sakai:button_bar>
</div>
</div>

<%--<h:outputText value="#{msgs.delimiter}" style="font-weight: bold;" />
<h:selectOneRadio styleClass="checkbox" value="#{PostemTool.delimiter}" layout="pageDirection">
<f:selectItem itemValue="comma" itemLabel="#{msgs.comma_delim}"/>
<f:selectItem itemValue="tab" itemLabel="#{msgs.tab_delim}"/>
</h:selectOneRadio>--%>

<h:panelGrid styleClass="jsfFormTable" width="80%" columns="2">
<h:outputText value="#{msgs.gradebook_feedbackavail}" style="font-weight: bold;"/>
<h:panelGroup styleClass="checkbox">
<div class="form-group row">
<h:outputLabel value="#{msgs.gradebook_feedbackavail}" styleClass="form-group-label col-xs-2" />
<div class="col-xs-4">
<h:selectBooleanCheckbox id="release" value="#{PostemTool.currentGradebook.release}" />
<h:outputLabel for="release"><h:outputText value="#{msgs.release}"/></h:outputLabel>
</h:panelGroup>
</div>

</h:panelGrid>
</div>
</sakai:panel_titled>


Expand Down
18 changes: 7 additions & 11 deletions postem/postem-app/src/webapp/postem/main.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
rendered="#{PostemTool.editable}"/>
</sakai:tool_bar>
<sakai:view_content>
<br/>

<sakai:flat_list value="#{PostemTool.gradebooks}" var="gradebook" binding="#{PostemTool.gradebookTable}" styleClass="listHier lines nolines">
<sakai:flat_list value="#{PostemTool.gradebooks}" var="gradebook" binding="#{PostemTool.gradebookTable}" styleClass="table table-bordered table-striped">
<h:column>
<f:facet name="header">
<h:commandLink action="#{PostemTool.toggleTitleSort}" title="#{msgs.sort_title}">
Expand Down Expand Up @@ -75,8 +74,7 @@
<h:graphicImage value="postem/images/sortdescending.gif" rendered="#{PostemTool.releasedSort && !PostemTool.ascending}" alt="#{msgs.sort_released_desc}"/>
</h:commandLink>
</f:facet>
<h:outputText rendered="#{gradebook.released}" value="#{msgs.yes}"/>
<h:outputText rendered="#{!gradebook.released}" value="#{msgs.no}"/>

</h:column>
<%-- <h:column rendered="#{PostemTool.editable}">
<f:facet name="header">
Expand All @@ -93,8 +91,8 @@
<h:outputText value="#{msgs.gradebook_view}" />
</h:commandLink>
</h:column>
<h:column>
<h:commandLink action="#{PostemTool.processGradebookView}" rendered="#{PostemTool.editable}">
<h:column rendered="#{PostemTool.editable}">
<h:commandLink action="#{PostemTool.processGradebookView}">
<h:outputText value="#{msgs.gradebook_preview}" />
</h:commandLink>
</h:column>
Expand All @@ -113,16 +111,14 @@
<h:outputText value="#{msgs.csv_download}"/>
</h:commandLink>
</h:column>
<h:column rendered="#{PostemTool.editable}">
<h:commandLink action="#{PostemTool.processTemplateDownload}" rendered="#{gradebook.template != null}">
<h:column rendered="#{PostemTool.editable && gradebook.template != null}">
<h:commandLink action="#{PostemTool.processTemplateDownload}">
<h:outputText value="#{msgs.template}"/>
</h:commandLink>
</h:column>
</sakai:flat_list>

<p class="instruction">
<h:outputText value="#{msgs.no_gradebooks}" rendered="#{!PostemTool.gradebooksExist}" />
</p>
<h:outputText styleClass="instruction" value="#{msgs.no_gradebooks}" rendered="#{!PostemTool.gradebooksExist}" />
</sakai:view_content>

</h:form>
Expand Down

0 comments on commit 736a257

Please sign in to comment.