]> git.agnieray.net Git - galette.git/blob - galette/templates/default/public_page.tpl
Rework lang selector; drop flags
[galette.git] / galette / templates / default / public_page.tpl
1 <!DOCTYPE html>
2 <html lang="{$galette_lang}" class="public_page{if $additionnal_html_class} {$additionnal_html_class}{/if}">
3 <head>
4 {include file='common_header.tpl'}
5 {if $require_calendar}
6 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.datepicker.min.js"></script>
7 {if $galette_lang ne 'en'}
8 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/i18n/jquery.ui.datepicker-{$galette_lang}.min.js"></script>
9 {/if}
10 {/if}
11 {if $require_dialog}
12 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.mouse.min.js"></script>
13 {* Drag component, only used for Dialog for the moment *}
14 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.draggable.min.js"></script>
15 {* So the dialog could be aligned in the middle of the screen *}
16 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.position.min.js"></script>
17 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.dialog.min.js"></script>
18 {/if}
19 {if $autocomplete}
20 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.menu.min.js"></script>
21 <script type="text/javascript" src="{base_url}/{$jquery_dir}jquery-ui-{$jquery_ui_version}/jquery.ui.autocomplete.min.js"></script>
22 <script type="text/javascript">
23 $(function() {
24 {if $require_calendar}
25 $.datepicker.setDefaults($.datepicker.regional['{$galette_lang}']);
26 {if $galette_lang eq 'en'}
27 $.datepicker.setDefaults({
28 dateFormat: 'yy-mm-dd'
29 });
30 {/if}
31 {/if}
32 $('#ville_adh, #lieu_naissance').autocomplete({
33 source: function (request, response) {
34 $.post('{path_for name="suggestTown"}', request, response);
35 },
36 minLength: 2
37 });
38 $('#pays_adh').autocomplete({
39 source: function (request, response) {
40 $.post('{path_for name="suggestCountry"}', request, response);
41 },
42 minLength: 2
43 });
44 });
45 </script>
46 {/if}
47 {* If some additionnals headers should be added from plugins, we load the relevant template file
48 We have to use a template file, so Smarty will do its work (like replacing variables). *}
49 {if $headers|@count != 0}
50 {foreach from=$headers item=header key=mid}
51 {include file=$header module_id=$mid}
52 {/foreach}
53 {/if}
54 {if $head_redirect}
55 <meta http-equiv="refresh" content="{$head_redirect.timeout};url={$head_redirect.url}" />
56 {/if}
57 </head>
58 <body>
59 {if isset($GALETTE_DISPLAY_ERRORS) && $GALETTE_DISPLAY_ERRORS && $GALETTE_MODE != 'DEV'}
60 <div id="oldie">
61 <p>{_T string="Galette is configured to display errors. This must be avoided in production environments."}</p>
62 </div>
63 {/if}
64 {* IE8 and above are no longer supported *}
65 <!--[if lte IE 8]>
66 <div id="oldie">
67 <p>{_T string="Your browser version is way too old and no longer supported in Galette for a while."}</p>
68 <p>{_T string="Please update your browser or use an alternative one, like Mozilla Firefox (http://mozilla.org)."}</p>
69 </div>
70 <![endif]-->
71 <header>
72 <img src="{path_for name="logo"}" width="{$logo->getOptimalWidth()}" height="{$logo->getOptimalHeight()}" alt="[ Galette ]" />
73 <form action="" id="plang_selector">
74 <select id="lang_selector" name="ui_pref_lang">
75 {foreach item=langue from=$languages}
76 <option value="{$langue->getID()}" lang="{$langue->getAbbrev()}"{if $galette_lang eq $langue->getAbbrev()} selected="selected"{/if}>{$langue->getName()|ucfirst}</option>
77 {/foreach}
78 </select>
79 <noscript>
80 <input type="submit" name="{_T string="Change language"}" />
81 </noscript>
82 </form>
83 {if $login->isLogged()}
84 <div id="user">
85 <a id="userlink" class="tooltip" title="{_T string="View your member card"}" href="{if $login->isSuperAdmin()}{path_for name="slash"}{else}{path_for name="me"}{/if}">{$login->loggedInAs(true)}</a>
86 <a id="logout_10" class="tooltip" href="{if $login->isImpersonated()}{path_for name="unimpersonate"}{else}{path_for name="logout"}{/if}"><i class="fas fa-{if $login->isImpersonated()}user-secret{else}sign-out-alt{/if}"></i><span class="sr-only">{_T string="Log off"}</span></a>
87 </div>
88 {/if}
89 {if $GALETTE_MODE eq 'DEMO'}
90 <div id="demo" title="{_T string="This application runs under DEMO mode, all features may not be available."}">
91 {_T string="Demonstration"}
92 </div>
93 {/if}
94 </header>
95 <h1 id="titre">{$page_title}</h1>
96 <p id="asso_name">{$preferences->pref_nom}{if $preferences->pref_slogan}&nbsp;: {$preferences->pref_slogan}{/if}</p>
97 <nav>
98 <a
99 href="{path_for name="slash"}"
100 class="button{if $cur_route eq "slash" or $cur_route eq 'login'} selected{/if}"
101 >
102 <i class="fas fa-home"></i>
103 {_T string="Home"}
104 </a>
105 {if !$login->isLogged()}
106 {if $preferences->pref_bool_selfsubscribe eq true}
107 <a
108 id="subscribe"
109 href="{path_for name="subscribe"}"
110 class="button{if $cur_route eq "subscribe"} selected{/if}"
111 >
112 <i class="fas fa-user-graduate" aria-hidden="true"></i>
113 {_T string="Subscribe"}
114 </a>
115 {/if}
116 {if $pref_mail_method neq constant('Galette\Core\GaletteMail::METHOD_DISABLED')}
117 <a
118 id="lostpassword"
119 href="{path_for name="password-lost"}"
120 class="button{if $cur_route eq "password-lost"} selected{/if}"
121 >
122 <i class="fas fa-unlock-alt" aria-hidden="true"></i>
123 {_T string="Lost your password?"}
124 </a>
125 {/if}
126 {/if}
127 {if $preferences->showPublicPages($login) eq true}
128 <a
129 href="{path_for name="publicList" data=["type" => "list"]}" title="{_T string="Members list"}"
130 class="button{if $cur_route eq "publicList" and $cur_subroute eq "list"} selected{/if}"
131 >
132 <i class="fas fa-address-book"></i>
133 {_T string="Members list"}
134 </a>
135 <a
136 class="button{if $cur_route eq "publicList" and $cur_subroute eq "trombi"} selected{/if}"
137 href="{path_for name="publicList" data=["type" => "trombi"]}" title="{_T string="Trombinoscope"}"
138 >
139 <i class="fas fa-user-friends"></i>
140 {_T string="Trombinoscope"}
141 </a>
142 {* Include plugins menu entries *}
143 {$plugins->getPublicMenus($tpl, true)}
144 {/if}
145 </nav>
146 {include file="global_messages.tpl"}
147 {block name="content"}{_T string="Public page content"}{/block}
148 {include file="footer.tpl"}
149 {block name="javascripts"}{/block}
150 </body>
151 </html>