This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
/
project.xhtml
226 lines (208 loc) · 8.44 KB
/
project.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.org/schema/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:zanata="http://java.sun.com/jsf/composite/zanata"
template="../WEB-INF/template/template.xhtml">
<ui:define name="page_title">
#{messages['jsf.Projects']} - #{projectHome.instance.name}
</ui:define>
<ui:define name="center_content">
<script type="text/javascript">
jQuery(document).ready(function () {
checkHashUrl('#versions_tab', '#settings-general_tab');
renderStatistics();
});
</script>
<h:form>
<a4j:jsFunction name="refreshStatistics" status="statistic-loader"
render="versions_form" action="#{projectHomeAction.resetPageData}"/>
<a4j:jsFunction name="renderStatistics" status="statistic-loader"
render="versions_form" action="#{projectHomeAction.setPageRendered(true)}"/>
</h:form>
<div class="g">
<div class="g__item w--1-m w--3-8-l w--1-3 l--push-bottom-half">
<p class="txt--meta l--push-all-0">
<s:link view="/project/home.xhtml" propagation="none"
value="#{messages['jsf.Projects']}"/>
</p>
<s:div styleClass="media l--push-bottom-half" id="project-info">
<div class="media__body">
<h1 class="l--push-all-0">#{projectHome.instance.name}</h1>
<p class="txt--understated">
<s:fragment
rendered="#{not empty projectHome.instance.description}">
#{projectHome.instance.description}
</s:fragment>
</p>
</div>
<s:fragment
rendered="#{not empty projectHome.instance.sourceCheckoutURL or not empty projectHome.instance.sourceViewURL}">
<div class="d--top l--push-top-half l--pad-top-half">
<h2 class="delta headding--secondary l--push-top-0">
<i
class="i--left i--source"></i> #{messages['jsf.project.SourceCode']}
</h2>
<ul class="list--no-bullets txt--meta l--push-top-quarter">
<s:fragment
rendered="#{not empty projectHome.instance.sourceViewURL}">
<li>
<span class="list__title">
#{messages['jsf.project.HomePage']}:
</span>
<a href="#{projectHome.instance.sourceViewURL}">
#{projectHome.instance.sourceViewURL}<i
class="i--small i--right i--external-link txt--neutral"></i>
</a>
</li>
</s:fragment>
<s:fragment
rendered="#{not empty projectHome.instance.sourceCheckoutURL}">
<li>
<div class="bx--table">
<div class="bx--table__cell txt--nowrap">
<span class="list__title">
#{messages['jsf.project.Repository']}:
</span>
</div>
<div
class="bx--table__cell w--1 w--1-s l--pad-left-quarter">
<input type="text"
class="form__input--copyable js-form__input--copyable"
value="#{projectHome.instance.sourceCheckoutURL}"/>
</div>
</div>
</li>
</s:fragment>
</ul>
</div>
</s:fragment>
</s:div>
<s:fragment rendered="#{identity.loggedIn}">
<div class="panel l--push-top-half">
<div class="panel__header">
<h2 class="panel__heading--small">
#{messages['jsf.YourActivity']}
</h2>
</div>
<div class="l--pad-all-half">
<ui:param name="activities"
value="#{projectHomeAction.getProjectLatestActivity()}"/>
<s:fragment rendered="#{not empty activities}">
<ui:repeat value="#{activities}" var="activity">
<div class="txt--meta">
<zanata:activity-entry value="#{activity}"/>
</div>
</ui:repeat>
</s:fragment>
<s:fragment rendered="#{empty activities}">
<div class="l--pad-all-half bg--high">
<p><em>#{messages['jsf.YouHaveNoActivity']}</em></p>
<p class="txt--meta">#{messages['jsf.NoActivityMessage']}</p>
</div>
</s:fragment>
</div>
</div>
</s:fragment>
</div>
<div class="g__item w--1-m w--5-8-l w--2-3">
<div class="tabs--lined">
<nav class="tabs__nav">
<ul>
<li>
<a href="#versions" id="versions_tab" class="is-active js-tab">
<i class="i i--version"></i>
<span class="is-hidden--s i__text--right">
#{messages['jsf.Versions']}
<s:span styleClass="txt--neutral" id="versions-size">
#{projectHomeAction.getProjectVersions().size}
</s:span>
</span>
</a>
</li>
<li>
<a href="#maintainers" id="maintainers_tab" class="js-tab">
<i class="i i--users"></i>
<span class="is-hidden--m-down i__text--right">
#{messages['jsf.Maintainers']}
<s:span styleClass="txt--neutral" id="maintainers-size">
#{projectHome.instance.maintainers.size}
</s:span>
</span>
</a>
</li>
<li>
<a href="#notes" id="notes_tab" class="js-tab">
<i class="i i--notes"></i>
<span class="is-hidden--s i__text--right">
#{messages['jsf.project.Notes']}
</span>
</a>
</li>
<s:fragment
rendered="#{s:hasPermission(projectHome.instance, 'update')}">
<li class="tab__end">
<div
class="dropdown dropdown--tab dropdown--small dropdown--right dropdown--inline js-dropdown">
<a class="dropdown__toggle js-dropdown__toggle" href="#">
<i class="i i--ellipsis"
data-original-title="#{messages['jsf.tooltip.MoreActions']}"></i>
</a>
<ul class="dropdown__content js-dropdown__content"
role="content" aria-labelledby="dropdownContent">
<li>
<h:outputLink id="exportTMXProjectLink"
styleClass="i__item--right"
onclick="return confirm('#{messages['jsf.ConfirmExportTMXProject']}')"
value="#{request.contextPath}/rest/tm/projects/#{projectHome.slug}">
#{messages['jsf.ExportTMXProject']}<i
class="i i--export i__item__icon"></i>
</h:outputLink>
</li>
</ul>
</div>
</li>
<li class="tab__end">
<a href="#settings" id="settings_tab" class="js-tab"
data-original-title="#{messages['jsf.project.tooltip.ProjectSettings']}">
<span class="is-hidden--m-down i__text--left">
#{messages['jsf.Settings']}
</span>
<i class="i i--settings"></i>
</a>
</li>
</s:fragment>
</ul>
</nav>
<div class="tabs__content panels__container l--push-top-1">
<div id="versions_content" class="is-hidden">
<ui:include
src="../WEB-INF/layout/project/versions-tab.xhtml"/>
</div>
<s:div id="maintainers_content" styleClass="is-hidden">
<zanata:maintainers-tab
value="#{projectHome.instance.maintainers.toArray()}"/>
</s:div>
<s:div id="notes_content" styleClass="is-hidden">
<s:formattedText value="#{projectHome.instance.homeContent}"
rendered="#{not empty projectHome.instance.homeContent}"/>
<s:fragment rendered="#{empty projectHome.instance.homeContent}">
#{messages['jsf.project.NoHomeContent']}
</s:fragment>
</s:div>
<s:fragment
rendered="#{s:hasPermission(projectHome.instance, 'update')}">
<div id="settings_content" class="is-hidden">
<ui:include
src="../WEB-INF/layout/project/settings-tab.xhtml"/>
</div>
</s:fragment>
</div>
</div>
</div>
</div>
</ui:define>
</ui:composition>