equal
deleted
inserted
replaced
952 |
952 |
953 # _() is just there to add messages to the catalog, don't care about actual |
953 # _() is just there to add messages to the catalog, don't care about actual |
954 # translation |
954 # translation |
955 PERM_USE_TEMPLATE_FORMAT = _('use_template_format') |
955 PERM_USE_TEMPLATE_FORMAT = _('use_template_format') |
956 |
956 |
|
957 from cubicweb.mttransforms import HAS_TAL |
|
958 |
957 class FormatConstraint(StaticVocabularyConstraint): |
959 class FormatConstraint(StaticVocabularyConstraint): |
958 need_perm_formats = (_('text/cubicweb-page-template'), |
960 if HAS_TAL: |
959 ) |
961 need_perm_formats = (_('text/cubicweb-page-template'),) |
|
962 else: |
|
963 need_perm_formats = () |
|
964 |
960 regular_formats = (_('text/rest'), |
965 regular_formats = (_('text/rest'), |
961 _('text/html'), |
966 _('text/html'), |
962 _('text/plain'), |
967 _('text/plain'), |
963 ) |
968 ) |
964 def __init__(self): |
969 def __init__(self): |