Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Linnea Samila
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8f72d811
authored
Dec 06, 2014
by
Tuukka Kivilahti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick layout fixesQ
1 parent
380c6c51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
44 deletions
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEvent.java
code/moya-web/WebContent/eventorg/editEvent.xhtml
code/moya-web/WebContent/resources/templates/primelayout/template.xhtml
code/moya-web/src/main/java/fi/codecrew/moya/handler/SessionHandler.java
code/moya-database/src/main/java/fi/codecrew/moya/model/LanEvent.java
View file @
8f72d81
...
...
@@ -325,6 +325,7 @@ public class LanEvent extends GenericEntity {
}
public
String
getTheme
()
{
return
theme
;
}
...
...
code/moya-web/WebContent/eventorg/editEvent.xhtml
View file @
8f72d81
...
...
@@ -57,7 +57,7 @@
<p:outputLabel
for=
"themeSwitcher"
value=
"#{i18n['event.theme']}:"
/>
<p:themeSwitcher
value=
"#{eventorgView.event.theme}"
id=
"themeSwitcher"
var=
"t"
style=
"width: 200px;"
>
<f:selectItem
itemLabel=
"Choose Theme"
itemValue=
"
Aristo
"
/>
<f:selectItem
itemLabel=
"Choose Theme"
itemValue=
""
/>
<f:selectItems
value=
"#{themeSwitcherView.themes}"
/>
</p:themeSwitcher>
<p:message
for=
"themeSwitcher"
/>
...
...
code/moya-web/WebContent/resources/templates/primelayout/template.xhtml
View file @
8f72d81
...
...
@@ -98,6 +98,14 @@
</div>
<div
id=
"header_center"
>
<h:form
rendered=
"#{menuView.renderTopmenuChanger}"
>
<p:button
outcome=
"/index"
value=
"#{i18n['mode.user']}"
/>
<p:button
outcome=
"/useradmin/list"
value=
"#{i18n['mode.admin']}"
/>
</h:form>
<ui:fragment
rendered=
"#{layoutView.canManageContent}"
>
<div>
<h:form>
...
...
@@ -116,12 +124,43 @@
</p:layoutUnit>
<p:layoutUnit
header=
"#{i18n['menu']}"
collapsible=
"true"
id=
"leftpanel"
position=
"west"
resizable=
"true"
size=
"200"
minSize=
"100"
>
<p:fieldset
rendered=
"#{sessionHandler.loggedIn}"
>
<h:outputText
value=
"#{i18n['template.loggedInAs']}"
/>
<br
/>
<b><h:outputText
value=
"#{sessionHandler.currentUser.nick}"
/></b>
<br
/>
<h:link
outcome=
"/auth/logout"
>
<h:outputText
value=
"#{i18n['login.logout']}"
/>
</h:link>
</p:fieldset>
<br
/>
<nav>
<h:form
id=
"mainMenu"
>
<p:panelMenu
id=
"panelmenu"
model=
"#{primeMenuView.menuModel}"
/>
</h:form>
<h:link
style=
"font-size: 10px;"
rendered=
"#{readerView.shopToOthers}"
outcome=
"/shop/showReaderEvents"
value=
"Readers"
/>
</nav>
<br
/>
<p:fieldset
rendered=
"#{!sessionHandler.loggedIn}"
>
<div
style=
"text-align: left; padding: 0.7em;"
>
<h:form>
<p:inputText
styleClass=
"form"
id=
"linelogin"
value=
"#{authView.login}"
/>
<br
/>
<p:password
styleClass=
"form"
id=
"linepwd"
value=
"#{authView.password}"
/>
<br
/>
<p:commandButton
styleClass=
"button"
id=
"onelinesubmit"
action=
"#{authView.executeLoginAction}"
ajax=
"false"
value=
"#{i18n['login.submit']}"
/>
</h:form>
<ui:fragment
rendered=
"#{authView.canCreateUser}"
>
<h:link
value=
"#{i18n['submenu.user.create']}"
outcome=
"/user/create"
/>
<br
/>
</ui:fragment>
<h:link
value=
"#{i18n['submenu.auth.sendResetMail']}"
outcome=
"/auth/sendResetMail"
/>
</div>
</p:fieldset>
</p:layoutUnit>
<p:layoutUnit
position=
"center"
>
...
...
@@ -169,47 +208,6 @@
</p:layoutUnit>
<p:layoutUnit
header=
"#{i18n['user.info']}"
resizable=
"true"
collapsible=
"true"
id=
"rightpanel"
position=
"east"
>
<p:fieldset
rendered=
"#{sessionHandler.loggedIn}"
>
<h:outputText
value=
"#{i18n['template.loggedInAs']}"
/>
<br
/>
<b><h:outputText
value=
"#{sessionHandler.currentUser.nick}"
/></b>
<br
/>
<h:link
outcome=
"/auth/logout"
>
<h:outputText
value=
"#{i18n['login.logout']}"
/>
</h:link>
</p:fieldset>
<p:fieldset
rendered=
"#{!sessionHandler.loggedIn}"
>
<div
style=
"text-align: left; padding: 0.7em;"
>
<h:form>
<p:inputText
styleClass=
"form"
id=
"linelogin"
value=
"#{authView.login}"
/>
<br
/>
<p:password
styleClass=
"form"
id=
"linepwd"
value=
"#{authView.password}"
/>
<br
/>
<p:commandButton
styleClass=
"button"
id=
"onelinesubmit"
action=
"#{authView.executeLoginAction}"
ajax=
"false"
value=
"#{i18n['login.submit']}"
/>
</h:form>
<ui:fragment
rendered=
"#{authView.canCreateUser}"
>
<h:link
value=
"#{i18n['submenu.user.create']}"
outcome=
"/user/create"
/>
<br
/>
</ui:fragment>
<h:link
value=
"#{i18n['submenu.auth.sendResetMail']}"
outcome=
"/auth/sendResetMail"
/>
</div>
</p:fieldset>
<br
/>
<p:fieldset
legend=
"#{i18n['mode.title']}"
rendered=
"#{menuView.renderTopmenuChanger}"
>
<h:form>
<p:button
outcome=
"/index"
value=
"#{i18n['mode.user']}"
/>
<br
/>
<p:button
outcome=
"/useradmin/list"
value=
"#{i18n['mode.admin']}"
/>
</h:form>
</p:fieldset>
</p:layoutUnit>
</p:layout>
<h:form>
...
...
code/moya-web/src/main/java/fi/codecrew/moya/handler/SessionHandler.java
View file @
8f72d81
...
...
@@ -92,7 +92,7 @@ public class SessionHandler {
if
(
theme
==
null
)
{
theme
=
eventbean
.
getCurrentEvent
().
getTheme
();
}
if
(
theme
==
null
)
{
if
(
theme
==
null
||
theme
.
trim
().
isEmpty
()
)
{
// primefaces default theme
theme
=
"aristo"
;
}
...
...
@@ -124,7 +124,7 @@ public class SessionHandler {
template
=
eventbean
.
getPropertyString
(
LanEventPropertyKey
.
EVENT_LAYOUT
);
}
if
(
template
==
null
)
{
template
=
"
insomnia2
"
;
template
=
"
primelayout
"
;
}
return
template
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment