Personal tools
You are here: Home University 2nd Licence Génie logiciel ConfMan Seaside Package (html)
Document Actions

ConfMan Seaside Package (html)

by jfroche last modified 2006-11-20 00:01

Conference Manager written in Smalltalk - These are the Seaside interface classes

ConfMan-SeaSide.st

'From VisualWorks® NonCommercial, 7.3.1 of April 20, 2005 on December 26, 2005 at 1:19:30 am'!
"Package ConfMan-SeaSide*"!


Smalltalk defineClass: #WASharedRendering
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: ''
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WASharedRendering comment:
'WASharedRendering 

'!

Smalltalk defineClass: #WASecurityManager
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'waPermissionManager waMembershipManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WASecurityManager comment:
'WASecurityManager 



Instance Variables:
	waMembershipManager	<WAMembershipManagerView>	description of waMembershipManager
	waPermissionManager	<WAPermissionManagerView>	description of waPermissionManager

'!

Smalltalk defineClass: #WAConfManSession
	superclass: #{Seaside.WASession}
	indexedType: #none
	private: false
	instanceVariableNames: 'user userList navigationToolbar navigation '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

Smalltalk defineClass: #WAConfManLabelledFormDialog
	superclass: #{Seaside.WALabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'navigation '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

Smalltalk defineClass: #WAGroupAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'group '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAGroupAdd comment:
'WAGroupAdd has 

Allow to add a Group (Group are used for the security)

Instance Variables:
	group	<Group>	description of group

'!

Smalltalk defineClass: #WACommentAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'comment '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WACommentAdd comment:
'WACommentAdd 

Allow to add Comment about an Article

Instance Variables:
	comment	<Comment>	description of comment

'!

Smalltalk defineClass: #WAConferenceModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'conference confContainer userManager keyword1 keyword2 keyword3 keyword4 keyword5 locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAConferenceModify comment:
'WAConferenceModify 



Instance Variables:
	confContainer	<ConferenceContainer | WAKeywordsRenderer>	description of confContainer
	conference	<Conference>	description of conference
	keyword1	<Object | Proxy>	description of keyword1
	keyword2	<Object | Proxy>	description of keyword2
	keyword3	<Object | Proxy>	description of keyword3
	keyword4	<Object | Proxy>	description of keyword4
	keyword5	<Object | Proxy>	description of keyword5
	locationsContainer	<LocationsContainer>	description of locationsContainer
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WATalkAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'talk conference '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WATalkAdd comment:
'WATalkAdd 



Instance Variables:
	conference	<Conference>	description of conference
	talk	<Talk>	description of talk

'!

Smalltalk defineClass: #WAArticleAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'article keywords '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAArticleAdd comment:
'WAArticleAdd 

Allow to add an Article to a Conference

Instance Variables:
	article	<Article>	description of article
	keywords	<Object | Proxy>	description of keywords

'!

Smalltalk defineClass: #WAKeywordsRenderer
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'existingKeywords allKeywords keyword1 keyword2 keyword3 keyword4 keyword5 sharedKeywords '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAKeywordsRenderer comment:
'WAKeywordsRenderer 

Instance Variables:
	allKeywords	<(KeywordsContainer of: (Object | Proxy))>	description of allKeywords
	existingKeywords	<AbstractItem | ByteFieldDescriptor | Collection | MSEAbstractGroup | Timespan>	description of existingKeywords
	keyword1	<Object | Proxy>	description of keyword1
	keyword2	<Object | Proxy>	description of keyword2
	keyword3	<Object | Proxy>	description of keyword3
	keyword4	<Object | Proxy>	description of keyword4
	keyword5	<Object | Proxy>	description of keyword5
	sharedKeywords	<Conference | KeywordsContainer>	description of sharedKeywords

'!

Smalltalk defineClass: #WAPermissionModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'membershipManager permissionManager members permissionName '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAPermissionModify comment:
'WAPermissionModify 



Instance Variables:
	members	<Object | Proxy>	description of members
	membershipManager	<GroupManager | MembershipManager>	description of membershipManager
	permissionManager	<PermissionManager>	description of permissionManager
	permissionName	<Object | Proxy>	description of permissionName

'!

Smalltalk defineClass: #WAArticleModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'article '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAArticleModify comment:
'WAArticleModify 

Allow to modify an Article

Instance Variables:
	article	<Article>	description of article

'!

Smalltalk defineClass: #WALocationAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'location '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WALocationAdd comment:
'WALocationAdd 

Allow to add a new Location

Instance Variables:
	location	<Object | Proxy>	description of location

'!

Smalltalk defineClass: #WAUserModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'userManager currentUser '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAUserModify comment:
'WAUserModify 



Instance Variables:
	currentUser	<User>	description of currentUser
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WAConferenceAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'conference userManager confContainer keyword1 keyword2 keyword3 keyword4 keyword5 locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-Seaside'!

WAConferenceAdd comment:
'WAConferenceAdd 

Allow to create a new Conference

Instance Variables:
	confContainer	<ConferenceContainer>	contain Conference
	conference	<Conference>	description of conference
	keyword1	<Object | RemoteObject>	keyword about the subject of the Conference
	keyword2	<Object | RemoteObject>
	keyword3	<Object | RemoteObject>	
	keyword4	<Object | RemoteObject>	
	keyword5	<Object | RemoteObject>	
	locationsContainer	<LocationsContainer>	contain locations of the Conference
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WAMemberAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'memberName '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAMemberAdd comment:
'WAMemberAdd 



Instance Variables:
	memberName	<String>	description of memberName

'!

Smalltalk defineClass: #WAMemberModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'memberGroup members membershipManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAMemberModify comment:
'WAMemberModify 



Instance Variables:
	memberGroup	<String>	description of memberGroup
	members	<(String of: (AbstractItem | ByteFieldDescriptor | CCompoundType | (Collection of: (Object | Proxy)) | MC_FileBTree | MSEAbstractGroup | OtWeakKeyDictionary | PostgreSQLQueryResultList | RBProgramNode | Stream | WAStringLibrary | Week))>	description of members
	membershipManager	<MembershipManager>	description of membershipManager

'!

Smalltalk defineClass: #WAUserLogin
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'login password dictLogin '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

Smalltalk defineClass: #WARoomAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'room rooms '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WARoomAdd comment:
'WARoomAdd has 

Allow to add Room to a Location

Instance Variables:
	room	<Object | Proxy>	 Part of a Location

'!

Smalltalk defineClass: #WAConfManComponent
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'renderedObject navigation '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAConfManComponent comment:
'WAConfManComponent 

Instance Variables:
	navigation	<AbstractCodeProbe | AddNetUser | AssociationTreeWithParent | BlockAnalysisBlock | ButtonCanvas | CodeRegenerator | HttpProxyExceptions | MembershipManager | MessageElement | Node | PermissionManager | ProbeClone | RBProgramItem | RBProgramNode | SecureObject | Signal | SubRequest | Tag | VersionNode | WAConfManNavigation | WALocalConfiguration | WAParentTest | XMLFilter>	description of navigation
	renderedObject	<SecureObject | WAPermissionManagerView>	description of renderedObject

'!

Smalltalk defineClass: #WAGroupManager
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'groupManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAGroupManager comment:
'WAGroupManager 

Allow to manage Group (add group, view group, ...)

Instance Variables:
	groupManager	<GroupManager>	description of groupManager

'!

Smalltalk defineClass: #WAFillBase
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'confManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan'!

WAFillBase comment:
'WAFillBase 

Automatiquely fills the application with : User, Conference, Article, ....

Instance Variables:
	confManager	<ConferenceManager>	description of confManager

'!

Smalltalk defineClass: #WAUserList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'userManager objs '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAUserList comment:
'WAUserList 

Display the User list

Instance Variables:
	objs	<Object | Proxy> 	description of objs
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WAConferenceManagerView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'confManager loginManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAConferenceManagerView comment:
'WAConferenceManagerView 


Instance Variables:
	confManager	<ConferenceManager>	description of confManager
	loginManager	<WALoginManager>	description of loginManager

'!

Smalltalk defineClass: #WAConferenceView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'conference confContainer userManager locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAConferenceView comment:
'WAConferenceView 

Instance Variables:
	confContainer	<Object | Proxy>	description of confContainer
	conference	<Conference>	description of conference
	locationsContainer	<Object | Proxy>	description of locationsContainer
	userManager	<Object | Proxy>	description of userManager

'!

Smalltalk defineClass: #WALocationContainer
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'roomsContainer locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WALocationContainer comment:
'WALocationContainer 



Instance Variables:
	locationsContainer	<LocationsContainer>	description of locationsContainer
	roomsContainer	<Object | Proxy>	description of roomsContainer

'!

Smalltalk defineClass: #WAConferenceContainer
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'confContainer userManager locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan'!

WAConferenceContainer comment:
'WAConferenceContainer 

Display list of Conference

Instance Variables:
	confContainer	<ConferenceContainer>	description of confContainer
	locationsContainer	<LocationsContainer>	description of locationsContainer
	userManager	<Object | Proxy>	description of userManager

'!

Smalltalk defineClass: #WAArticleView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'article conference '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAArticleView comment:
'WAArticleView 

Display all details about an Article and action you can do on this Article.

Instance Variables:
	article	<Article>	article displayed
	conference	<Conference>	conference where''s the Article

'!

Smalltalk defineClass: #WALocationView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'locationsContainer location '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

Smalltalk defineClass: #WAUserManager
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'userManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan'!

Smalltalk defineClass: #WAArticleList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'conference '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAArticleList comment:
'WAArticleList 

List the Article of a Conference

Instance Variables:
	conference	<Conference>	Conference where the Article''s proposed '!

Smalltalk defineClass: #WAConferenceList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'confContainer userManager obj locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAConferenceList comment:
'WAConferenceList 



Instance Variables:
	confContainer	<ConferenceContainer>	description of confContainer
	locationsContainer	<Object | Proxy>	description of locationsContainer
	obj	<Object | Proxy>	description of obj
	userManager	<Object | Proxy>	description of userManager

'!

Smalltalk defineClass: #WALocationList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'locationsContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WALocationList comment:
'WALocationList 



Instance Variables:
	locationsContainer	<LocationsContainer>	description of locationsContainer

'!

Smalltalk defineClass: #WAPermissionManagerView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'permissionManager membershipManager permissionName '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAPermissionManagerView comment:
'WAPermissionManagerView 



Instance Variables:
	membershipManager	<Object | Proxy>	description of membershipManager
	permissionManager	<PermissionManager>	description of permissionManager
	permissionName	<Object | Proxy>	description of permissionName

'!

Smalltalk defineClass: #WAConfManNavigation
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'conferenceManager parent '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

Smalltalk defineClass: #WACommentList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'commentContainer '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WACommentList comment:
'WACommentList 

Display list of Comment about an Article and action you can do on the Comment

Instance Variables:
	commentContainer	<CommentContainer>	 contain Comment about an Article

'!

Smalltalk defineClass: #WALoginManager
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'userManager parent '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WALoginManager comment:
'WALoginManager 



Instance Variables:
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WAUserAdd
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'user userManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAUserAdd comment:
'WAUserAdd 

Allow to add a new User

Instance Variables:
	user	<User>	description of user
	userManager	<UserManager>	description of userManager

'!

Smalltalk defineClass: #WAScheduleView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'conference '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAScheduleView comment:
'WAScheduleView 



Instance Variables:
	conference	<Conference | WAScheduleView | WATalkAdd>	description of conference

'!

Smalltalk defineClass: #WAGroupList
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'groupManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'My Classes'!

WAGroupList comment:
'WAGroupList 

Display list of the name of the Groups

Instance Variables:
	groupManager	<GroupManager | MembershipManager>	description of groupManager

'!

Smalltalk defineClass: #WAMembershipManagerView
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'membershipManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAMembershipManagerView comment:
'WAMembershipManagerView 

Instance Variables:
	membershipManager	<MembershipManager>	description of membershipManager

'!

Smalltalk defineClass: #WAUserView
	superclass: #{Smalltalk.WAConfManComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'user userManager '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WAUserView comment:
'WAUserView 



Instance Variables:
	user	<User>	description of user
	userManager	<Object | Proxy>	description of userManager

'!

Smalltalk defineClass: #WAConferenceManager
	superclass: #{Seaside.WAComponent}
	indexedType: #none
	private: false
	instanceVariableNames: 'confTask task userToolbar loginManager navigationToolbar '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan'!

WAConferenceManager comment:
'WAConferenceManager 



Instance Variables:
	confTask	<WAConfManComponent>	description of confTask
	loginManager	<WALoginManager>	description of loginManager
	navigationToolbar	<Object | Proxy>	description of navigationToolbar
	task	<Object | Proxy>	description of task
	userToolbar	<Object | Proxy>	description of userToolbar

'!

Smalltalk defineClass: #WALocationModify
	superclass: #{Smalltalk.WAConfManLabelledFormDialog}
	indexedType: #none
	private: false
	instanceVariableNames: 'location '
	classInstanceVariableNames: ''
	imports: ''
	category: 'ConfMan-SeaSide'!

WALocationModify comment:
'WALocationModify 

Allow to modify a Location

Instance Variables:
	location	<Object | Proxy>	 description of location

'!


































Smalltalk.WAConferenceView defineSharedVariable: #confContainer
	private: false
	constant: false
	category: 'As yet unclassified'
	initializer: nil!










Smalltalk.WAConferenceManager defineSharedVariable: #ConfManager
	private: false
	constant: false
	category: 'As yet unclassified'
	initializer: nil!





!WASharedRendering class methodsFor: 'resources'!

home
	"UIMaskEditor new openOnClass: self andSelector: #home_little"

	<resource: #image>

	^(Image extent: 14@17 depth: 3 bitsPerPixel: 4 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 0)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6841 6841 6841)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5460 5460 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(4111 4111 4111)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[51 51 51 48 51 51 51 0 51 51 51 4 3 51 51 0 51 51 48 51 64 51 51 0 51 51 3 51 52 3 51 0 51 48 51 51 51 16 51 0 51 3 51 51 51 49 3 0 48 4 68 66 34 17 65 0 3 64 51 51 51 51 67 0 51 64 51 51 51 51 67 0 51 64 51 51 51 51 35 0 51 64 51 51 51 51 35 0 51 32 51 51 51 51 35 0 51 32 51 51 51 51 35 0 51 32 51 51 51 51 35 0 51 16 51 51 51 51 19 0 51 16 51 51 51 51 19 0 51 16 17 17 17 17 19 0])!

home_medium
	"UIMaskEditor new openOnClass: self andSelector: #home"

	<resource: #image>

	^(Image extent: 20@25 depth: 2 bitsPerPixel: 2 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5460 5460 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 0)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(4111 4111 4111)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[170 170 172 170 170 0 0 0 170 170 181 42 170 0 0 0 170 170 217 74 170 0 0 0 170 171 106 82 170 0 0 0 170 173 170 148 170 0 0 0 170 182 170 173 42 0 0 0 170 218 170 171 74 0 0 0 171 106 170 170 146 0 0 0 173 170 170 170 166 0 0 0 183 85 85 85 86 0 0 0 219 87 252 2 182 0 0 0 171 106 170 170 182 0 0 0 171 106 170 170 182 0 0 0 171 106 170 170 182 0 0 0 171 106 170 170 134 0 0 0 171 106 170 170 134 0 0 0 171 106 170 170 134 0 0 0 171 106 170 170 142 0 0 0 171 106 170 170 174 0 0 0 171 106 170 170 174 0 0 0 171 106 170 170 174 0 0 0 171 106 170 170 162 0 0 0 171 106 170 170 162 0 0 0 171 106 170 170 162 0 0 0 168 127 240 0 2 0 0 0])!

mail
	"UIMaskEditor new openOnClass: self andSelector: #mail"

	<resource: #image>

	^(Image extent: 26@16 depth: 2 bitsPerPixel: 2 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 0)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5460 5460 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6841 6841 6841)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[0 0 0 0 0 42 160 0 2 170 170 170 160 42 160 0 32 170 170 170 130 58 160 0 40 42 170 170 10 63 160 0 42 10 170 168 42 63 224 0 42 130 170 160 170 63 224 0 42 160 170 130 170 21 240 0 42 168 42 10 170 21 112 0 42 160 8 2 170 21 112 0 42 130 128 160 170 21 112 0 42 10 162 168 42 21 224 0 40 42 170 170 10 21 224 0 32 170 170 170 130 23 160 0 2 170 170 170 160 30 160 0 0 0 0 0 0 58 160 0 170 170 170 170 170 170 160 0])!

aDeletePicture
	"UIMaskEditor new openOnClass: self andSelector: #aDeletePicture"

	<resource: #image>

	^(Image extent: 25@29 depth: 4 bitsPerPixel: 4 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6906 2923 2826)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7644 6038 6006)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6970 3244 3147)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8126 7966 7966)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6841 2666 2601)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7066 3533 3437)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7741 6327 6295)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7387 4914 4882)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6713 2120 2023)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7259 4368 4304)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7130 3822 3758)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6809 2537 2441)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(6681 1991 1895)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(7998 7387 7355)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8158 8126 8126)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: (ByteArray fromPackedString: '????????????????<@@@@O????????????????@@@@C????????????????0@@@@????????????????<@@@@O????????????????@@@@C????????????????0@@@@????????????????<@@@@O??????F55[G?????@@@@C?????8=7]7]O/???0@@@@?????,7]7]7]3/??<@@@@O????OPL=7SLMO???@@@@C???<]5/>M+?[]G??0@@@@????/]6OR$>-7[??<@@@@O???<7]5??17]7O??@@@@C???>]7]W?=]7]''??0@@@@????3]7W??^]7\??<@@@@O???;7]#4-O#]6???@@@@C???<]6?>-+?/]G??0@@@@????<=@37]L04???<@@@@O????;M7]7]7\;???@@@@C?????P=7]7]O/???0@@@@??????<[3\,_????<@@@@O????????????????@@@@C????????????????0@@@@????????????????<@@@@O????????????????@@@@C????????????????0@@@@????????????????<@@@@O????????????????@@@@@b'))!

star1_22
	"UIMaskEditor new openOnClass: self andSelector: #star1"

	<resource: #image>

	^(Image extent: 22@22 depth: 2 bitsPerPixel: 2 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 706)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 0)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 128)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[170 170 170 170 170 160 0 0 170 170 165 170 170 160 0 0 170 170 165 170 170 160 0 0 170 170 165 170 170 160 0 0 170 170 149 106 170 160 0 0 170 170 149 106 170 160 0 0 170 170 85 90 170 160 0 0 170 170 85 90 170 160 0 0 85 85 85 85 85 80 0 0 181 85 85 85 85 96 0 0 169 85 85 85 85 160 0 0 170 85 85 85 82 160 0 0 170 149 85 85 106 160 0 0 170 165 85 85 170 160 0 0 170 165 85 85 170 160 0 0 170 165 85 85 106 160 0 0 170 149 85 85 106 160 0 0 170 149 86 85 106 160 0 0 170 149 106 149 90 160 0 0 170 86 170 169 90 160 0 0 170 90 170 170 90 160 0 0 169 170 170 170 166 160 0 0])!

star5_18
	"UIMaskEditor new openOnClass: self andSelector: #star5_18"

	<resource: #image>

	^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 4111 0)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[1 128 0 0 1 128 0 0 1 128 0 0 3 64 0 0 3 32 0 0 7 32 0 0 255 31 0 0 127 2 0 0 63 4 0 0 31 8 0 0 15 16 0 0 15 8 0 0 31 136 0 0 30 72 0 0 60 52 0 0 48 12 0 0])!

star1_18
	"UIMaskEditor new openOnClass: self andSelector: #star1_18"

	<resource: #image>

	^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 4111 0)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[1 128 0 0 1 128 0 0 1 128 0 0 3 192 0 0 3 192 0 0 7 224 0 0 255 255 0 0 127 254 0 0 63 252 0 0 31 248 0 0 15 240 0 0 15 248 0 0 31 248 0 0 30 120 0 0 60 60 0 0 48 12 0 0])!

star0_18
	"UIMaskEditor new openOnClass: self andSelector: #star0_18"

	<resource: #image>

	^(Image extent: 16@16 depth: 1 bitsPerPixel: 1 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 4111 0)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[1 128 0 0 1 128 0 0 1 128 0 0 2 64 0 0 2 64 0 0 4 32 0 0 248 31 0 0 64 2 0 0 32 4 0 0 16 8 0 0 8 16 0 0 8 8 0 0 17 136 0 0 18 104 0 0 28 20 0 0 48 12 0 0])!

trash
	"UIMaskEditor new openOnClass: self andSelector: #trash"

	<resource: #image>

	^(Image extent: 21@22 depth: 2 bitsPerPixel: 2 palette: (Graphics.MappedPalette withColors: (#(#(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(0 0 0)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(5460 5460 5460)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(8191 8191 8191)) #(#{Graphics.ColorValue} #scaledRed:scaledGreen:scaledBlue: #(4111 4111 4111)) ) collect: [:each | (each at: 1) value perform: (each at: 2) withArguments: (each at: 3)])) usingBits: #[170 168 1 170 170 128 0 0 170 68 160 42 170 128 0 0 168 42 170 6 170 128 0 0 161 160 2 161 170 128 0 0 162 162 162 161 170 128 0 0 160 170 170 146 170 128 0 0 168 106 170 66 170 128 0 0 168 1 80 2 170 128 0 0 168 52 3 66 170 128 0 0 168 52 211 66 170 128 0 0 168 52 211 66 170 128 0 0 168 52 211 66 170 128 0 0 168 52 211 65 90 128 0 0 168 52 211 67 214 128 0 0 168 52 211 67 245 128 0 0 168 52 211 67 213 128 0 0 168 52 211 67 213 128 0 0 168 52 211 67 90 128 0 0 168 52 211 65 106 128 0 0 168 52 211 65 170 128 0 0 170 4 211 10 170 128 0 0 170 160 0 42 170 128 0 0])! !


!WASharedRendering methodsFor: 'rendering'!

renderAStarRating: html rating: theRating maxRating: theMaximumRating

|val|



1 to: theRating do: 
	[:num|
	html imageWithForm: ((WASharedRendering star1_18) asGIFNonTransparent).
	val:=num.
	].

val < theRating 
	ifTrue: [html imageWithForm:  ((WASharedRendering star5_18) asGIFNonTransparent)].

theRating to: (theMaximumRating-1) do:
	[:num|
	html imageWithForm: ((WASharedRendering star0_18) asGIFNonTransparent).
	].!

renderDelete
  ^ Tools.UIMaskEditor new openOnClass: self andSelector: #aStarPicture!

renderComaSeparatedListOn: html aList: theList
|i|
i:=0.
theList do: 
	[:anElem | 
	i = 0 ifFalse: [ html html: ', '].
	html text: anElem.
	i := i+1. ].! !

!WASharedRendering methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !


!WAConfManSession methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."
	super initialize.
	" *** Replace this comment with the appropriate initialization code *** "
	^self! !

!WAConfManSession methodsFor: 'accessing'!

getLoggedUserLogin
  (self isLogged)
  ifTrue: [^ self user login]
  ifFalse: [^ nil]!

navigation: aNavigation
  navigation := aNavigation!

user
  ^user!

user: anUser
  user := anUser!

isLogged
  (self user)
    ifNil: [^false]
    ifNotNil: [^true]!

userList: anUserList
   userList := anUserList.!

navigation
 ^  navigation!

userList
  ^ userList! !


!WASecurityManager methodsFor: 'rendering'!

renderContentOn: html 
      html divNamed: 'submain' with: waPermissionManager.
	html divNamed: 'submain' with: waMembershipManager.
      html divNamed: 'security' with: [html anchorWithAction: [self answer] text: 'View Object'].! !

!WASecurityManager methodsFor: 'accessing'!

permissionManager: aPermissionManager 
	waPermissionManager permissionManager: aPermissionManager!

membershipManager: aMembershipManager 
	waMembershipManager membershipManager: aMembershipManager.
	waPermissionManager membershipManager: aMembershipManager! !

!WASecurityManager methodsFor: 'initialize-release'!

initialize
	super initialize.
	waPermissionManager := WAPermissionManagerView new.
	waMembershipManager := WAMembershipManagerView new.
	^self!

children
	^ Array with: waPermissionManager with: waMembershipManager.! !


!WAConfManLabelledFormDialog methodsFor: 'rendering'!

renderContentOn: html
html divNamed: 'mainText' with: [

	html html: '<table width=100%><tr><td align=center><table><tr><td>'.
	html hiddenInputWithCallback: [validationError := nil].
	validationError ifNotNil: [self renderValidationError: validationError on: html].
	html divClass: self divClass with: [self renderDialogOn: html].
	html html: '</td></tr></table></td></tr></table>'.
].! !

!WAConfManLabelledFormDialog methodsFor: 'initialize-release'!

children
  ^ Array with: navigation!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
    navigation := self session navigation.
	" *** Replace this comment with the appropriate initialization code *** "
	^self! !


!WACommentAdd methodsFor: 'rendering'!

ok
	self answer: comment!

renderUserOn: html 
	html hiddenInputWithValue: self session getLoggedUserLogin callback: [:user | comment user: user].
	html text: self session getLoggedUserLogin!

model
	^comment!

renderRatingOn: html 
	html 
		selectFromList: #(1 2 3 4 5)
		selected: comment rating
		callback: [:u | comment rating: u]!

rows
	^ #(user rating text)! !

!WACommentAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
	comment := Comment new initialize setOwner: self session getLoggedUserLogin.
	^self! !

!WACommentAdd methodsFor: 'accessing'!

comment
	^comment!

comment: aComment
	comment := aComment! !


!WAGroupAdd methodsFor: 'rendering'!

model
	^ group!

labelForSelector: aSymbol
	aSymbol == #name ifTrue: [^'Group`s name'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

rows
	^ #(name)!

ok
	self answer: group! !

!WAGroupAdd methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Edit the following to properly initialize instance variables ***"
	group := Group new initialize setOwner: self session getLoggedUserLogin.
	" *** And replace this comment with additional initialization code *** "
	^self! !

!WAGroupAdd methodsFor: 'accessing'!

group: anObject
	group := anObject!

group
	^group! !


!WAConferenceModify methodsFor: 'rendering'!

renderCommentsDeadlineOn: html 
	html dateInputWithValue: (conference commentsDeadline) callback: [:date | conference commentsDeadline: date]!

renderLecturerOn: html 
html selectFromList: (userManager getUserLogins) selected: conference lecturer callback: [:u | conference lecturer: u].!

renderBeginDateOn: html 
	html dateInputWithValue: (conference beginDate) callback: [:date | conference beginDate: date]!

renderNotificationDeadlineOn: html 
	html dateInputWithValue: conference notificationDeadline
		callback: [:date | conference notificationDeadline: date]!

renderEndDateOn: html 
html dateInputWithValue: (conference endDate) callback: [:date | conference endDate: date]!

model
	^ conference!

labelForSelector: aSymbol
	aSymbol == #name ifTrue: [^'Conference name'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderLocationOn: html 
html selectFromList: (locationsContainer getLocations) selected: conference location callback: [:u | conference location: (locationsContainer getLocationWithPlace: u)].!

renderKeywordsOn: html 
	| existingKeywords |
	existingKeywords := KeywordsContainer withAll: conference keywords
				sortBlock: conference keywords sortBlock.
	conference keywords: confContainer sharedKeywords.
	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: conference keywords;
				sharedKeywords: confContainer sharedKeywords;
				existingKeywords: existingKeywords) renderContentOn: html]!

renderArticleDeadlineOn: html 
html dateInputWithValue: (conference articleDeadline) callback: [:date | conference articleDeadline: date]!

rows
	^ #(name keywords articleDeadline commentsDeadline notificationDeadline beginDate endDate lecturer location)!

ok
	self answer: conference! !

!WAConferenceModify methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Edit the following to properly initialize instance variables ***"
	conference := Conference new.
	" *** And replace this comment with additional initialization code *** "
	^self! !

!WAConferenceModify methodsFor: 'accessing'!

userManager: aUserManager
   userManager := aUserManager!

conference: aConference
	conference := aConference!

locationsContainer: aLocationsContainer
   locationsContainer := aLocationsContainer!

confContainer: aConferenceContainer
  confContainer := aConferenceContainer! !


!WATalkAdd methodsFor: 'rendering'!

renderDayOn: html 
	html 
		selectFromList: self getConferenceDays
		selected: (talk dateTimeBegin asDate)
		callback: 
			[:u | 
			talk dateTimeBegin: (Squeak.DateAndTime year: u year
						month: u monthIndex
						day: u day
						hour: talk dateTimeEnd hour
						minute: talk dateTimeEnd minute).
			talk dateTimeEnd: (Squeak.DateAndTime 
						year: u year
						month: u monthIndex
						day: u day
						hour: talk dateTimeEnd hour
						minute: talk dateTimeEnd minute)]!

rows
	^ #(article day timeBegin timeEnd room)!

ok
	"DO NOT FORMAT THIS METHOD PLEASE"
	| otherTalks found |
	found := false.
	otherTalks := self schedule getTalksWithRoom: talk room.
	otherTalks isNil 
		ifFalse: 
			[otherTalks do: 
					[:other | 
					((found) not ) & (((other dateTimeBegin <= talk dateTimeBegin)
						& (other dateTimeEnd >= talk dateTimeBegin))
							| ((other dateTimeBegin <= talk dateTimeEnd) 
									& (other dateTimeEnd >= talk dateTimeEnd))) 
							ifTrue: [ found := true. self inform: 'There are two talks at the same moment in the same room !!'.]]].
	found
		ifFalse: [self answer: talk]!

register: html 
	html heading: 'Add a new talk'!

renderArticleOn: html 
	html 
		selectFromList: self getArticleList
		selected: nil
		callback: [:u | talk article: (conference articleContainer getArticleWithTitle: u)]!

renderRoomOn: html 
	html 
		selectFromList: self conference location rooms getRoomsName
		selected: nil
		callback: [:u | talk room: (self conference location rooms getRoomWithName: u)]!

renderTimeBeginOn: html 
	html timeInputWithValue: (Seaside.Time fromString: '7:00:00 am')
		callback: 
			[:time | 
			talk dateTimeBegin: (Squeak.DateAndTime year: (talk dateTimeBegin year)
						month: (talk dateTimeBegin month)
						day: (talk dateTimeBegin day)
						hour: (time hours)
						minute: (time minutes) ).]!

renderTimeEndOn: html 
	html timeInputWithValue: (Seaside.Time fromString: '9:00:00 am')
		callback: 
			[:time | 
			talk dateTimeEnd: (Squeak.DateAndTime year: (talk dateTimeEnd year)
						month: (talk dateTimeEnd month)
						day: (talk dateTimeEnd day)
						hour: (time hours)
						minute: (time minutes) )]!

model
	^ talk!

labelForSelector: aSymbol
	aSymbol == #article ifTrue: [^'Accepted Articles'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol! !

!WATalkAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
      conference := nil.
	talk := Talk new initialize setOwner: self session getLoggedUserLogin.
	^self! !

!WATalkAdd methodsFor: 'accessing'!

conference: aConference 
	conference := aConference!

schedule
	^conference schedule!

getArticleList
	| articlesList |
	articlesList := (Set withAll: self articleContainer approvedArticles) 
				- (Set withAll: self schedule articleAssigned).
	^self articleContainer articlesTitle: articlesList!

talk: anObject
	talk := anObject!

articleContainer
	^conference articleContainer!

talk
	^talk!

conference
	^conference!

getConferenceDays
   | begin end dayCount setOfDates |  
   begin := conference beginDate.
   end := conference endDate.
   dayCount := end subtractDate: begin.
   setOfDates := SortedCollection with: begin.
   [dayCount~=0] whileTrue: [begin := ((begin) addDays: 1).
                                   setOfDates add: begin.
                                   dayCount := dayCount -1.
          ]. 
   ^ setOfDates! !


!WAArticleAdd methodsFor: 'rendering'!

ok
article user: self session user.
	self answer: article!

renderSkillsOn: html 

article keywords: keywords.

	html with: 
			[((WAKeywordsRenderer new)
				conferenceKeywords: article keywords;
				sharedKeywords: nil) renderContentOn: html]!

renderDataOn: html 
	html attributeAt: 'enctype' put: 'multipart/form-data'.
	html fileUploadWithCallback: 
			[:file | article data: (file contents)]!

model
	^ article!

labelForSelector: aSymbol
	aSymbol == #user ifTrue: [^'Your name'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderKeywordsOn: html 
| existingKeywords |
	existingKeywords := KeywordsContainer withAll: article keywords
				sortBlock: article keywords sortBlock.
article keywords: keywords.

	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: article keywords;
				sharedKeywords: nil;
                existingKeywords: existingKeywords) renderContentOn: html]!

rows
^ #(title data keywords)! !

!WAArticleAdd methodsFor: 'accessing'!

keywords: aSetOfKeywords
	keywords := aSetOfKeywords! !

!WAArticleAdd methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance"
	super initialize.
	article := Article new initialize setOwner: self session getLoggedUserLogin.

	^self! !


!WAKeywordsRenderer methodsFor: 'rendering'!

model
  ^ allKeywords!

labelForSelector: aSymbol
	aSymbol == #keywords ifTrue: [^'Existing Keywords: '].
      aSymbol == #keyword1 ifTrue: [^'First Keyword: '].
     aSymbol == #keyword2 ifTrue: [^'Second Keyword: '].
     aSymbol == #keyword3 ifTrue: [^'Third Keyword: '].
     aSymbol == #keyword4 ifTrue: [^'Fourth Keyword: '].
     aSymbol == #keyword5 ifTrue: [^'Fifth Keyword: '].

	^ super labelForSelector: aSymbol!

renderKeyword3On: html 
	html textInputWithValue: ''
		callback: 
			[:v | 
			v isEmpty 
				ifFalse: 
					[allKeywords addKeyword: v.
					sharedKeywords isNil ifFalse: [sharedKeywords addKeyword: v]]]!

renderKeyword5On: html 
	html textInputWithValue: ''
		callback: 
			[:v | 
			v isEmpty 
				ifFalse: 
					[allKeywords addKeyword: v.
					sharedKeywords isNil ifFalse: [sharedKeywords addKeyword: v]]]!

renderKeyword1On: html 
	html textInputWithValue: ''
		callback: 
			[:v | 
			v isEmpty 
				ifFalse: 
					[allKeywords addKeyword: v.
					sharedKeywords isNil ifFalse: [sharedKeywords addKeyword: v]]]!

renderKeyword2On: html 
	html textInputWithValue: ''
		callback: 
			[:v | 
			v isEmpty 
				ifFalse: 
					[allKeywords addKeyword: v.
					sharedKeywords isNil ifFalse: [sharedKeywords addKeyword: v]]]!

renderKeyword4On: html 
	html textInputWithValue: ''
		callback: 
			[:v | 
			v isEmpty 
				ifFalse: 
					[allKeywords addKeyword: v.
					sharedKeywords isNil ifFalse: [sharedKeywords addKeyword: v]]]!

ok
self answer: allKeywords.!

renderKeywordsOn: html 
	allKeywords do: 
			[:keyword | 
			html checkboxWithValue: (existingKeywords includes: keyword)
				callback: [:b | b ifFalse: [allKeywords remove: keyword. ]].
			html text: keyword.
			html space.
			html break].
	allKeywords isEmpty ifTrue: [html text: 'No existing keywords']!

rows
	^ #(keywords keyword1 keyword2 keyword3 keyword4 keyword5)! !

!WAKeywordsRenderer methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Replace this comment with the appropriate initialization code *** "
	^self! !

!WAKeywordsRenderer methodsFor: 'accessing'!

existingKeywords: aKeywordContainer
    existingKeywords:= aKeywordContainer!

sharedKeywords
  ^ sharedKeywords!

sharedKeywords: aKeywordContainer
    sharedKeywords := aKeywordContainer!

allKeywords
   ^ allKeywords!

allKeywords: aKeywordsContainer
    allKeywords := aKeywordsContainer!

existingKeywords
   ^ existingKeywords! !


!WAPermissionModify methodsFor: 'rendering'!

renderMembersOn: html 
	(permissionManager permissionDictionary at: permissionName) do: 
			[:member | 
			html checkboxWithValue: true
				callback: [:b | b ifFalse: [self membersSet remove: member]].
			html text: member.
			html space.
			html break]!

renderMemberGroupOn: html 
	| |
	html text: permissionName.
	html text: ': '.
	self renderMembersOn: html.
	html break.
	self renderLoginList: html.
	html break.
	self renderGroupMemberList: html.
	html break.
      self membersSet.
	((permissionManager hasParent) & ((self membersSet includes: 'Acquire') not)) ifTrue: [self renderAcquire: html]!

renderAcquire: html
    html form:[
    html submitButtonWithAction: [permissionManager addMemberToPermission: permissionName member: 'Acquire'] text: 'Acquire permission '. ].!

model
	^ (self membersSet).!

labelForSelector: aSymbol
	aSymbol == #memberGroup ifTrue: [^''].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderGroupMemberList: html
    html form:[
    html selectFromList: (self filteredGroupMemberList) selected: '--' callback: [:u | (u ~= '--') ifTrue: [permissionManager addMemberToPermission:permissionName member: u]].
    html submitButtonWithText: 'Add Group of Member To Permission'. ].!

renderGroupNameOn: html
     html text: permissionName.
     html text: ': '.!

renderLoginList: html
    html form:[
    html selectFromList: (self filteredMemberList) selected: '--' callback: [:u | (u ~= '--') ifTrue: [permissionManager addMemberToPermission: permissionName member: u ]].
    html submitButtonWithText: 'Add User To Permission'. ].!

rows
	^ #(memberGroup)!

ok
	self answer:  (self membersSet)! !

!WAPermissionModify methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WAPermissionModify methodsFor: 'accessing'!

membersSet
	^permissionManager permissionDictionary at: permissionName!

permissionName: aPermissionName 
	permissionName := aPermissionName!

filteredMemberList
	| userList |
	userList := self session userList - self membersSet.
	userList add: '--'.
	^userList!

permissionManager: aPermissionManager 
	permissionManager := aPermissionManager!

filteredGroupMemberList
	| groupList |
	groupList := membershipManager getGroups - self membersSet.
	groupList add: '--'.
	^groupList!

membershipManager: aMembershipManager 
	membershipManager := aMembershipManager! !


!WAArticleModify methodsFor: 'rendering'!

renderTitleOn: html 
	html textAreaWithValue: article title callback: [:t | article title: t]!

renderKeywordsOn: html 
	| existingKeywords |
	existingKeywords := KeywordsContainer withAll: article keywords
				sortBlock: article keywords sortBlock.
	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: article keywords;
				sharedKeywords: nil;existingKeywords:existingKeywords) renderContentOn: html]!

rows
	^ #(title data keywords)!

ok
	article user: self session user.
	self answer: article!

renderDataOn: html 
       html fileUploadWithCallback: [:file | article data: file]!

model
	^ article!

labelForSelector: aSymbol
	aSymbol == #user ifTrue: [^'Your name'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol! !

!WAArticleModify methodsFor: 'initialize-release'!

initialize
	super initialize.
	article := Article new.
	^self! !

!WAArticleModify methodsFor: 'accessing'!

article: anArticle
	article := anArticle! !


!WALocationAdd methodsFor: 'rendering'!

labelForSelector: aSymbol
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

rows
	^ #(place address)!

ok
	self answer: location!

model
	^ location!

register: html 
	html heading: 'New location creation'! !

!WALocationAdd methodsFor: 'accessing'!

location: anObject
	location := anObject!

location
	^location! !

!WALocationAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
	location := Location new initialize setOwner: self session getLoggedUserLogin.
	^self! !


!WAUserModify methodsFor: 'rendering'!

renderPasswordOn: html 
html passwordInputWithValue: currentUser password callback: [:c | currentUser password: c].!

rows
	^ #(login name surname password email skills)!

ok
	self answer: currentUser!

renderSkillsOn: html 
	| existingKeywords |
	existingKeywords := KeywordsContainer withAll: currentUser skills
				sortBlock: currentUser skills sortBlock.
	currentUser skills: userManager sharedSkills.
	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: currentUser skills;
				sharedKeywords: userManager sharedSkills;
				existingKeywords: existingKeywords) renderContentOn: html]!

renderSurnameOn:html

html textInputWithValue: currentUser surname callback: [:s | currentUser surname: s]!

renderNameOn:html
   html textInputWithValue: currentUser name callback: [:n | currentUser name: n]!

renderEmailOn:html

html textInputWithValue: currentUser email callback: [:m | currentUser email: m]!

labelForSelector: aSymbol
	aSymbol == #name ifTrue: [^'Your name'].
	aSymbol == #surname ifTrue: [^'Your surname'].
	aSymbol == #login ifTrue: [^'Your login'].
	aSymbol == #password ifTrue: [^'Your password'].
	aSymbol == #email ifTrue: [^'Your email'].
	aSymbol == #skills ifTrue: [^'Your skills'].

	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

model
	^ currentUser!

renderLoginOn: html 
	html hiddenInputWithValue: currentUser login callback: [:u | currentUser login: u].
	html text: currentUser login! !

!WAUserModify methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WAUserModify methodsFor: 'accessing'!

currentUser: aUser 
	currentUser := aUser!

userManager: aUserManager 
	userManager := aUserManager! !


!WAConferenceAdd methodsFor: 'rendering'!

renderLecturerOn: html 
html selectFromList: (userManager getUserLogins) selected: conference lecturer callback: [:u | conference lecturer: u].!

labelForSelector: aSymbol
	aSymbol == #name ifTrue: [^'Conference name'].
	aSymbol == #lecturer ifTrue: [^'The Lecturer'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

register: html 
	html heading: 'New conference creation'!

renderArticleDeadlineOn: html 
html dateInputWithValue: (Date today addDays:1) callback: [:date | conference articleDeadline: date]!

renderKeywordsOn: html 
	| existingKeywords |
	existingKeywords := KeywordsContainer withAll: conference keywords
				sortBlock: conference keywords sortBlock.
	conference keywords: confContainer sharedKeywords.
	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: conference keywords;
				sharedKeywords: confContainer sharedKeywords;
				existingKeywords: existingKeywords) renderContentOn: html]!

renderBeginDateOn: html 
	html dateInputWithValue: (Date today addDays:1) callback: [:date | conference beginDate: date]!

model
	^ conference!

rows
	^ #(name keywords articleDeadline commentsDeadline notificationDeadline beginDate endDate lecturer location)!

ok

keyword1 ifNotNil: [confContainer addSharedKeyword: keyword1].
keyword2 ifNotNil: [confContainer addSharedKeyword: keyword2].
keyword3 ifNotNil: [confContainer addSharedKeyword: keyword3].
keyword4 ifNotNil: [confContainer addSharedKeyword: keyword4].
keyword5 ifNotNil: [confContainer addSharedKeyword: keyword5].

self answer: conference.!

renderEndDateOn: html 
html dateInputWithValue: (Date today addDays:1) callback: [:date | conference endDate: date]!

renderCommentsDeadlineOn: html 
	html dateInputWithValue: (Date today addDays:1) callback: [:date | conference commentsDeadline: date]!

renderLocationOn: html 
html selectFromList: (locationsContainer getLocations) selected: conference location callback: [:u | conference location: (locationsContainer getLocationWithPlace: u)].!

renderNotificationDeadlineOn: html 
       html dateInputWithValue: (Date today addDays:1) callback: [:date | conference notificationDeadline: date].! !

!WAConferenceAdd methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
      conference := Conference new initialize setOwner: self session getLoggedUserLogin.


	" *** Replace this comment with the appropriate initialization code *** "
	^self! !

!WAConferenceAdd methodsFor: 'accessing'!

confContainer: aConferenceContainer
  confContainer := aConferenceContainer!

userManager: aUserManager
   userManager := aUserManager!

locationsContainer: aLocationsContainer
   locationsContainer := aLocationsContainer! !


!WAMemberAdd methodsFor: 'rendering'!

labelForSelector: aSymbol
	aSymbol == #memberName ifTrue: [^'Name of the member: '].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderMemberNameOn: html 
	html textInputWithValue: memberName
		callback: [:value | memberName := value]!

ok
	self answer: memberName!

rows
	^ #(memberName)!

model
	^self! !

!WAMemberAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
      memberName := ''.
	^self! !


!WAUserLogin methodsFor: 'rendering'!

rows
	^ #(login password)!

labelForSelector: aSymbol
	aSymbol == #login ifTrue: [^'Your login'].
	aSymbol == #password ifTrue: [^'Your password'].
	aSymbol == #ok ifTrue: [^'Login'].
	^ super labelForSelector: aSymbol!

renderPasswordOn: html 
html passwordInputWithCallback: [:c | password := c].!

ok
	| loginAssoc pwdAssoc |
	loginAssoc := Association new key: 'login' value: login.
	pwdAssoc := Association new key: 'password' value: password.
	dictLogin
		add: loginAssoc;
		add: pwdAssoc.
	self answer: dictLogin!

renderLoginOn: html 
	html textInputWithCallback: [:c | login := c]! !

!WAUserLogin methodsFor: 'initialize-release'!

initialize
	super initialize.
	dictLogin := Dictionary new.
	^self! !


!WAMemberModify methodsFor: 'rendering'!

labelForSelector: aSymbol
	aSymbol == #members ifTrue: [^''].
	aSymbol == #memberGroup ifTrue: [^''].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderLoginList: html groupName: aGroupName
    html form:[
    html selectFromList: (self filteredUserList) selected: '--' callback: [:u | (u ~= '--') ifTrue: [membershipManager addMemberToGroup: u group: aGroupName]].
    html submitButtonWithText: 'Add User To Group'. ].!

model
	^ (self membersSet).!

renderGroupNameOn: html
     html text: memberGroup.
     html text: ': '.!

rows
	^ #(memberGroup)!

ok
	self answer:  (self membersSet)!

renderMembersOn: html 
	(members at: memberGroup) do: 
			[:member | 
			html checkboxWithValue: true
				callback: [:b | b ifFalse: [self membersSet remove: member]].
			html text: member.
			html space.
			html break]!

renderMemberGroupOn: html
     html text: memberGroup.
     html text: ': '.
     self renderMembersOn: html.
     html break.
     self renderLoginList: html groupName: memberGroup.! !

!WAMemberModify methodsFor: 'initialize-release'!

initialize
	super initialize.
      members := ''.
      memberGroup := ''.
	^self! !

!WAMemberModify methodsFor: 'accessing'!

memberGroup: aMemberGroup 
	memberGroup := aMemberGroup!

members: aSetOfMembers 
	members := aSetOfMembers!

membershipManager: aMembershipManager 
	membershipManager := aMembershipManager!

membersSet
	^members at: memberGroup!

filteredUserList
	| userList |
	userList := self session userList - self membersSet.
	userList add: '--'.
	^userList!

membersDictionary
	^members at: memberGroup! !


!WARoomAdd methodsFor: 'rendering'!

rows
	^ #(name capacity)!

ok
	((rooms getRoomWithName: room name) isNil)
	 	 ifFalse: [self inform: 'Room already exists.']
		ifTrue: [self answer: room].!

model
	^ room!

register: html 
	html heading: 'New room creation'!

labelForSelector: aSymbol
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol! !

!WARoomAdd methodsFor: 'accessing'!

rooms: aSetOfRooms
   rooms := aSetOfRooms.! !

!WARoomAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
	room := Room new initialize setOwner: self session getLoggedUserLogin.
	^self! !


!WAConfManComponent methodsFor: 'rendering'!

renderContentOn: html 
	self renderTitle: html.
	html divNamed: 'mainText'
		with: [
			html html: '<table width=100%><tr><td align=center><table><tr><td>'.
			self renderBody: html.
			html html: '</td></tr></table></td></tr></table>'.
		].
	self renderFooter: html.!

renderBody: html
    ^ ''!

renderNavigationOn: html 
	html divNamed: 'navigation' with: self session navigation.!

renderTitle: html
     html divNamed: 'mainTitle' with: self title.!

renderFooter: html 

	self hasParent
		ifTrue: [html divNamed: 'back' with: [html anchorWithAction: [self answer] text: 'Back to Parent']].

	self renderedObject notNil
		ifTrue: [
			(self checkPermission: 'View Security Manager' object: self renderedObject) 
				ifTrue: [
					html divNamed: 'security' with: [
						html anchorWithAction: [
							self call: ((WASecurityManager new initialize)
												membershipManager: self renderedObject membershipManager;
												permissionManager: self renderedObject permissionManager)
						] text: 'View Security Manager'
					]
				]
		].!

title
   self error: 'Title Method should be overriden'! !

!WAConfManComponent methodsFor: 'initialize-release'!

children
  ^ Array with: navigation!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	navigation := self session navigation.
	navigation isNil ifFalse: [navigation parent: self].
	^self! !

!WAConfManComponent methodsFor: 'accessing'!

checkPermission: aPermissionName object: anObject 
	"check the permission on an object for logged user"

	^ (anObject permissionManager hasPermission: aPermissionName memberName: (self session getLoggedUserLogin))!

renderedObject: anObjectToRender
   renderedObject := anObjectToRender!

checkMembership: aGroupName object: anObject 
	"check the permission on an object for logged user"

	^anObject membershipManager 
		isMemberOfGroup: aGroupName
		userLogin: self session getLoggedUserLogin!

renderedObject
   ^ renderedObject!

hasParent
   ^ true! !


!WAFillBase class methodsFor: 'instance creation'!

new
	"Answer a newly created and initialized instance."

	^super new initialize! !


!WAFillBase methodsFor: 'rendering'!

renderBody: html 
	html form: [
	html html: '<center>'.
	html break. 
	html strong: 'Select what you would like to add :'.
	html break.
	html break.
	html submitButtonWithAction: [self fillUsers] text: 'Users'.
	html break. 	html break. 
	html submitButtonWithAction: [self fillConferences] text: 'Conferences'.
	html break.	html break. 
	html html: '</center>'.
].! !

!WAFillBase methodsFor: 'decoration'!

getAConference1
	|aConference aArticle|

	aConference := (((Conference new initialize) userManager: confManager userManager) name: 'Python').
	aConference keywords add: 'perl'.
	aConference keywords add: 'script'.
	aConference articleDeadline: (Date newDay: 20 monthNumber: 12 year: 2005).
	aConference commentsDeadline: (Date newDay: 25 monthNumber: 12 year: 2005).
	aConference notificationDeadline: (Date newDay: 30 monthNumber: 12 year: 2005).
	aConference beginDate: (Date newDay: 01 monthNumber: 01 year: 2006).
	aConference endDate: (Date newDay: 10 monthNumber: 01 year: 2006).
	"aConference expirationDate: (Date newDay: 20 monthNumber: 12 year: 2005)."
	aConference lecturer: 'jfroche'.
	aConference location: (self getALocation1).

		aArticle := Article new initialize.
		aArticle title: 'Extreme Programming'.
		aArticle keywords add: 'programmation'.
		aArticle keywords add: 'classes'.
		aArticle keywords add: 'oriente objet'.
		aArticle user: ((confManager userManager) getUser: 'ldeleers').
		aArticle data: 'Extreme programming is a technique in wich ... '.
		aArticle comments addComment: ((Comment new initialize) user: 'ldeleers'; rating: 3; text: 'Quite good article !!').
		aArticle comments addComment: ((Comment new initialize) user: 'jfroche'; rating: 1; text: 'Too many mistakes in this article ... try to correct that !!').
	aConference articleContainer addArticle: aArticle.
		aArticle := Article new initialize.
		aArticle title: 'Zope'.
		aArticle keywords add: 'programmation'.
		aArticle keywords add: 'web engine'.
		aArticle keywords add: 'web server'.
		aArticle user: ((confManager userManager) getUser: 'dduchate').
		aArticle data: 'Zope is a beautifull web rendering engine wich ... ... works with python'.
		aArticle comments addComment: ((Comment new initialize) user: 'ldeleers'; rating: 5; text: 'Nice Article !!').
		aArticle comments addComment: ((Comment new initialize) user: 'dduchate'; rating: 3; text: 'Yes ok but. .... Zope is Too Slow !!').
		aArticle comments addComment: ((Comment new initialize) user: 'gdevrye'; rating: 2; text: 'J''ai Rien compri ...').
		aArticle comments addComment: ((Comment new initialize) user: 'llasudry'; rating: 4; text: 'Mouais, mais ca tourne sous windows ?').
	aConference articleContainer addArticle: aArticle.
^aConference!

getALocation2

|aLocation aRoom|
aLocation := Location new initialize.
aLocation place: 'Solbosh'.
aLocation address: 'Av Franklin Roosevelt'.
confManager locationsContainer addLocation: aLocation.

aRoom := (((Room new initialize) name: 'Foyer culturel') capacity: '100 personnes').
aLocation rooms addRoom: aRoom.

aRoom := (((Room new initialize) name: 'Av Hégée') capacity: '2000 personnes').
aLocation rooms addRoom: aRoom.

^  aLocation!

fillConferences

confManager confContainer addConference: (self getAConference1). 
confManager confContainer addConference: (self getAConference2). 

	confManager confContainer addSharedKeyword:  'perl'.
	confManager confContainer addSharedKeyword: 'script'.
	confManager confContainer addSharedKeyword: 'perfectdraft'.
	confManager confContainer addSharedKeyword: 'glass'.
	confManager confContainer addSharedKeyword: 'classes'.
	confManager confContainer addSharedKeyword: 'oriente objet'.!

fillUsers
	|aUser|
	aUser := User new.
	aUser name: 'Deleers'.
	aUser surname: 'Laurent'.
	aUser login: 'ldeleers'.
	aUser password: 'pass'.
	aUser email: 'ldeleers@ulb.ac.be'.
	"aUser skills: ???"
confManager userManager addUser: aUser.

	aUser := User new.
	aUser name: 'Devrye'.
	aUser surname: 'Gilles'.
	aUser login: 'gdevrye'.
	aUser password: 'pass'.
	aUser email: 'gdevrye@ulb.ac.be'.
	"aUser skills: ???"
confManager userManager addUser: aUser.

	aUser := User new.
	aUser name: 'Duchateau'.
	aUser surname: 'dimitri'.
	aUser login: 'dduchate'.
	aUser password: 'pass'.
	aUser email: 'dduchate@ulb.ac.be'.
	"aUser skills: ???"
confManager userManager addUser: aUser.

	aUser := User new.
	aUser name: 'Lasudry'.
	aUser surname: 'Laurent'.
	aUser login: 'llasudry'.
	aUser password: 'pass'.
	aUser email: 'llasudry@ulb.ac.be'.
	"aUser skills: ???"
confManager userManager addUser: aUser.

	aUser := User new.
	aUser name: 'Roche'.
	aUser surname: 'Jean-Francois'.
	aUser login: 'jfroche'.
	aUser password: 'pass'.
	aUser email: 'jfroche@jfroche.be'.
	"aUser skills: ???"
confManager userManager addUser: aUser.!

getALocation1

|aLocation aRoom|
aLocation := Location new initialize.
aLocation place: 'Batiment NO'.
aLocation address: 'Boulevard du Triomphe'.
confManager locationsContainer addLocation: aLocation.

aRoom := (((Room new initialize) name: 'Salle NO4') capacity: '14 computers').
aLocation rooms addRoom: aRoom.

aRoom := (((Room new initialize) name: 'Salle NO5') capacity: '20 personnes').
aLocation rooms addRoom: aRoom.

^  aLocation!

getAConference2
	|aConference aArticle|

	aConference := (((Conference new initialize) userManager: confManager userManager) name: 'Beers').
	aConference keywords add: 'perfectdraft'.
	aConference keywords add: 'glass'.
	aConference articleDeadline: (Date newDay: 20 monthNumber: 12 year: 2005).
	aConference commentsDeadline: (Date newDay: 25 monthNumber: 12 year: 2005).
	aConference notificationDeadline: (Date newDay: 30 monthNumber: 12 year: 2005).
	aConference beginDate: (Date newDay: 01 monthNumber: 01 year: 2006).
	aConference endDate: (Date newDay: 10 monthNumber: 01 year: 2006).
	"aConference expirationDate: (Date newDay: 20 monthNumber: 12 year: 2005)."
	aConference lecturer: 'ldeleers'.
	aConference location: (self getALocation2).

		aArticle := Article new initialize.
		aArticle title: 'La fermentation haute'.
		aArticle keywords add: 'fermentation'.
		aArticle keywords add: 'biere'.
		aArticle keywords add: 'trappiste'.
		aArticle user: ((confManager userManager) getUser: 'dduchate').
		aArticle data: 'La fermentation haute est la fermentation appliquee a ....'.
		aArticle comments addComment: ((Comment new initialize) user: 'dduchate'; rating: 5; text: 'Vive la biere !!!!!!!!').
		aArticle comments addComment: ((Comment new initialize) user: 'jfroche'; rating: 4; text: 'Vive la westmallle :-)').
	aConference articleContainer addArticle: aArticle.

^aConference! !

!WAFillBase methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

      super initialize.
	^self! !

!WAFillBase methodsFor: 'accessing'!

confManager: aConfManager
  confManager := aConfManager.
  self renderedObject: confManager!

title
   ^ 'Fill Database'! !


!WAUserList methodsFor: 'rendering'!

deleteUser: anUser 
	userManager deleteUser: anUser!

renderBody: html 
html html: '<ul>'.
	userManager getUserObjects do: 
			[:aUser | 
			(aUser permissionManager hasPermission: 'View'
				memberName: self session getLoggedUserLogin) 
					ifTrue: 
						[html html: '<li>'.
						html anchorWithAction: [self call: ((WAUserView new user: aUser) userManager: userManager)]
							text: aUser name.
						html text: '   ('.
						html text: aUser login.
						html text: ')'.

1=1 "PERMISSION FOR DELETING USERS"
					ifTrue: [
						html html: '&nbsp;&nbsp;&nbsp;&nbsp;'.
						"html anchorWithAction: [self deleteUser: aUser] text: 'delete'. html text: ')'."
						html anchorWithAction: 	[self deleteUser: aUser] form: ((WASharedRendering trash) asGIFNonTransparent).
						].


						html html: '</li>'.
						html space.
						html break]].

html html: '</ul>'! !

!WAUserList methodsFor: 'accessing'!

title
	^'User List'!

userManager: aUserManager 
	userManager := aUserManager.
	self renderedObject: userManager! !

!WAUserList methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !


!WAConferenceManagerView methodsFor: 'rendering'!

addWAUserModify
"  ^ self call: (Seaside.WAUserModify new userManager: (confManager userManager))"


^confManager userManager modifyUser: (self 
				call: (((WAUserModify new userManager: confManager userManager; currentUser: self session user)
						validateWith: [:a | a validate]) addMessage: 'Modify your profile'))!

addWAUserManager
  ^ self call: (Seaside.WAUserManager new userManager: (confManager userManager))!

renderBody: html 
	html form: 
			[html break.
			(self checkPermission: 'View' object: confManager confContainer) 
				ifTrue: 
					[html submitButtonWithAction: [self addWAConferenceContainer]
						text: '< Conferences >'.
					html break.
					html break].
			(self checkPermission: 'View' object: confManager locationsContainer) 
				ifTrue: 
					[html submitButtonWithAction: [self addWALocationContainer]
						text: '< Locations / Rooms >'.
					html break.
					html break].
			(self checkPermission: 'View' object: confManager userManager) 
				ifTrue: 
					[html submitButtonWithAction: [self addWAUserManager] text: '< Users >'.
					html break.
					html break].
			(self checkPermission: 'View' object: confManager groupManager) 
				ifTrue: 
					[html submitButtonWithAction: [self addWAGroupManager] text: '< Groups >'.
					html break.
					html break].
			(self checkPermission: 'Fill Database' object: confManager) 
				ifTrue: 
					[html 
						submitButtonWithAction: [self call: (WAFillBase new confManager: confManager)]
						text: '< Fill Database >']]!

addWALocationContainer
	^self call: (Seaside.WALocationContainer new 
				locationsContainer: confManager locationsContainer)!

addWAConferenceContainer
	^self call: ((Seaside.WAConferenceContainer new)
				confContainer: confManager confContainer;
				locationsContainer: confManager locationsContainer;
				userManager: confManager userManager)!

addWAGroupManager
  ^ self call: (Seaside.WAGroupManager new groupManager: (confManager groupManager))!

title
   ^ 'Conference Manager'!

go
self isolate: [self call: (Seaside.WAConferenceContainer new)].

self isolate: [self call: (Seaside.WAUserManager new)].! !

!WAConferenceManagerView methodsFor: 'initialization'!

initialize
super initialize.
loginManager := WALoginManager new.! !

!WAConferenceManagerView methodsFor: 'accessing'!

hasParent
   ^ false.!

confManager: aConfManager
   confManager := aConfManager.
   self renderedObject: confManager.
"   self session navigation conferenceManager: confManager"! !


!WAConferenceView methodsFor: 'rendering'!

modifyConference
	conference modify: (self 
				call: (((((WAConferenceModify new conference: conference) 
						userManager: userManager) confContainer: confContainer) locationsContainer: locationsContainer) validateWith: [:a | a validate];
						addMessage: 'Modify conference'))!

addArticle
	conference articleContainer addArticle: 
	(
		(
		self call: 
			(
				((WAArticleAdd new) keywords: conference keywords)
						
				validateWith: [:a | a validate]; addMessage: 'Add article'
			)
		)
		user: self session user
	)!

title
  ^ 'Viewing conference ', conference name!

renderBody: html 
	html form: 
			[html html: '<b>Name :</b> '.
			html text: conference name.
			html break.
			html html: '<b>ArticleDeadline date :</b> '.
			html text: conference articleDeadline.
			html break.
			html html: '<b>CommentsDeadline date : </b>'.
			html text: conference commentsDeadline.
			html break.
			html html: '<b>NotificationDeadline date : </b>'.
			html text: conference notificationDeadline.
			html break.
			html html: '<b>Begin date : </b>'.
			html text: conference beginDate.
			html break.
			html html: '<b>End date : </b>'.
			html text: conference endDate.
			html break.
			html html: '<b>Lecturer :</b> '.
			html text: conference lecturer.
			html break.
			html html: '<b>Location :</b> '.
			html anchorWithAction: [self show: ((WALocationView new) location: conference location)] text: conference location place.
			html break.
			html html: '<b>Keywords :</b> '.
			WASharedRendering new renderComaSeparatedListOn: html
				aList: conference keywords.
			html break.
			html break.
			(self checkPermission: 'Modify' object: conference) 
				ifTrue: 
					[Date today < conference beginDate 
						ifTrue: 
							[html submitButtonWithAction: [self modifyConference]
								text: 'Modify this conference'.
							html break.
							html break]].

			(self checkPermission: 'Add Article' object: conference articleContainer) & ((self checkMembership: 'Lecturers' object: conference) not) & ((self checkMembership: 'Admin' object: conference) not)
				ifTrue: 
					[Date today < conference articleDeadline 
						ifTrue: 
							[html submitButtonWithAction: [self addArticle] text: 'Add Article'.
							html space]	"on peut ne faire que ce test car articleDeadline est d'office < beginDate"].
			(self checkPermission: 'View' object: conference articleContainer) & conference articleContainer hasArticle 
					ifTrue: 
						[html submitButtonWithAction: 
								[self call: (WAArticleList new conference: conference)]
							text: 'Articles List '].

			(self checkPermission: 'View' object: conference schedule) 
					ifTrue: 
						[html submitButtonWithAction: 
								[self call: (WAScheduleView new conference: conference)]
							text: 'View Schedule ']].! !

!WAConferenceView methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Replace this comment with the appropriate initialization code *** "
	^self! !

!WAConferenceView methodsFor: 'accessing'!

confContainer: aConferenceContainer
  confContainer := aConferenceContainer!

userManager: aUserManager
   userManager := aUserManager!

conference
   ^ conference!

conference: aConference
conference:= aConference.
self renderedObject: conference.!

locationsContainer: aLocationsContainer
   locationsContainer := aLocationsContainer! !


!WALocationContainer methodsFor: 'rendering'!

renderBody: html 
	html form: 
			[(self checkPermission: 'Add Location' object: locationsContainer) 
				ifTrue: 
					[html submitButtonWithAction: [self addLocation] text: 'Add Location'.
					html break.
					html break].
			(self checkPermission: 'View' object: locationsContainer) 
				& locationsContainer hasLocation 
					ifTrue: 
						[html submitButtonWithAction: 
								[self call: (WALocationList new locationsContainer: locationsContainer)]
							text: 'Locations List '.
						html break.
						html break]]!

addLocation
      | aLocation |
	aLocation := (self 
				call: ((WALocationAdd new) validateWith: [:a | a validate];
							addMessage: 'Add a location')).
      aLocation  membershipManager setGroupMembers: (Set with: self session getLoggedUserLogin) groupName: 'Owner'.
	locationsContainer addLocation: aLocation.!

title
   ^ 'Locations Manager'! !

!WALocationContainer methodsFor: 'accessing'!

roomsContainer
	^roomsContainer!

locationsContainer
	^locationsContainer!

locationsContainer: anObject
	locationsContainer := anObject.
      self renderedObject: locationsContainer.!

roomsContainer: anObject
	roomsContainer := anObject! !

!WALocationContainer methodsFor: 'initialize-release'!

initialize
	super initialize.
	roomsContainer := nil.
	locationsContainer := nil.
	^self! !


!WAConferenceContainer methodsFor: 'rendering'!

addConference: html 
	| aNewConf |
	locationsContainer hasLocation 
		ifFalse: [self inform: 'Please add a location first.']
		ifTrue: 
			[aNewConf := (self call: (((WAConferenceAdd new)
								confContainer: confContainer;
								locationsContainer: locationsContainer;
								userManager: userManager)
								validateWith: [:a | a validate];
								addMessage: 'Add a conference')) 
						userManager: userManager.
			confContainer addConference: aNewConf]!

title 
  ^  'Conference Manager Home Page'!

renderBody: html 
	html form: 
			[(self checkPermission: 'Add Conference' object: confContainer) 
				ifTrue: 
					[html submitButtonWithAction: [self addConference: html]
						text: 'Add Conference'.
					html break.
					html break].
			(self checkPermission: 'View' object: confContainer) 
				& confContainer hasConference 
					ifTrue: 
						[html submitButtonWithAction: 
								[self 
									call: (((WAConferenceList new userManager: userManager) 
											confContainer: confContainer) locationsContainer: locationsContainer)]
							text: 'Conferences List '.
						html break.
						html break]]! !

!WAConferenceContainer methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WAConferenceContainer methodsFor: 'accessing'!

locationsContainer: aLocationsContainer
   locationsContainer := aLocationsContainer!

userManager
   ^userManager!

confContainer: aConfContainer
   confContainer := aConfContainer.
   self renderedObject: confContainer!

userManager: aUserManager
   userManager := aUserManager! !


!WAArticleView methodsFor: 'rendering'!

renderBody: html 
	html form: 
			[html html: '<b>Title :</b> '.
			html text: article title.
			html break.
			html html: '<b>Author : </b>'.
			html text: article user login.
			html break.
			html html: '<b>data :</b> '.
			html anchorWithAction: [article data] text: article data.
			html break.
			html html: '<b>keywords : </b>'.
			WASharedRendering new renderComaSeparatedListOn: html
				aList: self getArticleKeywords.
			html break.
			html break.
			(self checkPermission: 'Modify' object: article) 
				ifTrue: 
					[Date today < conference articleDeadline 
						ifTrue: 
							[html submitButtonWithAction: [self modifyArticle]
								text: 'Modify this article'.
							html break.
							html break]].
			(self checkPermission: 'Add Comment' object: article comments) 
				& (self checkMembership: 'Owner' object: article) not 
					& (self checkMembership: 'Lecturers' object: conference) not 
					ifTrue: 
						[Date today < conference commentsDeadline 
							ifTrue: 
								[html submitButtonWithAction: [self addComment] text: 'Add Comment'.
								html space]].
			(self checkPermission: 'View' object: article comments) 
				ifTrue: 
					[html submitButtonWithAction: 
							[self call: (WACommentList new commentContainer: article comments)]
						text: 'Comments List ']]!

modifyArticle

"Allow to modify an Article"

	article modify: (self call: ((WAArticleModify new article: article) validateWith: [:a | a validate]; addMessage: 'Modify article')).!

title
   ^ 'Viewing article ', article title!

addComment

"Allow to add a Comment about an Article"

	article comments addComment: (self call: ((WACommentAdd new) validateWith: [:a | a validate]; addMessage: 'Add a comment')).! !

!WAArticleView methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	article := nil.
	^self! !

!WAArticleView methodsFor: 'accessing'!

conference: aConference
	conference := aConference!

article: anArticle
	article := anArticle.
      self renderedObject: article.!

article
	^article!

getArticleKeywords
   ^ (article keywords)! !


!WALocationView methodsFor: 'rendering'!

addRoom
	location rooms addRoom: (self 
				call: (((WARoomAdd new) rooms: location rooms)
						validateWith: [:a | a validate]; addMessage: 'Add room'))!

title
  ^ 'Viewing location :'!

deleteRoom: aRoom
	location rooms deleteRoom: aRoom.!

renderBody: html 
	html form: 
			[html html: '<b>Place :</b> '.
			html text: location place.
			html break.
			html html: '<b>Address :</b> '.
			html text: location address.
			html break.
			html html: '<ul>'.
			location rooms rooms do: 
					[:aRoom | 
					html html: '<li>'.
					html html: '<u>Room name</u> : '.
					html text: aRoom name.
					(self checkPermission: 'Delete' object: aRoom) 
						ifTrue: 
							[html html: '&nbsp;&nbsp;&nbsp;&nbsp;'.
							html anchorWithAction: [self deleteRoom: aRoom]
								form: WASharedRendering trash asGIFNonTransparent].
					html break.
					html html: '<u>Room capacity</u> : '.
					html text: aRoom capacity.
					html space.
					html html: '</li>'.
					html space.
					html break].
			html html: '</ul>'.
			html break.
			html break.
			(self checkPermission: 'Modify' object: location) 
				ifTrue: 
					[html submitButtonWithAction: [self modifyLocation]
						text: 'Modify this location'].
			html break.
			html break.
			(self checkPermission: 'Add Room' object: location rooms) 
				ifTrue: [html submitButtonWithAction: [self addRoom] text: 'Add Room']]!

modifyLocation
	location modify: (self 
				call: ((WALocationModify new location: location)
						validateWith: [:a | a validate]; addMessage: 'Modify Location'))! !

!WALocationView methodsFor: 'accessing'!

locationsContainer: anObject
	locationsContainer := anObject!

location: aLocation 
	location := aLocation.
	self renderedObject: location!

locationsContainer
	^locationsContainer! !

!WALocationView methodsFor: 'initialize-release'!

initialize
	super initialize.
	locationsContainer := nil.
	^self! !


!WAArticleList methodsFor: 'rendering'!

renderRow: html anArticle: aArticle 
	html html: '<tr>'.
	html html: '<td id="tdleft">'.
	html anchorWithAction: 
			[self call: ((WAArticleView new article: aArticle) conference: conference)]
		text: aArticle title.
	html html: '</td><td id="tdmiddle">'.
	aArticle comments size = 0 
		ifFalse: 
			["html text: aArticle averageRating.	html text: '/5'"

			WASharedRendering new 
				renderAStarRating: html
				rating: aArticle averageRating
				maxRating: 5].
	html html: '</td><td id="tdmiddle">'.
	aArticle reviewerApproved 
		ifTrue: [html text: 'Reviewer Approved']
		ifFalse: 
			[aArticle lecturerApproved 
				ifTrue: [html text: 'Lecturer Approved']
				ifFalse: 
					[aArticle openDiscussion 
						ifTrue: [html text: 'Discussion Open']
						ifFalse: [html text: 'unapproved']]].
	html html: '</td>'.
	(self checkMembership: 'Lecturers' object: conference) 
		ifTrue: [self renderRowLecturer: html anArticle: aArticle]
		ifFalse: [html html: '<td>&nbsp;</td><td>&nbsp;</td>'].
	(self checkPermission: 'Review' object: aArticle) 
		& (self checkMembership: 'Owner' object: conference) not 
			ifTrue: [self renderRowReviewer: html anArticle: aArticle]
			ifFalse: [html html: '<td>&nbsp;</td>'].
	html html: '<td id="tdmiddle">'.
	(self checkPermission: 'Delete' object: aArticle) 
		ifTrue: 
			[html anchorWithAction: [self deleteArticle: aArticle]
				form: WASharedRendering trash asGIFNonTransparent].
	html html: '</td>'.
	html html: '</tr>'!

deleteArticle: anArticle
	conference articleContainer deleteArticle: anArticle.!

renderRowLecturer: html anArticle: aArticle 
	html html: '<td id="tdmiddle">'.
	aArticle lecturerApproved 
		ifTrue: 
			[html anchorWithAction: [aArticle lecturerDisapprove]
				text: 'LecturerDisapprove']
		ifFalse: 
			[html anchorWithAction: [aArticle lecturerApprove] text: 'LecturerApprove'].
	html html: '</td><td id="tdmiddle">'.
	(self checkMembership: 'Lecturers' object: conference) 
		ifTrue: 
			[aArticle openDiscussion 
				ifTrue: 
					[html anchorWithAction: [aArticle closeADiscussion] text: 'Close Discussion']
				ifFalse: 
					[html anchorWithAction: [aArticle openADiscussion] text: 'Open Discussion']].
	html html: '</td> '!

title
   ^ 'Articles list'!

renderBody: html 
	html html: '<table id="tablearticles">'.
	html 
		html: '<th id="thleft">Article Title</th><th id="thmiddle">Avg Rating</th> <th id="thmiddle"></th> <th id="thmiddle"></th> <th id="thmiddle"></th> <th id="thright"></th> <th id="thright"></th>'.
	self articleList 
		do: [:aArticle | 
			(self checkPermission: 'View' object: aArticle) 
				ifTrue: [
					((self checkMembership: 'Owner' object: aArticle) | (self checkMembership: 'Lecturers' object: conference) | (self checkMembership: 'Reviewer' object: conference))
						ifTrue: [ self renderRow: html anArticle: aArticle ]
						ifFalse: [
								(aArticle reviewerApproved)
									ifTrue: [ self renderRow: html anArticle: aArticle ].
								]
					].
			].
	self articleList size = 0 
		ifTrue: [html strong: 'There is no articles for this conference.'].
	html html: '</table>'!

renderRowReviewer: html anArticle: aArticle 
	html html: '<td id="tdmiddle">'.
	aArticle reviewerApproved 
		ifTrue: 
			[html anchorWithAction: [aArticle reviewerDisapprove]
				text: 'ReviewerDisapprove']
		ifFalse: 
			[html anchorWithAction: [aArticle reviewerApprove] text: 'ReviewerApprove'].
	html html: '</td> '! !

!WAArticleList methodsFor: 'initialize-release'!

initialize
	super initialize.
	conference := nil.
	^self! !

!WAArticleList methodsFor: 'accessing'!

conference
	^conference!

conference: aConference 
	conference := aConference.
	self renderedObject: (conference articleContainer)!

articleList
	^conference articleContainer articles! !


!WAUserManager methodsFor: 'rendering'!

renderBody: html 
	html form: 
			[html submitButtonWithAction: [self addUser] text: 'Add an user'.
			"			html submitButtonWithAction: [self call: ((WAUserAdd validateWith: [:a | a validate]) addMessage: 'Add a user') ] text: 'Add User'."
			html break.
			html break.
			html 
				submitButtonWithAction: [self call: (WAUserList new userManager: userManager)]
				text: 'Users List '.
			html break.
			html break]!

addUser
	^userManager addUser: (self 
				call: ((WAUserAdd new userManager: userManager)
						validateWith: [:a | a validate]; addMessage: 'Add an user'))!

register: html 
	html heading: 'User Manager'!

title
	^'User Manager Home Page'! !

!WAUserManager methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WAUserManager methodsFor: 'accessing'!

userManager: aUserManager 
	userManager := aUserManager.
	self renderedObject: userManager!

checkLogin: loginDict 
	self inform: 'Wrong password'! !


!WALocationList methodsFor: 'rendering'!

deleteLocation: aLocation
	locationsContainer deleteLocation: aLocation.!

title
  ^ 'Locations list :'!

renderBody: html 
	locationsContainer getLocationsObjects do: 
			[:aLoc | 
			(self checkPermission: 'View' object: aLoc) 
				ifTrue: 
					[html html: '<li>'.
					html anchorWithAction: 
							[self call: ((WALocationView new location: aLoc) 
										locationsContainer: locationsContainer)]
						text: aLoc place].
			html text: '  (' , aLoc address , ')'.
			(self checkPermission: 'Delete' object: aLoc) 
				ifTrue: 
					[html html: '&nbsp;&nbsp;&nbsp;&nbsp;'.
					html anchorWithAction: [self deleteLocation: aLoc]
						form: WASharedRendering trash asGIFNonTransparent].
			html space.
			html html: '</li>'.
			html space.
			html break]! !

!WALocationList methodsFor: 'accessing'!

locationsContainer
	^locationsContainer!

locationsContainer: anObject 
	locationsContainer := anObject.
	self renderedObject: locationsContainer! !

!WALocationList methodsFor: 'initialize-release'!

initialize
	super initialize.
	locationsContainer := nil.
	^self! !


!WAConferenceList methodsFor: 'rendering'!

deleteConference: aConference
	confContainer deleteConference: aConference.!

title
  ^ 'Conferences list :'!

renderBody: html 
	html html: '<ul>'.
	confContainer getConferencesObjects do: 
			[:aConf | 
			(self checkPermission: 'View' object: aConf) 
				ifTrue: 
					[html html: '<li>'.
					html anchorWithAction: 
							[self 
								call: (((((WAConferenceView new conference: aConf) userManager: userManager) 
										confContainer: confContainer) locationsContainer: locationsContainer) renderContentOn: html)]
						text: aConf name.
					(self checkPermission: 'Delete' object: aConf) 
						ifTrue: 
							[html html: '&nbsp;&nbsp;&nbsp;&nbsp;'.
							html anchorWithAction: [self deleteConference: aConf]
								form: WASharedRendering trash asGIFNonTransparent].
					html space.
					(self checkPermission: 'Mail article author' object: aConf) 
						ifTrue: 
							[html anchorWithAction: [aConf mailReportToAll]
								form: WASharedRendering mail asGIFNonTransparent].
					html html: '</li>'.
					html space.
					html break]].
	html html: '</ul>'.! !

!WAConferenceList methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Replace this comment with the appropriate initialization code *** "
	^self! !

!WAConferenceList methodsFor: 'accessing'!

locationsContainer: aLocationsContainer
   locationsContainer := aLocationsContainer!

confContainer: aConferenceContainer
  confContainer := aConferenceContainer.
  self renderedObject: confContainer.!

userManager: aUserManager
   userManager := aUserManager! !


!WAPermissionManagerView methodsFor: 'rendering'!

renderBody: html 
	| permissionDictionary |
	permissionManager permissionDictionary keys do: 
			[:permissionName | 
			permissionDictionary := permissionManager permissionDictionary.
			html anchorWithAction: 
					[permissionManager setPermission: permissionName
						members: (self call: ((WAPermissionModify new)
										permissionManager: permissionManager;
										membershipManager: membershipManager;
										permissionName: permissionName;
										addMessage: 'Change Permission'))]
				text: permissionName.
			html text: ': '.
			(permissionDictionary at: permissionName) do: 
					[:member | 
					html text: member.
					html space].
			html break].
	html break.
	html break.
	html break!

title
	^'Permission Manager for ' , self permissionManager renderedObjectName! !

!WAPermissionManagerView methodsFor: 'initialize-release'!

initialize
	super initialize.
	permissionManager := nil.
	^self! !

!WAPermissionManagerView methodsFor: 'accessing'!

hasParent
	^false!

membershipManager: aMembershipManager 
	membershipManager := aMembershipManager!

permissionManager
	^permissionManager!

permissionManager: aPermissionManager 
	permissionManager := aPermissionManager!

membershipManager
	^membershipManager! !


!WAConfManNavigation methodsFor: 'rendering'!

renderBody: html 
	 html anchorWithAction:[parent show: ((WAConferenceManagerView new) confManager: conferenceManager)] text: 'Home'.
	conferenceManager confContainer conferences do: 
			[:conference | 
			html divNamed: 'conference-navigation'
				with: 
					[html anchorWithAction: 
							[parent show: ((WAConferenceView new)
										conference: conference;
										userManager: conferenceManager userManager;
										confContainer: conferenceManager confContainer;
                                                            locationsContainer: conferenceManager locationsContainer)]
						text: conference name.
					html space. html space. 
	html anchorWithAction: [parent show: ((WALocationView new) location: conference location)] form: ((WASharedRendering home) asGIFNonTransparent).
					].
			conference articleContainer articles do: 
					[:article | 
					(self checkPermission: 'View' object: article) 
						ifTrue: [
							(((self checkMembership: 'Owner' object: article) | (self checkMembership: 'Lecturers' object: conference) | (self checkMembership: 'Reviewer' object: conference)) | (article reviewerApproved))
								ifTrue: [ 
									html divNamed: 'article-navigation'
										with: [html anchorWithAction: [parent show: ((WAArticleView new article: article) conference: article parent parent)] text: article title] 
										].
					].

					
				]
			].
	html break.
	html break! !

!WAConfManNavigation methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."
	" *** Replace this comment with the appropriate initialization code *** "
     super initialize.
"     navigation:= self session navigation."
	^self! !

!WAConfManNavigation methodsFor: 'accessing'!

title
   ^ 'Navigation'!

hasParent
  ^ false!

parent: aParentObject
   parent := aParentObject.!

conferenceManager: aConferenceManager
    conferenceManager := aConferenceManager.! !


!WACommentList methodsFor: 'rendering'!

deleteComment: aComment
	commentContainer deleteComment: aComment.!

renderBody: html 
	html text: 'There are '.
	html text: commentContainer size.
	html text: ' comments for this article'.
	html break.
	html break.
	html break.
      html html: '<ul>'.
	commentContainer comments do: 
			[:aComment | 
                        (self checkPermission: 'View' object: aComment)
					ifTrue: 
						[html html: '<li>'.
						html html: '<b>User : </b>'.
						html text: aComment user.
						(self checkPermission: 'Delete' object: aComment)
							ifTrue: 
								[html space.
								html space.
								html space.
								html space.
								html anchorWithAction: [self deleteComment: aComment]
									text: 
										[html imageWithForm: WASharedRendering aDeletePicture asGIFNonTransparent]].
						html break.
						html html: '<b>Rating : </b>'.
						html text: aComment rating.
						html break.
						html html: '<b>Text : </b>'.
						html text: aComment text.
						html html: '</li>'.
						html space.
						html break.
						html break]].
	html html: '</ul>'!

title
   ^ 'Comments list'! !

!WACommentList methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance"

	super initialize.
	commentContainer := nil.
	^self! !

!WACommentList methodsFor: 'accessing'!

commentContainer
   ^ commentContainer!

commentContainer: aCommentContainer
   commentContainer := aCommentContainer.
   self renderedObject: commentContainer.! !


!WALoginManager methodsFor: 'rendering'!

addWAUserModify
	(userManager getUser: self session getLoggedUserLogin) 
		modify: (self call: ((WAUserModify new)
						currentUser: (userManager getUser: self session getLoggedUserLogin);
						userManager: userManager;
						validateWith: [:a | a validate];
						addMessage: 'Modify your profile'))!

renderContentOn: html 
html divNamed: 'mainTitle' with: [html text: self title].
html divNamed: 'nothing' with: [
                    self session isLogged 
				ifTrue: 
					[html text: 'You are logged in as '.
					html text: self session getLoggedUserLogin.
					html break.
					html anchorWithAction: [self addWAUserModify] text: 'Modify your profile'.
					html break.
					html break.
					html anchorWithAction: [self logout] text: 'Logout'.
					html break.
					html break]
				ifFalse: 
					[html text: 'You are not logged in'.
					html form: 
							[html submitButtonWithAction: 
									[(self 
										checkLogin: (self call: (Seaside.WAUserLogin new addMessage: 'User Login'))) 
											ifNil: [self inform: 'Wrong login or password !!']
									"ifNotNil: [self inform: 'You are now logged in']"]
								text: 'Login'].
					(userManager permissionManager hasPermission: 'Add User'
						memberName: self session getLoggedUserLogin) 
							ifTrue: 
								[html form: 
										[html submitButtonWithAction: 
												[userManager 
													addUser: (self call: ((WAUserAdd new userManager: userManager)
																	validateWith: [:a | a validate];
																	addMessage: 'Register'))]
											text: 'Register']]]]! !

!WALoginManager methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WALoginManager methodsFor: 'accessing'!

userManager: anUserManager 
	userManager := anUserManager!

parent
   ^ parent!

logout
	self session user: nil.
	^parent show: WAConferenceManager new!

parent: aParentObject
   parent := aParentObject!

checkLogin: loginDict 
	| login user pass |
	login := loginDict at: 'login'.
	pass := loginDict at: 'password'.
	(userManager hasLogin: login) 
		ifTrue: 
			[user := userManager getUser: login.
			user password = pass ifTrue: [(self session) user: (userManager getUser: login)] ifFalse: [^nil]]
		ifFalse: [^nil]!

title
	^'Login Manager'! !


!WAScheduleView methodsFor: 'rendering'!

renderDate: html date: aDate 
	html text: aDate day.
      html text: '-'.
	html text: aDate monthName.
      html text: '-'.
	html text: aDate year.
      html space.
	html text: aDate hour.
      html text: ' h '.
	html text: aDate minute.!

addTalk
         self schedule addTalk: (self call: ((WATalkAdd new) conference: conference;  validateWith: [:a | a validate]; addMessage: 'Add a Talk'))!

renderBody: html 
	html form: 
			[self hasArticleToAssign 
				& (self checkMembership: 'Lecturers' object: conference) 
					ifTrue: 
						[html submitButtonWithAction: [self addTalk] text: 'Add a Talk'.
						html break.
						html break].
			html break.
			self schedule talks size = 0 
				ifTrue: 
					[html text: 'there is no talk for this conference'.
					html break]
				ifFalse: 
					[self schedule talks do: 
							[:talk | 
                                (self checkPermission: 'View' object: talk) ifTrue:[
							html text: 'About : '.
							html text: talk article title.
							(self checkPermission: 'Delete' object: talk) 
								ifTrue: 
									[html html: '&nbsp;&nbsp;&nbsp;&nbsp;'.
									html anchorWithAction: [self deleteTalk: talk]
										form: WASharedRendering trash asGIFNonTransparent].
							html break.
							html text: 'Begin: '.
							self renderDate: html date: talk dateTimeBegin.
							html break.
							html text: 'End: '.
							self renderDate: html date: talk dateTimeEnd.
							html break.
							html text: 'Room: '.
							html text: talk room name.
							html break.
							html break]]]]! !

!WAScheduleView methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Edit the following to properly initialize instance variables ***"
	articleContainer := nil.
      conference := nil.
	" *** And replace this comment with additional initialization code *** "
	^self! !

!WAScheduleView methodsFor: 'accessing'!

title
	^'The schedule'!

deleteTalk: talk
     conference schedule deleteTalk: talk!

conference
	^conference!

conference: aConference 
	conference := aConference.
	self renderedObject: conference schedule!

schedule
	^conference schedule!

articleContainer
	^conference articleContainer!

hasArticleToAssign
	^((Set withAll: self articleContainer approvedArticles) 
		- self schedule articleAssigned) size 
		~= 0! !


!WAMembershipManagerView methodsFor: 'rendering'!

renderContentOn: html 
	| membersDictionary |
	html divNamed: 'mainTitle' with: 'MembershipManager'.
	html divNamed: 'mainText'
		with: 
			[membershipManager getVisibleGroups do: 
					[:groupName | 
					membersDictionary := membershipManager groupDictionary.
					html anchorWithAction: 
							[membershipManager 
								setGroupMembers: (self call: ((WAMemberModify new)
												membershipManager: membershipManager;
												memberGroup: groupName;
												members: membersDictionary;
												addMessage: 'Change group of members'))
								groupName: groupName]
						text: groupName.
					html text: ': '.
					(membersDictionary at: groupName) do: 
							[:member | 
							html text: member.
							html space].
					html break].
			html break.
			html break.
			html anchorWithAction: 
					[membershipManager addGroupMembers: (self call: WAMemberAdd new)]
				text: 'Add a group of member']! !

!WAMembershipManagerView methodsFor: 'accessing'!

membershipManager
	^membershipManager!

membershipManager: aMembershipManager 
	membershipManager := aMembershipManager! !

!WAMembershipManagerView methodsFor: 'initialize-release'!

initialize
	super initialize.
      membershipManager := nil.
	^self! !


!WAGroupList methodsFor: 'rendering'!

renderBody: html 
	html html: '<ul>'.
	groupManager getGroups do: 
			[:aGroup | 
			(aGroup permissionManager hasPermission: 'View'
				memberName: self session getLoggedUserLogin) 
					ifTrue: 
						[html html: '<li>'.
						html text: aGroup name.
						html html: '</li>'.
						html space.
						html break]].
	html html: '</ul>'.! !

!WAGroupList methodsFor: 'initialize-release'!

initialize
	super initialize.
	^self! !

!WAGroupList methodsFor: 'accessing'!

groupManager: aGroupManager
	groupManager := aGroupManager!

title
 ^ 'Group list'! !


!WAUserAdd methodsFor: 'rendering'!

rows
"	^ #(name surname login password email skills)"
	^ #(name surname login password email skills)!

ok
	(userManager hasLogin: user login) 
		ifTrue: [self inform: 'Login already exists.']
		ifFalse: 
			[user setOwner: user login.
			self answer: user]!

renderSkillsOn: html 
	| existingKeywords |
	existingKeywords := KeywordsContainer withAll: user skills
				sortBlock: user skills sortBlock.
	user skills: userManager sharedSkills.
	html with: 
			[((WAKeywordsRenderer new)
				allKeywords: user skills;
				sharedKeywords: userManager sharedSkills;
				existingKeywords: existingKeywords) renderContentOn: html]!

register: html 
	html heading: 'New user creation'!

model
	^ user!

labelForSelector: aSymbol
	aSymbol == #name ifTrue: [^'Your name'].
	aSymbol == #surname ifTrue: [^'Your surname'].
	aSymbol == #login ifTrue: [^'Your login'].
	aSymbol == #password ifTrue: [^'Your password'].
	aSymbol == #email ifTrue: [^'Your email'].
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol!

renderPasswordOn: html 
html passwordInputWithCallback: [:c | user password: c].!

renderKeywordsOn: html
 user skills: (userManager sharedSkills).
 html with: [((WAKeywordsRenderer new allKeywords: user skills; sharedKeywords: (userManager sharedSkills)) renderContentOn: html)].! !

!WAUserAdd methodsFor: 'accessing'!

userManager: aUserManager
  userManager := aUserManager! !

!WAUserAdd methodsFor: 'initialize-release'!

initialize
	super initialize.
	user := User new initialize.
	^self! !


!WAUserView class methodsFor: 'initialize-release'!

new: aUsername
  username := aUsername.! !


!WAUserView methodsFor: 'rendering'!

renderBody: html 
	html form: 
			[
			html html: '<table border=0><tr><td align=left>'.
			html html: '<b>Name :</b> '.
			html text: user name.
			html break.
			html html: '<b>Surname :</b> '.
			html text: user surname.
			html break.
			html html: '<b>Login :</b> '.
			html text: user login.
			html break.
			html html: '<b>Email :</b> '.
			html text: user email.
			html break.
			html html: '<b>Skills :</b> '.
			WASharedRendering new renderComaSeparatedListOn: html aList: user skills.
			html break.
			html break.
			(user permissionManager hasPermission: 'Modify'
				memberName: self session getLoggedUserLogin) 
					ifTrue: 
						[html submitButtonWithAction: [self modifyUser] text: 'Modify this user'.
						html break.
						html break].
			html html: '</td></tr></table>']!

modifyUser
	user modify: (self call: (((WAUserModify new currentUser: user) userManager: userManager)  validateWith: [:a | a validate]; addMessage: 'Modify user')).! !

!WAUserView methodsFor: 'accessing'!

title
	^'Viewing user ' , user login!

userManager: aUserManager 
	userManager := aUserManager!

user: anUser
	user := anUser.
      self renderedObject: user.! !

!WAUserView methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Edit the following to properly initialize instance variables ***"
	username := nil.
	" *** And replace this comment with additional initialization code *** "
	^self! !


!WAConferenceManager class methodsFor: 'As yet unclassified'!

canBeRoot
   ^ true! !

!WAConferenceManager class methodsFor: 'instance creation'!

initialize
      | app |
	ConfManager := ConferenceManager new initialize.
	app := self registerAsApplication: 'ConferenceManager'.
      app preferenceAt: #sessionClass put: WAConfManSession.! !


!WAConferenceManager methodsFor: 'rendering'!

renderFooter: html
html break.
html break.
html break.
html break.
html break.
html break.
html html: '<center>'.
html html: '</center>'.!

style
	^'
#body {
	font-size: 11px;               
	font-family: verdana, arial;
	color: #333;
	background-color:white;
	padding:0;
}
#header {
	width: 100%;
	border-color:#333;
	border-style:solid; 
	border-width:1px 0 1px 0; 
	padding:0 0 0 0; 
	height:50px; 
	margin-bottom: 40px;
 } 
#headerLeft{ float: left; }
#headerRight{ margin-left: 50px; float: Left; }
#title { font-family: verdana, arial; font-size: 16pt; font-weight: bold; }
#subtitle { font-size: 9pt;  font-style: italic; }

#container{
	width:  100%;
/*	height: 600px; */
/*	border:  1px solid blue; */
}
#containerLeft{
	position: relative;
	float: left;
	left: 0px;
	top: 0px;
	height: 100%;
	margin-left: 10px;
	width: 220px;
	height: 100%;
/*	border: 2px solid green; */
}
#containerRight{
	position: relative;
	margin-left: 240px;
	top: 0px;
	height: 100%;
	width: 800px;
/*	border: 2px solid red; */
}
#side {
	position: relative;
	left:0px;
	top: 0px;
	font-size: 11px;
	font-family: verdana, arial;
	width: 220px;
	vertical-align: top;
	border: 1px solid #333333;
	text-align: center;
}
#main {  
	border: 1px solid #333333;
	vertical-align: top;
	width: 100%;
/*	border: 10px solid yellow; */
}
#navigation{ 
    position:relative;    
	border: 1px solid #333333;
    width:220px;
    font-size:11px;
}
#mainText {
	padding: 10px;
	text-align: left;
/*	border: 2px solid yellow; */
	align: center;
}

#navigationTitle {
	margin-top: 3px;
	font-size: 9pt;
	font-style: italic;
}
form {
	vertical-align:text-top;
}
div {
	vertical-align:text-top;
}
#mainTitle{
	color: #333;
	font-size:16px;
	padding: 3px;
	background-color: #95a6e0;
	text-align:center;
	border-color:#333;
	border-style:solid;
	border-width:0px 0px 1px 0px;
}

#mainText table{
	vertical-align:top;
}

input.submit {
	font-size: 11px;
	font-family: verdana, arial;
	width: 150px;
}

input.text{
	background-color: #EEEEFF;
}
input.password{
	background-color: #EEEEFF;
}
input.file{
	background-color: #EEEEFF;
}
input.checkbox{
	background-color: #EEEEFF;
}
select{
	background-color: #EEEEFF;
}

.validation-error {color: red; font-size: 9pt; padding: 5px}
#tablearticles {	
	border-collapse: collapse; 
	border: 1px solid gray; 
	spacing: 0px; 
	padding: 0px; 
	text-align: center; 
	width: 100%;  
	valign: top;
	}
#tdleft { 
	font-family: times, serif; 
	font-size: 10pt; 
	color: green; 
	font-style: italic; 
	font-weight: bold; 
	text-align: left; 
	padding-left: 2em; 
	width: 15em;
	}
#tdleft a {color: #3333FF;}
#tdmiddle { width: 10em; border-top: 0px solid gray; border-left: 1px solid gray; font-size: 10px;}
#tdright {}

#thleft {
	font-family: times, serif; 
	font-size: 10pt;
	background-color: #DDDDDD;
	border-bottom: 1px solid gray; 
}
#thmiddle { 
	font-family: times, serif; 
	font-size: 10pt;
	background-color: #DDDDDD;
	border-left: 1px solid gray; 
	border-bottom: 1px solid gray; 
}
#thright {
	font-family: times, serif; 
	font-size: 10pt;
	background-color: #DDDDDD;
	border-left: 1px solid gray; 
	border-bottom: 1px solid gray; 
	}

a {text-decoration: none; color: #3333FF;}

dialog-form-label {font-size:9px;}

ul { text-align: left;}

#submain{
	border-top: 1px solid gray;
	border-bottom: 1px solid gray;  
}

#security{
     float: right;
     text-align: center;
     margin-right: -1px; /* 1px for border */
     font-size: 9pt;
     width:160px;
     height: 18px;
     background-color:#bcd5f4;
     border: 1px solid black;
}
#security:hover {background-color:#e6effa;}

#back{
    float: left;
    text-align: center;
    margin-left: -1px;
    font-size: 9pt;
    width: 160px;
    height: 18px;
    background-color:#bcd5f4;
	border: 1px solid black; 
}
#back:hover {background-color:#e6effa;}

#conference-navigation {padding-left: 15px;vertical-align:top;margin-top:10px; text-decoration: underline ;font-weight:bold;}
#article-navigation {padding-left: 30px;	vertical-align:top;}

h3 {
	color: #333;
	font-size:16px;
	padding: 3px;
	background-color: #95a6e0;
	text-align:center;
	border-color:#333;
	border-style:solid;
	vertical-align:top;
	margin-top:0px;
	border-width:0px 0px 1px 0px;
}
img {border: 0px}
'!

renderContentOn: html 
	html divNamed: 'header' with: 
			[
			html divNamed: 'headerLeft' with: [
				html divNamed: 'title' with: [html anchorWithAction: [^self call: WAConferenceManager new] text: 'Conference Manager'. ].
				html divNamed: 'subtitle' with: 'Wonderful Conference manager'. 
				].		
	].
	html divNamed: 'container' with:[
		html divNamed: 'containerLeft' with:[
			confTask renderNavigationOn: html.
			html break.
			html divNamed: 'side' with: loginManager. 
			].
		html divNamed: 'containerRight' with:[
			html divNamed: 'main' with: confTask.
			].
	].
	self renderFooter: html.! !

!WAConferenceManager methodsFor: 'accessing'!

confManager: aConfManager
   confManager := aConfManager!

confManager
  ^ confManager! !

!WAConferenceManager methodsFor: 'initialize-release'!

children
	^ Array with: confTask with: loginManager.!

initialize
	self session userList: ConfManager userManager getUserLogins.
	self session 
		navigation: (WAConfManNavigation new conferenceManager: ConfManager).
	confTask := WAConferenceManagerView new confManager: ConfManager.
	loginManager := WALoginManager new parent: self.
	loginManager userManager: ConfManager userManager.! !


!WAGroupManager methodsFor: 'rendering'!

renderBody: html 
	html form: 
			[(groupManager permissionManager hasPermission: 'Add Group'
				memberName: self session getLoggedUserLogin) 
					ifTrue: 
						[html submitButtonWithAction: [self addGroup] text: 'Add Group'.
						html break.
						html break].
			(groupManager permissionManager hasPermission: 'View'
				memberName: self session getLoggedUserLogin) 
					ifTrue: 
						[html submitButtonWithAction: 
								[self call: (WAGroupList new groupManager: groupManager)]
							text: 'Group list'.
						html break.
						html break]]!

title
   ^ 'Group Manager'.! !

!WAGroupManager methodsFor: 'mutator'!

addGroup
groupManager addGroup: (self call: ((WAGroupAdd new)
						validateWith: [:a | a validate]; addMessage: 'Add a Group'))! !

!WAGroupManager methodsFor: 'initialize-release'!

initialize
	"Initialize a newly created instance. This method must answer the receiver."

	super initialize.
	" *** Edit the following to properly initialize instance variables ***"
	groupManager := nil.
	" *** And replace this comment with additional initialization code *** "
	^self! !

!WAGroupManager methodsFor: 'accessing'!

groupManager
	^groupManager!

groupManager: aGroupManager
	groupManager := aGroupManager.
      self renderedObject: groupManager.! !


!WALocationModify methodsFor: 'rendering'!

rows
	^ #(place address)!

ok
	self answer: location!

model
	^ location!

register: html 
	html heading: 'Location modification'!

labelForSelector: aSymbol
	aSymbol == #ok ifTrue: [^'Continue'].
	^ super labelForSelector: aSymbol! !

!WALocationModify methodsFor: 'accessing'!

location: anObject
	location := anObject! !

!WALocationModify methodsFor: 'initialize-release'!

initialize
	super initialize.
	location := Location new initialize.
	^self! !



#{WAConferenceManager} initialize!

Generated by
GNU enscript 1.6.4.

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: