Skip to content

Commit

Permalink
tim-connector: Hide Tim sync UI in order edition if Tim is not activated
Browse files Browse the repository at this point in the history
Like in the case of JIRA, the Tim synchronization UI in the project edition will
only appear if Tim connector is activated.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
  • Loading branch information
mrego committed Feb 13, 2013
1 parent ab41d20 commit 04f3138
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ private void updateOrderLastSyncInfoScreen() {
}
}

public boolean isTimDeactivated() {
public boolean isTimActivated() {
AppProperties appProperties = appPropertiesDAO.findByMajorIdAndName(
"Tim", "Activated");
return !appProperties.getPropertyValue().equalsIgnoreCase("Y");
return appProperties.getPropertyValue().equalsIgnoreCase("Y");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,38 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<vbox id="${arg.id}"
apply="org.libreplan.web.orders.TimSynchronizationController" width="100%">
<groupbox style="margin-top: 5px" closable="false">
<caption label="${i18n:_('Tim sync information')}" />
<separator spacing="10px"/>
<hbox width="100%">
<separator spacing="10px" width="100%"/>

<grid fixedLayout="true" hflex="1">
<columns>
<column width="200px" />
<column />
</columns>
<rows>
<row>
<label value="${i18n:_('Tim last sync')}"/>
<hbox>
<groupbox id="${arg.id}"
apply="org.libreplan.web.orders.TimSynchronizationController"
style="margin-top: 5px" closable="false"
visible="@{timSynchronizationController.timActivated}">
<caption label="${i18n:_('Tim sync information')}" />
<separator spacing="10px"/>
<hbox width="100%">
<separator spacing="10px" width="100%"/>
<grid fixedLayout="true" hflex="1">
<columns>
<column width="200px" />
<column />
</columns>
<rows>
<row>
<label value="${i18n:_('Tim last sync')}"/>
<hbox>
<label id="labelLastSyncDate" value=""/>
<separator bar="false" spacing="15px" orient="vertical"/>
<label id="labelProductCode" value=""/>
</hbox>
</row>
<row>
<label value="${i18n:_('Tim product code')}"/>
<hbox>
</hbox>
</row>
<row>
<label value="${i18n:_('Tim product code')}"/>
<hbox>
<textbox id="txtProductCode" value=""
width="350px"/>
<button label="${i18n:_('Export to Tim')}" id="exportToTimButton" disabled="@{timSynchronizationController.timDeactivated}"
<button label="${i18n:_('Export to Tim')}" id="exportToTimButton"
onClick="timSynchronizationController.startExportToTim()" />
</hbox>
</hbox>
</row>
</rows>
</grid>
</hbox>
</groupbox>
</vbox>
</groupbox>

0 comments on commit 04f3138

Please sign in to comment.