Some small bugs fixed
This commit is contained in:
parent
11240d444e
commit
3fbc0dbf8f
4 changed files with 81 additions and 33 deletions
|
|
@ -7,21 +7,48 @@
|
|||
|
||||
<changeSet id="adding-email_template_table" author="vova/jeroen">
|
||||
<createTable tableName="email_template">
|
||||
<column name="id" type="int" autoIncrement="true">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false" primaryKeyName="email_templates_pkey"/>
|
||||
</column>
|
||||
<column name="type" type="int"/>
|
||||
<column name="language" type="int"/>
|
||||
<column name="content" type="varchar(2048)"/>
|
||||
<column name="subject" type="varchar(1024)"/>
|
||||
</createTable>
|
||||
|
||||
<addUniqueConstraint
|
||||
constraintName="email_template_type_lang_key"
|
||||
columnNames="type,language"
|
||||
constraintName="email_template_type_language"
|
||||
columnNames="type, language"
|
||||
deferrable="false"
|
||||
disabled="false"
|
||||
initiallyDeferred="false"
|
||||
tableName="email_template"
|
||||
/>
|
||||
<createIndex tableName="email_template" indexName="language_index">
|
||||
<column name="language"></column>
|
||||
</createIndex>
|
||||
<createIndex tableName="email_template" indexName="type_index">
|
||||
<column name="type"></column>
|
||||
</createIndex>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="adding-notification_notification_queue" author="vova">
|
||||
<createTable tableName="notification_queue">
|
||||
<column name="id" type="BIGINT" autoIncrement="true">
|
||||
<constraints primaryKey="true" nullable="false" primaryKeyName="notification_queue_pkey"/>
|
||||
</column>
|
||||
<column name="type" type="int"/>
|
||||
<column name="updated" type="timestamp with time zone"/>
|
||||
<column name="resource" type="BIGINT"/>
|
||||
<column name="task" type="BIGINT"/>
|
||||
<column name="project" type="BIGINT"/>
|
||||
</createTable>
|
||||
<addUniqueConstraint
|
||||
tableName="notification_queue"
|
||||
columnNames="resource, task, project"
|
||||
deferrable="false"
|
||||
disabled="false"
|
||||
initiallyDeferred="false"/>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="adding-issue_log_table" author="misha">
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ package org.libreplan.web.logs;
|
|||
|
||||
import static org.libreplan.web.I18nHelper._;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -371,7 +372,17 @@ public class RiskLogCRUDController extends BaseCRUDController<RiskLog> {
|
|||
* Returns a list of {@link RiskLog} objects
|
||||
*/
|
||||
public List<RiskLog> getRiskLogs() {
|
||||
return riskLogModel.getRiskLogs();
|
||||
if (LogsController.getProjectNameVisibility() == true)
|
||||
return riskLogModel.getRiskLogs();
|
||||
else{
|
||||
List<RiskLog> riskLogs = new ArrayList<RiskLog>();
|
||||
Order order = LogsController.getOrder();
|
||||
for (RiskLog issueLog : riskLogModel.getRiskLogs()) {
|
||||
if (issueLog.getOrder().equals(order))
|
||||
riskLogs.add(issueLog);
|
||||
}
|
||||
return riskLogs;
|
||||
}
|
||||
}
|
||||
|
||||
public Order getOrder() {
|
||||
|
|
@ -429,4 +440,4 @@ public class RiskLogCRUDController extends BaseCRUDController<RiskLog> {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -60,11 +60,6 @@
|
|||
<listbox id="listIssueLogStatus" mold="select" rows="1" width="230px">
|
||||
|
||||
</listbox>
|
||||
<!--model="@{issueLogController.issueStatusEnum}"
|
||||
selectedItem="@{issueLogController.issueLog.status}"
|
||||
itemRenderer="@{issueLogController.issueStatusRenderer}" <listitem label="LOW" value="LOW" selected="true"></listitem>
|
||||
<listitem label="MEDIUM" value="MEDIUM"></listitem>
|
||||
<listitem label="HIGH" value="HIGH"></listitem>-->
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
|
|
|||
|
|
@ -62,22 +62,24 @@
|
|||
<listbox id="listRiskLogProbability" mold="select" rows="1" width="135px"
|
||||
model="@{riskLogController.lowMediumHighEnums}"
|
||||
selectedItem="@{riskLogController.riskLog.probability}"
|
||||
itemRenderer="@{riskLogController.lowMediumHighEnumRenderer}" />
|
||||
itemRenderer="@{riskLogController.lowMediumHighEnumRenderer}"
|
||||
onSelect="riskLogController.setUpdateScore()"/>
|
||||
|
||||
<label value="${i18n:_('Impact')}" />
|
||||
<listbox id="listRiskLogImpact" mold="select" rows="1" width="135px"
|
||||
model="@{riskLogController.lowMediumHighEnums}"
|
||||
selectedItem="@{riskLogController.riskLog.impact}"
|
||||
itemRenderer="@{riskLogController.lowMediumHighEnumRenderer}" />
|
||||
itemRenderer="@{riskLogController.lowMediumHighEnumRenderer}"
|
||||
onSelect="riskLogController.setUpdateScore()" />
|
||||
|
||||
<label value="${i18n:_('Risk score')}" />
|
||||
<textbox value="@{riskLogController.riskLog.riskScore}" width="95px" rows="1" disabled="true" />
|
||||
<textbox id="riskScore" value="@{riskLogController.riskLog.riskScore}" width="95px" rows="1" disabled="true" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Creation info')}" />
|
||||
<label value="${i18n:_('Creation info')}" />
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="80px"/>
|
||||
|
|
@ -108,7 +110,7 @@
|
|||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Counter measures (CM)')}" />
|
||||
<textbox id="counterMeasuresTextbox" width="605px" rows="1"
|
||||
<textbox id="counterMeasuresTextbox" width="605px" rows="3"
|
||||
value="@{riskLogController.riskLog.counterMeasures}"/>
|
||||
</row>
|
||||
<row>
|
||||
|
|
@ -124,30 +126,43 @@
|
|||
value="@{riskLogController.riskLog.contingency}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Responsible')}" />
|
||||
<textbox id="responsibleBox" width="605px" rows="1"
|
||||
value="@{riskLogController.riskLog.responsible}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Action When')}" />
|
||||
<datebox id="ActionWhenDateBox" width="110px"
|
||||
constraint="no empty:${i18n:_('cannot be empty')}"
|
||||
value="@{riskLogController.actionWhen}" />
|
||||
<label value="${i18n:_('Prevention')}" />
|
||||
<grid>
|
||||
<columns>
|
||||
<column width="80px"/>
|
||||
<column width="120px"/>
|
||||
<column width="80px"/>
|
||||
<column width="330px"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
|
||||
<label value="${i18n:_('Action When')}" />
|
||||
<datebox id="actionWhenDateBox" width="110px"
|
||||
constraint="no empty:${i18n:_('cannot be empty')}"
|
||||
value="@{riskLogController.actionWhen}" />
|
||||
|
||||
<label value="${i18n:_('Responsible')}" />
|
||||
<textbox id="responsibleBox" width="315px" rows="1"
|
||||
value="@{riskLogController.riskLog.responsible}"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${i18n:_('Notes')}" />
|
||||
<textbox value="@{riskLogController.riskLog.notes}" width="605px" rows="3" multiline="true" />
|
||||
<textbox value="@{riskLogController.riskLog.notes}" width="605px" rows="5" multiline="true" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<!-- Control buttons -->
|
||||
<!-- Control buttons -->
|
||||
<button onClick="riskLogController.saveAndExit()"
|
||||
label="${i18n:_('Save')}"
|
||||
sclass="save-button global-action" />
|
||||
label="${i18n:_('Save')}"
|
||||
sclass="save-button global-action" />
|
||||
<button onClick="riskLogController.saveAndContinue()"
|
||||
label="${i18n:_('Save and Continue')}"
|
||||
sclass="save-button global-action" />
|
||||
label="${i18n:_('Save and Continue')}"
|
||||
sclass="save-button global-action" />
|
||||
<button onClick="riskLogController.cancelForm()"
|
||||
label="${i18n:_('Cancel')}"
|
||||
sclass="cancel-button global-action" />
|
||||
</window>
|
||||
label="${i18n:_('Cancel')}"
|
||||
sclass="cancel-button global-action" />
|
||||
</window>
|
||||
Loading…
Add table
Reference in a new issue