Project

General

Profile

1
<%@ taglib prefix="s" uri="/struts-tags"%>
2
<%@ page contentType="text/html; charset=UTF-8"%>
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6

    
7
	<head>
8
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
		<title>DRIVER Communities</title>
10
		<link href='<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/<s:property value="#application['webInterfaceLayoutManager'].cssFileName" />' rel="stylesheet" type="text/css" />
11
		<link href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/assets/SimpleTabs.css" rel="stylesheet" type="text/css" />
12
		<link rel="shortcut icon" href="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/favicon.ico" />
13
		<!-- MB - ADD mootools here: new version -->
14
		<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3-core.js"></script>
15
		<script type="text/javascript" src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/js/mootools-1.2.3.1-more.js"></script>
16
		<script type="text/javascript">
17
			function makeSimpleMember(idSuffix) {
18
				document.getElementById('viewCommunityMembersActionRole' + idSuffix).value = 'SIMPLE_MEMBER';
19
				var form = document.getElementById('viewCommunityMembersAction' + idSuffix);
20
				form.action = 'EditCommunityMember.action';
21
				form.submit();
22
			}
23

    
24
                        function makeManager(idSuffix) {
25
                                document.getElementById('viewCommunityMembersActionRole' + idSuffix).value = 'MANAGER';
26
                                var form = document.getElementById('viewCommunityMembersAction' + idSuffix);
27
				form.action = 'EditCommunityMember.action';
28
				form.submit();
29
                        }
30

    
31
                        function makeOwner(idSuffix) {
32
                                document.getElementById('viewCommunityMembersActionRole' + idSuffix).value = 'OWNER';
33
                                var form = document.getElementById('viewCommunityMembersAction' + idSuffix);
34
				form.action = 'EditCommunityMember.action';
35
				form.submit();
36
			}
37
			
38
			function deleteMember(idSuffix) {
39
				var form = document.getElementById('viewCommunityMembersAction' + idSuffix);
40
				form.action = 'DeleteCommunityMember.action';
41
				form.submit();
42
			}
43
		</script>
44
	</head>
45
	<body>
46
		<div id="center">
47
			<div id="wrapper">
48
				<div class="wrapper_shadowleft">
49
					<div class="wrapper_shadowright">
50
						<div id="container">
51
							<jsp:include page="/pages/banner.jsp" />
52
							<jsp:include page="/pages/menu.jsp" />
53
							<p class="clear" />
54
							<div id="leftcolumn">
55
								<b class="curved_top">
56
									<b class="curved_t1"></b>
57
									<b class="curved_t2"></b>
58
									<b class="curved_t3"></b>
59
									<b class="curved_t4"></b>
60
								</b>
61
                                <div class="curved_container clearfix">
62
                                    <div class="featured_top leftcolumn_top">Communities</div>
63
                                    <s:if test="%{displayMyDriverMenu}">
64
                                        <jsp:include page="/pages/community/myCommunitiesMenu.jsp" />
65
                                    </s:if>
66
                                    <s:else>
67
                                        <s:set name="action" value="%{'ViewCommunityMembers.action'}"/>
68
                                        <jsp:include page="/pages/community/allCommunitiesMenu.jsp" />									
69
                                    </s:else>
70
                                </div>
71
								<b class="curved_bottom">
72
									<b class="curved_b4"></b>
73
									<b class="curved_b3"></b>
74
									<b class="curved_b2"></b>
75
									<b class="curved_b1"></b>
76
								</b>
77
							</div>
78
							<div id="maincolumn2">
79
	                            <div id="communityPage">
80
									<b class="curved_top">
81
                                        <b class="curved_t1"></b>
82
                                        <b class="curved_t2"></b>
83
                                        <b class="curved_t3"></b>
84
                                        <b class="curved_t4"></b>
85
                                    </b>
86
                                    <div class="curved_container clearfix">
87
                                        <div class="featured_top communityPage_top">
88
                                            <div class="right communityField">
89
                                                <s:if test="%{displayJoin}">
90
                                                    <a class="ovalbutton" href="JoinCommunity.action?communityId=<s:property value="communityId" /><s:if test="%{displayMyDriverMenu}">&amp;displayMyDriverMenu=true</s:if><s:if test="%{initialLetter != null}">&amp;initialLetter=<s:property value="initialLetter" /></s:if>">
91
                                                        <span>Join</span>
92
                                                    </a>
93
                                                </s:if>
94
                                                <s:if test="%{displayLeave}">
95
                                                    <a class="ovalbutton" href="LeaveCommunity.action?communityId=<s:property value="communityId" /><s:if test="%{displayMyDriverMenu}">&amp;displayMyDriverMenu=true</s:if><s:if test="%{initialLetter != null}">&amp;initialLetter=<s:property value="initialLetter" /></s:if>">
96
                                                        <span>Leave</span>
97
                                                    </a>
98
                                                </s:if>
99
                                            </div>
100
                                            <img src="<s:property value="#application[@gr.uoa.di.driver.web.listeners.DriverContextListener@APACHE_URL]"/>/static-content/images/icons/communities.png" alt="DRIVER Communities" width="16" height="16" class="absmiddle" />
101
                                            &nbsp;
102
                                            <a href="ViewCommunity.action?communityId=<s:property value="communityId" /><s:if test="%{displayMyDriverMenu}">&amp;displayMyDriverMenu=true</s:if><s:if test="%{initialLetter != null}">&amp;initialLetter=<s:property value="initialLetter" /></s:if>">
103
                                                <s:property value="community.name" />
104
                                            </a>
105
                                        </div>
106
                                        <s:set name="selectedTab" value="%{6}"/>
107
                                        <jsp:include page="/pages/community/tabsMenu.jsp" />									
108
                                        <div class="tab-wrapper clearfix">
109
                                            <div class="mydriveritem col1">
110
                                                <s:if test="members.size() == 0">
111
                                                    <div class="communityField">
112
                                                    	<span class="communityFieldComments">This community has no members.</span>
113
                                                     </div>
114
                                                </s:if>
115
                                                <s:else>
116
                                                    <div class="communityField">
117
	                                                    <span class="communityFieldComments">
118
                                                            This community has
119
                                                            <s:property value="members.size()" />
120
                                                            member(s)
121
                                                        </span>
122
                                                    </div>
123
                                                    <s:iterator value="members">
124
                                                        <div class="communityField">
125
                                                        <form id="viewCommunityMembersAction<s:property value="resourceId" />" method="POST">
126
                                                            <input type="hidden" name="communityId" value="<s:property value="communityId" />" />
127
                                                            <input type="hidden" name="memberId" value="<s:property value="resourceId" />" />
128
                                                            <input type="hidden" name="role" id="viewCommunityMembersActionRole<s:property value="resourceId" />" />
129
                                                            <div class=" right">
130
                                                                <s:if test="%{getDisplayMakeManager(resourceId)}">
131
                                                                    <a href="#" onClick="makeManager('<s:property value="resourceId" />');" class="ovalbutton" > <span>Make manager</span></a>
132
                                                                </s:if>
133
                                                                <s:if test="%{getDisplayDelete(resourceId)}">
134
                                                                   <a href="#" onClick="deleteMember('<s:property value="resourceId" />');" class="ovalbutton" > <span>Remove</span></a>
135
                                                                </s:if>
136
                                                                <s:if test="%{getDisplayMakeOwner(resourceId)}">
137
                                                                    <a href="#" onClick="makeOwner('<s:property value="resourceId" />');" class="ovalbutton" > <span>Make owner</span></a>
138
                                                                </s:if>
139
                                                                <s:if test="%{getDisplayMakeSimpleMember(resourceId)}">
140
                                                                    <a href="#" onClick="makeSimpleMember('<s:property value="resourceId" />');" class="ovalbutton" > <span>Make simple member</span></a>
141
                                                               </s:if>
142
                                                            </div>
143
                                                        </form>
144
                                                        	<s:if test="%{((firstname == null) || firstname.isEmpty()) && ((lastname == null) || lastname.isEmpty())}">
145
                                                        		<s:property value="email.split('@')[0]" />@...
146
                                                        	</s:if>
147
                                                        	<s:else>
148
	                                                            <s:property value="firstname" />
149
	                                                            <s:property value="lastname" />
150
	                                                        </s:else>
151
                                                            &nbsp;&nbsp;-&nbsp;&nbsp;
152
                                                            (<s:property value="institution" />)
153
                                                            <span class="communityFieldComments">
154
                                                                <s:if test="%{community.owner.equals(resourceId)}">owner</s:if>
155
                                                                <s:else>
156
                                                                   <s:if test="%{community.managers.contains(resourceId)}">manager</s:if>
157
                                                                   <s:else>member</s:else>
158
                                                                </s:else>
159
	                                                        </span>
160
                                                         </div>
161
                                                        
162
                                                    </s:iterator>
163
                                                </s:else>
164
                                            </div>
165
                                            <div class="communityField">&nbsp;</div>
166
                                        </div>
167
									
168
                                    </div>
169
                                    <b class="curved_bottom">
170
                                        <b class="curved_b4"></b>
171
                                        <b class="curved_b3"></b>
172
                                        <b class="curved_b2"></b>
173
                                        <b class="curved_b1"></b>
174
                                    </b>
175
                                </div>
176
                            </div>
177
							<div id="footer">
178
                                <s:action name="FooterPage" executeResult="true"/>
179
                            </div>
180
						</div>
181
					</div>
182
				</div>
183
			</div>
184
		</div>
185
	</body>
186
</html>
(18-18/22)