]> git.agnieray.net Git - galette.git/blob - galette/templates/default/desktop.tpl
4bf7f1032a6380eb2f6cf6f2787391e48c132eba
[galette.git] / galette / templates / default / desktop.tpl
1 {extends file="page.tpl"}
2 {block name="content"}
3 {if not $hide_telemetry and not $GALETTE_MODE eq 'DEMO'}
4 <section id="share">
5 <header class="ui-state-default ui-state-active">
6 {_T string="Help us know about you!"}
7 </header>
8 <div>
9 <p>
10 {_T string="Take a moment to share some information with us so we can know better Galette's uses."}<br/>
11 </p>
12 {if not $telemetry_sent}
13 <a id="telemetry" href="#" title="{_T string="Send anonymous and imprecise data about your Galette instance"}">{_T string="Telemetry"}</a>
14 {/if}
15 {if not $registered}
16 <a id="register" href="{$smarty.const.GALETTE_TELEMETRY_URI}reference?showmodal&uuid={$reguuid}" title="{_T string="Register your organization as a Galette user"}" target="_blank">{_T string="Register"}</a>
17 {/if}
18 <p class="center" title="{_T string="The panel will be automatically hidden once you have registered and send telemetry data. Check the box if you want to hide it anyways."}">
19 <input type="checkbox" name="hide_telemetry" id="hide_telemetry" value="1"{if $hide_telemetry} checked="checked"{/if}/>
20 <label for="hide_telemetry">{_T string="Hide this panel"}</label>
21 </p>
22 </section>
23 {/if}
24 <section id="desktop">
25 <header class="ui-state-default ui-state-active">
26 {_T string="Activities"}
27 </header>
28 <div>
29 {if $login->isAdmin() or $login->isStaff() or $login->isGroupManager()}
30 <a id="members" href="{path_for name="members"}" title="{_T string="View, search into and filter member's list"}">{_T string="Members"}</a>
31 <a id="groups" href="{path_for name="groups"}" title="{_T string="View and manage groups"}">{_T string="Groups"}</a>
32 {if $login->isAdmin() or $login->isStaff()}
33 <a id="contribs" href="{path_for name="contributions" data=["type" => "contributions"]}" title="{_T string="View and filter contributions"}">{_T string="Contributions"}</a>
34 <a id="transactions" href="{path_for name="contributions" data=["type" => "transactions"]}" title="{_T string="View and filter transactions"}">{_T string="Transactions"}</a>
35 <a id="mailings" href="{path_for name="mailings"}" title="{_T string="Manage mailings that has been sent"}">{_T string="Mailings"}</a>
36 <a id="reminder" href="{path_for name="reminders"}" title="{_T string="Send reminders to late members"}">{_T string="Reminders"}</a>
37 {/if}
38 {if $login->isAdmin()}
39 <a id="prefs" href="{path_for name="preferences"}" title="{_T string="Set applications preferences (address, website, member's cards configuration, ...)"}">{_T string="Settings"}</a>
40 <a id="plugins" href="{path_for name="plugins"}" title="{_T string="Information about available plugins"}">{_T string="Plugins"}</a>
41 {* Include plugins user dashboard *}
42 {$plugins->getDashboard($tpl)}
43 {/if}
44 {else}
45 {* Single member *}
46 <a id="members" href="{path_for name="me"}" title="{_T string="View my member card"}">{_T string="My information"}</a>
47 <a id="contribs" href="{path_for name="contributions" data=["type" => "contributions"]}" title="{_T string="View and filter all my contributions"}">{_T string="My contributions"}</a>
48 <a id="transactions" href="{path_for name="contributions" data=["type" => "transactions"]}" title="{_T string="View and filter all my transactions"}">{_T string="My transactions"}</a>
49 {* Include plugins user dashboard *}
50 {$plugins->getMemberDashboard($tpl)}
51 {/if}
52 </div>
53 </section>
54 {if $news|@count > 0}
55 <section id="news">
56 <header class="ui-state-default ui-state-active">
57 {_T string="News"}
58 </header>
59 <div>
60 {foreach from=$news item=post}
61 <p>
62 <a href="{$post.url}" target="_blank">{$post.title}</a>
63 </p>
64 {/foreach}
65 </div>
66 </section>
67 {/if}
68 <p class="center">
69 <input type="checkbox" name="show_dashboard" id="show_dashboard" value="1"{if $show_dashboard} checked="checked"{/if}/>
70 <label for="show_dashboard">{_T string="Show dashboard on login"}</label>
71 </p>
72
73 {if not $hide_telemetry and not $telemetry_sent}
74 {include file="telemetry.tpl" part="dialog"}
75 {/if}
76 {/block}
77
78 {block name="javascripts"}
79 <script>
80 $(function() {
81 $('#show_dashboard').change(function(){
82 var _checked = $(this).is(':checked');
83 Cookies.set(
84 'show_galette_dashboard',
85 (_checked ? 1 : 0),
86 {
87 expires: 365,
88 path: '/'
89 }
90 );
91 if ( !_checked ) {
92 var _url = '{path_for name="members"}';
93 window.location.replace(_url);
94 }
95 });
96
97 {if not $hide_telemetry}
98 $('#hide_telemetry').change(function(){
99 var _checked = $(this).is(':checked');
100 Cookies.set(
101 'hide_galette_telemetry',
102 (_checked ? 1 : 0),
103 {
104 expires: 365,
105 path: '/'
106 }
107 );
108 var _url = '{path_for name="dashboard"}';
109 window.location.replace(_url);
110 });
111
112 {if not $telemetry_sent}
113 {include file="telemetry.tpl" part="jsdialog" orig="desktop"}
114 {/if}
115 {if not $registered}
116 {include file="telemetry.tpl" part="jsregister" orig="desktop"}
117 {/if}
118 {/if}
119 });
120 </script>
121 {/block}