bsw@1045: function getIssuesSelector() bsw@1045: return Issue:new_selector() bsw@1045: :add_order_by([[ bsw@1045: coalesce( bsw@1045: issue.fully_frozen + issue.voting_time, bsw@1045: issue.half_frozen + issue.verification_time, bsw@1045: issue.accepted + issue.discussion_time, bsw@1045: issue.created + issue.admission_time bsw@1045: ) - now() bsw@1045: ]]) bsw@1045: end bsw@276: bsw@1045: --[[ bsw@1045: ui.title( function () bsw@1045: ui.link { attr = { class = "home" }, module = "index", view = "index", text = _"Home" } bsw@1045: end) bsw@1045: --]] bsw@1045: bsw@1045: ui.title() bsw@276: bsw@1045: if false then bsw@1045: slot.select ( "tabs", function () bsw@276: bsw@1045: ui.tag { bsw@1045: attr = { onclick = "showTab(0);" }, bsw@1045: content = "units", bsw@1045: } bsw@1045: slot.put ( " " ) bsw@1045: ui.tag { bsw@1045: attr = { onclick = "showTab(1);" }, bsw@1045: content = "timeline" bsw@1045: } bsw@1045: slot.put ( " " ) bsw@1045: ui.tag { bsw@1045: attr = { onclick = "showTab(2);" }, bsw@1045: content = "what" bsw@1045: } bsw@1045: slot.put ( " " ) bsw@1045: ui.tag { bsw@1045: attr = { onclick = "showTab(3);" }, bsw@1045: content = "members" bsw@1045: } bsw@462: bsw@1045: end ) bsw@462: bsw@1045: ui.script { script = [[ bsw@1045: bsw@1045: var tabs = ["tab1", "main", "tab2", "tab3"] bsw@1045: var currentId; bsw@1045: bsw@1045: function showTab(id) { bsw@1045: var tabId = tabs[id]; bsw@1045: $('.tab').hide(); bsw@1045: $('.main').hide(); bsw@1045: $('.' + tabId).show(); bsw@1045: currentId = id; bsw@1045: }; bsw@1045: bsw@1045: showTab(0); bsw@1045: bsw@1045: $(function(){ bsw@1045: // Bind the swipeHandler callback function to the swipe event on div.box bsw@1045: $( "body" ).on( "swiperight", function swipeHandler( event ) { bsw@1045: newId = currentId - 1; bsw@1045: if (newId < 0) return; bsw@1045: showTab(newId); bsw@1045: } ) bsw@1045: $( "body" ).on( "swipeleft", function swipeHandler( event ) { bsw@1045: newId = currentId + 1; bsw@1045: if (newId > tabs.length - 1) return; bsw@1045: showTab(newId); bsw@1045: } ) bsw@1045: }); bsw@1045: bsw@1045: ]]} bsw@1045: end bsw/jbe@0: bsw@1045: bsw@1045: if app.session.member then bsw@1045: execute.view{ module = "index", view = "_sidebar_motd_intern" } bsw@1045: else bsw@1045: execute.view{ module = "index", view = "_sidebar_motd_public" } bsw@1045: end bsw@1045: bsw@1045: if app.session:has_access("anonymous") then bsw@1045: -- show the units the member has voting privileges for bsw@1045: execute.view { bsw@1045: module = "index", view = "_sidebar_units", params = { bsw@1045: member = app.session.member bsw@462: } bsw@462: } bsw@1045: end bsw/jbe@0: bsw@1045: -- show the user what can be done bsw@1045: execute.view { module = "index", view = "_sidebar_whatcanido" } bsw/jbe@0: bsw@1045: -- show active members bsw@1045: if app.session:has_access("all_pseudonymous") then bsw@1045: execute.view{ module = "index", view = "_sidebar_members" } jorges@103: end jorges@103: bsw@1045: if app.session:has_access("anonymous") then bsw@1045: bsw@1045: if not app.session.member then bsw@1045: -- execute.view { bsw@1045: -- module = "slideshow", view = "_index" bsw@1045: -- } bsw@1045: end bsw@1045: bsw@1045: execute.view { bsw@1045: module = "issue", view = "_list2", params = { } bsw@1045: } bsw@1045: bsw@1045: end -- if app.session:has_access "anonymous"