On 2013-08-08 10:08, David Mason wrote:
> In zanata-war/src/main/webapp/tm/home.xhtml:
> 
>> +                            <a href="#" onclick="return showUploadPanel('#{tm.slug}')">
>> +                                <span class="icon-upload icon" title="#{messages['jsf.transmemory.Import.Title']}"/>
>> +                            </a>
>> +                        </rich:column>
>> +                        <rich:column style="text-align: center">
>> +                            <f:facet name="header">#{messages['jsf.transmemory.Export']}</f:facet>
>> +                            <a href="#{request.contextPath}/rest/tm/#{tm.slug}" onclick="return confirmExport()">
>> +                                <span class="icon-download icon" title="#{messages['jsf.transmemory.Export.Title']}"/>
>> +                            </a>
>> +                        </rich:column>
>> +                        <rich:column style="text-align: center">
>> +                            <f:facet name="header">#{messages['jsf.Actions']}</f:facet>
>> +                            <a4j:commandButton value="#{messages['jsf.Clear']}"
>> +                                               action="#{translationMemoryAction.clearTransMemory(tm.slug)}"
>> +                                               render="tmList"
>> +                                               rendered="#{translationMemoryAction.getTranslationMemorySize(tm.slug) gt 0}"
> 
> This is getting a bit logic-heavy for EL. I would prefer something like
> |rendered="#{not translationMemoryAction.isTMEmpty(tm.slug)}"|, or even
> |rendered="#{translationMemoryAction.canClearTM(tm.slug)}"|
> 
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/zanata/zanata-server/pull/78/files#r5647923>.
> 

Or just leave the button enabled all the time.  I think I would prefer
if it was always enabled, even when it won't actually do much.

-- 
Sean Flanigan

Senior Software Engineer
Engineering - Internationalisation
Red Hat