root/yapcasia2008/actdocs/templates/user/main

Revision 2709 (checked in by miyagawa, 12 years ago)

some JSONP stuff

Line 
1 [% WRAPPER ui title = loc("Main private page") %]
2
3 <p>
4  {{This is your personal page.}}
5  [% IF global.request.conference %]
6  [% loc("to <this conference>", global.conference.name) %]
7  [% ELSE %]
8  {{to Act-enabled conferences.}}
9  [% END %]
10 </p>
11
12 [% # let's do the math
13   USE formatter = format('%04d%04d');                                                                                       
14   SET n = global.request.user.user_id;
15   c =  (3 * n * n - 2 * (n % 9) + 7) % 10000;
16   u = global.request.user;
17   SET ac = formatter(n, c);
18   UNLESS u.is_orga || u.is_staff || u.has_talk || u.has_paid;
19   ac = ac _ "X";
20   END;
21 %]
22 <style>
23 .checkin-code { font-size: 150%; font-weight: bold }
24 </style>
25
26 [% IF global.request.conference %]
27     [% IF global.request.user.has_registered %]
28  <div style="text-align:right"><img src="http://blog.bulknews.net/yapc/qr.cgi?token=[% ac %]" align="right"/></div>
29
30 <p><t>
31  <en>Your check-in code for the conference is <span class="checkin-code">[% ac %]</span>. Print this page and bring to the conference for the quick check-in.</en>
32  <ja>あなたのカンファレンスアクセスコードは <span class="checkin-code">[% ac %]</span> です。このページをプリントアウトしてお持ちください。</ja>
33  </t></p>
34  
35         [% IF global.request.user.has_paid %]
36             <p>{{You have purchased your conference ticket:}}</p>
37             <p><blockquote>
38                 {{Order number}}: <strong>[% order.order_id %]</strong><br />
39                 {{Payment date}}: <strong>[% date_format(order.datetime, 'datetime_full') %] GMT</strong><br />
40                 {{Amount paid}}: [% FOREACH i IN order.items; IF i.registration %]
41                     <strong>[% i.amount %] [% order.currency %][% IF i.name %] ([% i.name %])[% END %]</strong>[% END; END %]
42             </blockquote/></p>
43             [% IF global.config.payment_invoices %]
44                 <p>[% loc("Download your invoice", make_uri_info('invoice', order.order_id)) %]</p>
45             [% END %]
46         [% ELSIF global.config.payment_type != "NONE" %]
47             <p>
48                 {{You have not bought your conference ticket yet.}}
49                 [% IF global.config.payment_open %]
50                      {{Please consider doing so using our online payment system.}}
51                 [% ELSE %]
52                     {{Please consider doing so once our online payment system is ready.}}
53                 [% END %]
54             </p>
55         [% END %]
56     [% ELSIF !global.config.closed %]
57         [% loc("You did not register for this conference", make_uri('register')) %]
58     [% END %]
59 [% END %]
60
61 <div id="party-yes" style="visibility:hidden">
62 <t>
63 <en>You're <strong>selected</strong> to attend to the <a href="http://conferences.yapcasia.org/ya2008/event/320">‎Conference Dinner‎</a>. Congratulations!</en>
64 <ja><a href="http://conferences.yapcasia.org/ya2008/event/320">‎カンファレンスディナー‎</a> に参加できます。</ja>
65 </t>
66 </div>
67
68 <div id="party-no" style="visibility:hidden">
69 <t>
70 <en>We're sorry. You are <strong>not selected</strong> to attend to the <a href="http://conferences.yapcasia.org/ya2008/event/320">‎Conference Dinner‎</a>. You're currently No.<span id="waiting-count"></span> on the waiting list. See <a href="/ya2008/news/145">the news article</a> for details.
71 </en>
72 <ja>申し訳ありません。<a href="http://conferences.yapcasia.org/ya2008/event/320">‎カンファレンスディナー‎</a>には参加できません。現在順番待ちリストの <span id="waiting-count"></span> 番目となっています。詳細については <a href="/ya2008/news/145">ニュース記事</a> を参照してください。</ja>
73 </t>
74 </div>
75
76 <script>
77 function showPartyStatus(res) {
78   if (res == 0) {
79     document.getElementById('party-yes').style.visibility = "visible";
80   } else if(res) {
81     document.getElementById('party-no').style.visibility = "visible";
82     document.getElementById('waiting-count').innerHTML = res;
83   }
84 }
85
86 var el = document.createElement("script");
87 el.type = "text/javascript";
88 el.src = "http://blog.bulknews.net/yapc/party.cgi?id=[% global.request.user.user_id %]";
89 document.body.appendChild(el);
90 </script>
91
92 <p><b>{{You can:}}</b></p>
93 <ul>
94     [% IF global.request.user.has_registered AND global.config.payment_type != "NONE" %]
95         [% IF global.config.payment_open %]
96             [% UNLESS global.request.user.has_paid %]
97                 <li><a href="[% make_uri('purchase') %]">
98                 {{purchase your conference ticket}}
99                 </a><br /></li>
100             [% END %]
101             [% IF additional_purchase %]
102                 <li><a href="[% make_uri('purchase') %]">{{make additional purchases}}</a><br /></li>
103             [% END %]
104         [% END %]
105         [% IF orders.size %]
106             <li><a href="[% make_uri('orders') %]">{{view all orders and invoices}}</li>
107         [% END %]
108     [% ELSIF !global.config.closed %]
109         <li><a href="[% make_uri('register') %]">{{register for this conference}}</a><br /></li>
110     [% END %]
111     <li><a href="[% make_uri('change') %]">{{update your information}}</a><br /></li>
112     <li><a href="[% make_uri('photo') %]">{{manage your photo}}</a><br /></li>
113     <li><a href="[% make_uri('changepwd') %]">{{change your password}}</a></li>
114     [% IF global.request.conference AND talks.size %]
115         <li>{{see your talks (accepted talks are shown in bold type)}}:
116           <br />
117           <ul>
118            [% FOR t = talks %]
119              <li>[% talk_link(t) %] [% talk_modify_link(t) %]</li>
120            [% END %]
121           </ul>
122         </li>
123     [% END %]
124     [% IF global.config.talks_submissions_open
125        AND global.request.user.has_registered %]
126         <li><a href="[% make_uri('newtalk') %]">{{submit a talk}}</a><br /></li>
127     [% END %]
128     <li><a href="[% make_uri('logout') %]">{{log out}}</a></li>
129     [% IF can_unregister %]
130     <li><a href="[% make_uri('unregister') %]">[% loc("unregister from <this conference>", global.conference.name) %]</a></li>
131     [% END %]
132 </ul>
133
134 [% IF conferences.size %]
135 <p><b>{{Other Act conferences:}}</b></p>
136 <ul>
137 [% FOREACH c = conferences %]
138 [% NEXT IF c.begin.epoch <= 1210809600 %]
139 <li><a href="[% c.url %]">[% c.name %]</a>
140 [% SWITCH c.participation %]
141  [% CASE 'past' %]
142  {{(You were there)}}
143  [% CASE 'now' %]
144  {{(You are there)}}
145  [% CASE 'future' %]
146  {{(You will be there)}}
147 [% END %]
148 </li>[% END %]
149 </ul>
150 [% END %]
151
152 [% END %]
Note: See TracBrowser for help on using the browser.