Actions

テンプレートオプション

From LimeSurvey Manual

Revision as of 01:40, 27 May 2018 by Bravehorse (talk | contribs) (Created page with "*'''Ajaxモード:''' ''はい''にすると、アンケートページはajaxによって素早く読み込まれます(''平均的なLimeSurveyユーザー向けです''...")
LimeSurvey 3では、まったく新しいテンプレートエンジンシステムを導入しました。Twig 1.29Bootstrapを使用しており、テンプレートの継承と設定が可能になります。


Install テンプレートオプションを利用するには、Limesurvey 3.0+をインストールしてください。このオプションは古いバージョンのLimeSurveyでは使用できません。


はじめに

LimeSurvey 3にはテンプレートオプションという新機能があり、アンケートのテンプレートに関連した設定を素早く簡単に変更する様々なツールを利用できます。


テンプレートオプションパネル

新しいテンプレートオプション機能は設定メニューからアクセスします。



パネルのツールバーは2つのタブから構成されています。簡単なオプションとテンプレートエディターの高度なオプションです。


簡単なオプション

アクセスすると次のページが読み込まれます。



  各々のテンプレートには、アンケートのテンプレートオプションから変更できる特定のオプションがあります。このウィキセクションでは、LimeSurveyの既定のテンプレートであるfruityを使って素早さと簡便さを説明しますが、HTML・php・CSSに関する事前の知識なしにテンプレートに強力な変更を加えることが可能です。


あらかじめ簡単なオプションが選択されています。もっとも重要なアンケートテンプレートをここで変更することができます。

  • すべて継承する: はいを選択すると、すべてのテンプレート設定がグローバル設定レベルから継承されます。いいえをクリックして右上の保存ボタンを押すと、より多くのテンプレート設定オプションが表示されます。それぞれのオプションは以下のように設定できます。
    • アンケートグループのテンプレート設定を継承する - 継承(Inherit)(変更しない限り、アンケートのテンプレートはグローバルテンプレートを継承します。)
    • グローバルテンプレートの設定を継承しない - いいえ
    • はい。選択すると、テンプレート設定は好きなように変更できます。それぞれのテンプレート設定で継承が選べます。
継承の仕組みは3つのレベルで適用されます。
  • グローバルレベル(テンプレートリストから選択可能)他の2つのレベルはグローバルテンプレートを継承します。
  • アンケートグループレベル(アンケート設定パネルから設定可能)アンケートグループレベルのテンプレート設定はグローバルテンプレート設定を継承します。
  • アンケートレベル. アンケートテンプレート設定は、アンケートグループのテンプレート設定を継承します。


  • フルーツフォント: フルーツテンプレートで使用するフォントを選択します。
  • フルーツのバリエーション: ドロップダウンリストからフルーツテンプレートのバリエーションを選択します。フォントとアイコンの色が変わります。


継承しない

上述の通り、アンケート設定メニューからグローバルテンプレート設定継承しないという設定にすることができます。保存ボタンをクリックすると、多くのオプションが表示されます。



本機能が強力であることを示すため、以下の説明はfruityテンプレートに基づいています。テンプレートによって独自のカスタマイズオプションがあります。


  • Ajaxモード: はいにすると、アンケートページはajaxによって素早く読み込まれます(平均的なLimeSurveyユーザー向けです)。いいえにすると、ページは再読み込み操作によって読み込まれます。デバッグ向きです。
  • アンケートコンテナ: はいにすると、アンケートは幅が制限されているコンテナの中に表示されます。これは、アンケートの幅がコントロールされている携帯電話やタブレットからアンケートに答えるときに有効です。すべての質問を読んだり、回答の選択肢を見るために横方向にスクロールする必要がないため、回答者にとってより快適なものになります。一定の幅になっているブログや掲示板にアンケートを埋め込む場合には、このオプションをいいえにすることもできます。
  • 質問枠線: はいにすると、各質問は枠線内に表示されます。いいえにすると、質問は枠線を使いません(画面幅より大きな配列質問タイプを使うことができます)。
  • 質問シャドウ: はいにすると、質問枠線のまわりにシャドウが表示されます。

  • Background color: Select the background colour of the whole question, including the answers;
  • Font color: Change the font color by selecting from the popup menu the desired color.
  • Question background color: Change the question background color by selecting from the popup menu the desired color.
  • Check icon: This setting allows you to select the desired check icon when multiple choice question types are employed.

  • Background image: If set to no, you may select a different background image from the one used within your survey group and/or global theme settings. You may also upload a personalised survey background image by clicking on the upload button located in the bottom of the theme settings panel and selecting the desired image from your computer;
  • Brand logo: If set to no, the name of the survey will be shown in the top bar, else, you can select one of the pictures inside the file directory to be used as logo picture.

  • Animate body: If set to yes, you can choose one of the animations to apply when the "body" of the survey is loaded;
  • Animate question: If set to yes, you choose one of the animation to apply to your survey questions when they are loaded.
  • Animate alert: If set to yes, your survey alerts (when the survey data is not recorded or the wrong token is typed in) will be animated according to the selected animation option.
  • Animate checkbox: If set to yes, anytime you check an answer option, the animation is triggered.
  • Animate radio buttons: If set to yes, anytime you select an option from a radio-type question, the animation is triggered.
The library used for animations is animate.css. You can either use the default one or add your own animation library.


Type in a number in the duration field. If you type ten (10), then the animation will last for 10 seconds.

  • Fruity fonts: Select the font you wish to use for your theme;
  • Fruity variations:Select one of the available theme variations from the dropdown list. It changes the font and the icons colour.

  • Upload: Browse your computer to upload an image to be used as logo or background image for your theme. Writing permissions might be requested on the "/themes/survey/fruity/files" folder - the location where the uploaded images will be stored in your LimeSurvey installation.

Advanced options

<translate>

When you open the theme options tab, you can choose to edit either its simple options or its advanced options. “Advanced options” is just a naked form that gives you access to the main theme configuration fields from the database. To understand how it works, you should also read about the XML file and the creation of a theme from scratch. So, it’s rather complex and made for advanced users.

However, if you do wish to perform advanced settings editing, click on the advanced options tab



  • Files css: The CSS files that should be added to the template;
  • Files js: The JS files that should be added to the template;
  • Files Print Css: The CSS files to load when printing a template;
  • Options: This field includes the options (and their value) that should be parsed to the template view;
  • CssFramework Name: The name of the CSS framework to load. For now, only Bootstrap or nothing;
  • Cssframework Css: You can replace the core bootstrap.css in this field by a different custom version of it;
  • Cssframework Js: The field core boostrap.js can be replaced from here by a different custom version of it;
  • Packages To Load: You can load from this setting some core asset packages from LimeSurvey.

You’ll notice an upload input at the top, which gives you the possibility to upload a file into the file directory of the theme. These parameters can be used to change the entire appearance of the theme.

  Warning! : Don't touch the values unless you know what you're doing!


</translate>