# This file is part of NIT ( http://www.nitlanguage.org ). # # Copyright 2014 Alexis Laferrière # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # View logic of the Web interface Benitlux module benitlux_view import benitlux_model import template # Template for the whole Benitlux page class BenitluxDocument super Template # Page title var page_title = "Benitlux Mailing List" is writable # Page header fun header: Template do return new BenitluxHeader # Error or success message content, will be shown in a dismissable panel var message_content: nullable String = null is writable # Error or success message level (success/danger/warning/info) var message_level: nullable String = null is writable # Lines of the last email sent to subscribers var sample_email_lines: nullable Array[String] = null is writable redef fun rendering do add """ """ add page_title add """ """ add header add """

Service de diffusion des changements au menu de l'excellente Brasserie Bénélux sur la rue Sherbrooke. La liste est mise à jours tous les jours à 14h, le courriel est envoyé au même moment.

@
""" var message_level = message_level var message_content = message_content if message_level != null and message_content != null then add """ """ end var sample_email_lines = sample_email_lines if sample_email_lines != null then add """
Dernier courriel envoyé
  • {{{sample_email_lines.join("
  • ")}}}
""" end add """
""" end end # Template for the header of Benitlux (right after the opening of ``) class BenitluxHeader super Template redef fun rendering do add """ """ end end