TASKPM/libreplan-webapp/src/main/webapp/myaccount/settings.zul
lmann99 b43d48e439 Add filtering of finished projects
User preference setting to default filtering of finished projects from planning
and company views.
* Still needs work to investigate and update resource views
2017-04-17 22:14:49 -04:00

219 lines
12 KiB
Text

<!--
This file is part of LibrePlan
Copyright (C) 2011 ComtecSF, S.L.
Copyright (C) 2013 Igalia, S.L.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>.
-->
<?page title="${i18n:_('LibrePlan: Settings')}"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<?page id="List"?>
<?init class="org.zkoss.zk.ui.util.Composition" arg0="/common/layout/template.zul"?>
<?link rel="shortcut icon" href="/common/img/favicon.ico" type="image/x-icon"?>
<?link rel="stylesheet" type="text/css" href="/common/css/libreplan.css"?>
<?link rel="stylesheet" type="text/css" href="/common/css/libreplan_zk.css"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk>
<window id="settingsWindow" self="@{define(content)}"
apply="org.libreplan.web.users.settings.SettingsController"
title="${i18n:_('User settings')}">
<vbox id="messagesContainer" />
<tabbox>
<tabs>
<tab label="${i18n:_('Data')}" />
</tabs>
<tabpanels>
<tabpanel>
<groupbox style="margin-top: 5px" closable="false">
<caption label="${i18n:_('Personal Data')}" />
<grid fixedLayout="true" id="personalData">
<columns>
<column width="200px" />
<column />
</columns>
<rows>
<row>
<label value="${i18n:_('Username')}" />
<textbox id="loginName"
value="@{settingsController.loginName}"
disabled="true"
width="300px" />
</row>
<row>
<label value="${i18n:_('First name')}" />
<textbox id="firstName"
value="@{settingsController.firstName}" width="300px"
disabled="@{settingsController.bound}" />
</row>
<row>
<label value="${i18n:_('Last name')}" />
<textbox id="lastName"
value="@{settingsController.lastName}" width="300px"
disabled="@{settingsController.bound}" />
</row>
<row>
<label value="${i18n:_('E-mail')}" />
<textbox id="email" value="@{settingsController.email}" width="300px"/>
</row>
</rows>
</grid>
</groupbox>
<groupbox style="margin-top: 5px" closable="false">
<caption label="${i18n:_('Application settings')}" />
<grid fixedLayout="true" id="configurationVariables">
<columns>
<column width="200px" />
<column />
</columns>
<rows>
<row>
<label value="${i18n:_('Select language')}" />
<listbox id="applicationLanguage"
model="@{settingsController.languages}"
itemRenderer="@{settingsController.languagesRenderer}"
selectedItem="@{settingsController.selectedLanguage}"
mold="select" />
</row>
<row>
<label value="${i18n:_('Planning charts expanded')}" />
<grid>
<columns>
<column />
<column />
<column />
</columns>
<rows>
<row>
<checkbox id="expandCompanyPlanningViewCharts"
label="${i18n:_('Company view')}"
checked="@{settingsController.expandCompanyPlanningViewCharts}"/>
<checkbox id="expandOrderPlanningViewCharts"
label="${i18n:_('Project view')}"
checked="@{settingsController.expandOrderPlanningViewCharts}"/>
<checkbox id="expandResourceLoadViewCharts"
label="${i18n:_('Resource load view')}"
checked="@{settingsController.expandResourceLoadViewCharts}"/>
</row>
</rows>
</grid>
</row>
<row>
<label value="${i18n:_('Planning view modes on')}" />
<grid>
<columns>
<column />
<column />
<column />
</columns>
<rows>
<row>
<checkbox id="showResourcesOn"
label="${i18n:_('Show resources')}"
checked="@{settingsController.showResourcesOn}"/>
<checkbox id="showAdvancesOn"
label="${i18n:_('Show progress')}"
checked="@{settingsController.showAdvancesOn}"/>
<checkbox id="showReportedHoursOn"
label="${i18n:_('Show reported hours')}"
checked="@{settingsController.showReportedHoursOn}"/>
<checkbox id="showLabelsOn"
label="${i18n:_('Show labels')}"
checked="@{settingsController.showLabelsOn}"/>
<checkbox id="showMoneyCostBarOn"
label="${i18n:_('Show money cost bar')}"
checked="@{settingsController.showMoneyCostBarOn}"/>
</row>
</rows>
</grid>
</row>
<row>
<label value="${i18n:_('Projects view filtering')}" />
<hbox>
<label value="${i18n:_('Label filter')}" />
<bandboxSearch id="projectsFilterLabelBandboxSearch"
finder="LabelBandboxFinder"
model="@{settingsController.allLabels}"
selectedElement="@{settingsController.projectsFilterLabel}"
widthListbox="450px"
widthBandbox="200px"/>
<label value="${i18n:_('Projects since')}" />
<intbox id="projectsFilterPeriodSince"
value="@{settingsController.projectsFilterPeriodSince}"
width="50px"
constraint="@{settingsController.checkMonthsMaxValue}"/>
<label value="${i18n:_('months to')}" />
<intbox id="projectsFilterPeriodTo"
value="@{settingsController.projectsFilterPeriodTo}"
width="50px"
constraint="@{settingsController.checkMonthsMaxValue}"/>
<checkbox id="projectsFilterFinishedOn"
label="${i18n:_('Exclude finished projects')}"
checked="@{settingsController.projectsFilterFinishedOn}"/>
</hbox>
</row>
<row>
<label value="${i18n:_('Resources load filtering')}" />
<hbox>
<label value="${i18n:_('Criterion filter')}" />
<bandboxSearch
id="resourcesLoadFilterCriterionBandboxSearch"
finder="CriterionBandboxFinder"
model="@{settingsController.allCriteria}"
selectedElement="@{settingsController.resourcesLoadFilterCriterion}"
widthListbox="450px"
widthBandbox="200px"/>
<label value="${i18n:_('Resources load since')}" />
<intbox id="resourcesLoadFilterPeriodSince"
value="@{settingsController.resourcesLoadFilterPeriodSince}"
width="50px"
constraint="@{settingsController.checkMonthsMaxValue}"/>
<label value="${i18n:_('months to')}" />
<intbox id="resourcesLoadFilterPeriodTo"
value="@{settingsController.resourcesLoadFilterPeriodTo}"
width="50px"
constraint="@{settingsController.checkMonthsMaxValue}"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
</tabpanel>
</tabpanels>
</tabbox>
<hbox>
<button label="${i18n:_('Save')}"
sclass="save-button global-action"
onClick="settingsController.save()" />
</hbox>
</window>
</zk>