Skip to content

Commit

Permalink
Dev: twig view inheritance, POC
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 23, 2017
1 parent cf5de7c commit 2407a1a
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/news_paper/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<css replace="css/bootstrap.css">css/bootstrap.css</css>
</cssframework>

<!-- Path of the pstpl files -->
<!-- Path of the twig files -->
<viewdirectory>views</viewdirectory>
</engine>
</config>
3 changes: 3 additions & 0 deletions templates/ubuntu_orange/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@
<name>bootstrap</name>
<css replace="css/bootstrap.css">css/bootstrap.css</css>
</cssframework>

<!-- Path of the twig files -->
<viewdirectory>views</viewdirectory>
</engine>
</config>
83 changes: 83 additions & 0 deletions templates/ubuntu_orange/views/layout_first_page.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{#
LimeSurvey
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
All rights reserved.
License: GNU/GPL License v2 or later, see LICENSE.php
LimeSurvey is free software. This version may have been modified pursuant
to the GNU General Public License, and as distributed it includes or
is derivative of works licensed under the GNU General Public License or
other free or open source software licenses.
See COPYRIGHT.php for copyright notices and details.
(¯`·._.·(¯`·._.· First Page Layout ·._.·´¯)·._.·´¯)
This layout is used to display the first page (title, welcome message, privacy, etc).
It is displayed only on "question by question" or "group by group" mode, when the welcome message is activated.
#}
<!DOCTYPE html>
<html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}" class="no-js {{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} ">

{# Headers, metadata, etc #}
{{ include('./subviews/head.twig') }}

<body class="default lang-{{surveylanguage}} {{surveyformat}}">

{# Bootstrap Navigation Bar: the top menu #}
{{ include('./subviews/nav_bar.twig') }}

{# Top Container: in this template, it contains only #}
{{ include('./subviews/progess_bar.twig') }}

<!-- Outer Frame Container -->
<div class="outerframe container" id="outerframeContainer">

<!-- Main Row -->
<div id="main-row">
<!-- Main Col -->
<div class="col-centered" id="main-col">

{# Include the various Warnings (preview mode, unanswered mandatory questions, etc) #}
{{ include('./subviews/warnings.twig') }}
ORANGE
{# Include the form opening tag #}
{{ include('./subviews/start_form.twig') }} <!-- main form -->

{# This will display the script and the hidden inputs needed for Expression Manager #}
{{ aSurveyInfo.EM.ScriptsAndHiddenInputs }}

{# Include the alert for no JavaScript #}
{{ include('./subviews/no_js_alert.twig') }}

{# Include the language changer selector #}
{{ include('./subviews/language_changer.twig') }}

{# If survey mode is "All in One", this will add the welcome/privacy messages (if activated) #}
{{ include('./subviews/welcome.twig') }}

{% if(aSurveyInfo.anonymized) == "Y" %}
{{ include('./subviews/privacy/privacy.twig') }}
{% endif %}

{# Presents the navigator #}
{{ include('./subviews/navigation/navigator.twig') }}
</form> <!-- main form -->
</div> <!-- main col -->
</div> <!-- main row -->
</div> <!-- outer frame container -->

{# Bootstrap alert modal #}
{{ include('./subviews/bootstrap_alert_modal.twig') }}

<!-- some template.js function launched before ready -->
<script type="text/javascript">
/*<![CDATA[*/
sliderSuffixClone();
fixBodyPadding();
hideQuestionWithRelevanceSubQuestion();
hideEmptyPart();
/*]]>*/
</script>
</body>
</html>
<!-- end of startpage.twig -->

0 comments on commit 2407a1a

Please sign in to comment.