From 5836247ae65229d46da559ba58055b36ea183c8e Mon Sep 17 00:00:00 2001 From: Laurent Opprecht Date: Fri, 20 Jul 2012 16:52:19 +0200 Subject: [PATCH] see #5228: glossary adding twig templates --- main/template/default/glossary/csv.tpl | 0 main/template/default/glossary/edit.tpl | 8 +++ main/template/default/glossary/header.tpl | 7 ++ main/template/default/glossary/index.tpl | 23 ++++++ main/template/default/glossary/javascript.tpl | 28 ++++++++ main/template/default/glossary/list.tpl | 35 +++++++++ main/template/default/glossary/table.tpl | 72 +++++++++++++++++++ main/template/default/glossary/upload.tpl | 8 +++ 8 files changed, 181 insertions(+) create mode 100644 main/template/default/glossary/csv.tpl create mode 100644 main/template/default/glossary/edit.tpl create mode 100644 main/template/default/glossary/header.tpl create mode 100644 main/template/default/glossary/index.tpl create mode 100644 main/template/default/glossary/javascript.tpl create mode 100644 main/template/default/glossary/list.tpl create mode 100644 main/template/default/glossary/table.tpl create mode 100644 main/template/default/glossary/upload.tpl diff --git a/main/template/default/glossary/csv.tpl b/main/template/default/glossary/csv.tpl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/main/template/default/glossary/edit.tpl b/main/template/default/glossary/edit.tpl new file mode 100644 index 0000000000..f935fd496c --- /dev/null +++ b/main/template/default/glossary/edit.tpl @@ -0,0 +1,8 @@ + +{% include 'default/glossary/header.tpl' %} + +
+ +
+ +{{form.return_form()}} \ No newline at end of file diff --git a/main/template/default/glossary/header.tpl b/main/template/default/glossary/header.tpl new file mode 100644 index 0000000000..f201381af4 --- /dev/null +++ b/main/template/default/glossary/header.tpl @@ -0,0 +1,7 @@ +{{javascript}} + +
+ {% for message in messages %} + {{ message }} + {% endfor %} +
\ No newline at end of file diff --git a/main/template/default/glossary/index.tpl b/main/template/default/glossary/index.tpl new file mode 100644 index 0000000000..275e3b76eb --- /dev/null +++ b/main/template/default/glossary/index.tpl @@ -0,0 +1,23 @@ +{% include 'default/glossary/header.tpl' %} +{% include 'default/glossary/javascript.tpl' %} + +
+ {% if is_allowed_to_edit %} + + + + + {% endif %} + {% if view == 'table' %} + + {% else %} + + {% endif %} + +
+ +{% if view == 'table' %} + {% include 'default/glossary/table.tpl' %} +{% else %} + {% include 'default/glossary/list.tpl' %} +{% endif %} diff --git a/main/template/default/glossary/javascript.tpl b/main/template/default/glossary/javascript.tpl new file mode 100644 index 0000000000..03fec01a0f --- /dev/null +++ b/main/template/default/glossary/javascript.tpl @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/main/template/default/glossary/list.tpl b/main/template/default/glossary/list.tpl new file mode 100644 index 0000000000..c169003010 --- /dev/null +++ b/main/template/default/glossary/list.tpl @@ -0,0 +1,35 @@ + + \ No newline at end of file diff --git a/main/template/default/glossary/table.tpl b/main/template/default/glossary/table.tpl new file mode 100644 index 0000000000..247e004810 --- /dev/null +++ b/main/template/default/glossary/table.tpl @@ -0,0 +1,72 @@ + + + + + + + + {% if is_allowed_to_edit %} + + {% endif %} + + + + {% for item in items %} + + + + {% if is_allowed_to_edit %} + + {% endif %} + + {% endfor %} + +
+ {{'TermName'|get_lang}} + + {{'TermDefinition'|get_lang}} + + {{'Actions'|get_lang}} +
+ {{item.name}} + + {{item.description}} + + {% if session_id == item.session_id %} + + + + + {% else %} + {{'EditionNotAvailableFromSession'|get_lang}} + {% endif %} +
+
+ diff --git a/main/template/default/glossary/upload.tpl b/main/template/default/glossary/upload.tpl new file mode 100644 index 0000000000..445a09ee86 --- /dev/null +++ b/main/template/default/glossary/upload.tpl @@ -0,0 +1,8 @@ +{% include 'default/glossary/header.tpl' %} + + +
+ +
+ +{{form.return_form()}} \ No newline at end of file