
Upgrade Play from 2.2.6 to 2.3.6
* Upgrade sbt from 0.13.0 to 0.13.5. * Upgrade jsmessages from 1.6.1 to 1.6.2. * Downgrade play-2-mail from 1.0.0 to 0.9.1. * Split project/Build.scala into build.sbt and project/BuildConfig.scala. * Introduce sbt-less. * Introduce sbt-twirl, the new template engine for PlayFramework, and fix compile errors caused by it. * Import scala.collection.JavaConversions._ for conversion between Java and Scala collections. * Import java.lang_ and java.util._ to use java types. * Use implicitJavaLang imported from play.core.j.PlayMagicForJava._ instead of lang. * Use requestHeader imported from play.core.j.PlayMagicForJava._ instead of request. * Specify play.data.Form in full qualified name to avoid conflict with play.api.data.Form. * Fix the other template errors. * Etc * Use Result instead of deprecated SimpleResult. * Use java.nio.file.NotDirectoryException instead of scalax.file.NotDirectoryException. * Update README to say use "acvitator" command instead of "play". * Add methods to PlayServlet to support Servlet 3.1 IMPORTANT NOTE: You should modify the version of h2database on which Play depends from 1.3.175 to 1.3.176 in ~/.ivy2/cache/com.typesafe.play/play-jdbc_2.10/ivy-2.3.6.xml as follows:to avoid org.h2.jdbc.JdbcSQLException because of the bug that h2database 1.3.175 cannot create or alter sequence.
@5016350de928be1f44b01d0be31b80c4c123db29
--- README.md
+++ README.md
... | ... | @@ -31,25 +31,25 @@ |
31 | 31 |
|
32 | 32 |
JDK version 7(1.7) is required. |
33 | 33 |
|
34 |
-### Download playframework |
|
34 |
+### Download Play Activator |
|
35 | 35 |
|
36 |
- curl -O http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
36 |
+ curl -O http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
37 | 37 |
|
38 | 38 |
or |
39 | 39 |
|
40 |
- wget http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
40 |
+ wget http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
41 | 41 |
|
42 | 42 |
or using web browser (for windows) |
43 | 43 |
|
44 |
- http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
44 |
+ http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
45 | 45 |
|
46 | 46 |
### Unzip |
47 | 47 |
|
48 |
- unzip play-2.1.0.zip |
|
48 |
+ unzip typesafe-activator-1.2.10-minimal.zip |
|
49 | 49 |
|
50 | 50 |
### Change directory to unzipped directory |
51 | 51 |
|
52 |
- cd play-2.1.0 |
|
52 |
+ cd typesafe-activator-1.2.10-minimal |
|
53 | 53 |
|
54 | 54 |
### Download Yobi |
55 | 55 |
|
... | ... | @@ -66,19 +66,19 @@ |
66 | 66 |
|
67 | 67 |
**Caution! in case2, You might come across troubles when you try to upgrade Yobi.** |
68 | 68 |
|
69 |
-> You can locate your own Yobi directory in any other place. Please note that you must add playframework home path to $PATH environment in that case. |
|
69 |
+> You can locate your own Yobi directory in any other place. Please note that you must add Play Activator home path to $PATH environment in that case. |
|
70 | 70 |
|
71 | 71 |
### Change directory to cloned Yobi directory (or cd to your unzipped file directory) |
72 | 72 |
|
73 | 73 |
cd yobi |
74 | 74 |
|
75 |
-### Run play framework |
|
75 |
+### Run Play Activator |
|
76 | 76 |
|
77 |
- ../play |
|
77 |
+ ../activator |
|
78 | 78 |
|
79 | 79 |
or (for windows) |
80 | 80 |
|
81 |
- ..\play |
|
81 |
+ ..\activator |
|
82 | 82 |
|
83 | 83 |
Required files will be download automatically. In the first time, it may take about 10 min or more. |
84 | 84 |
|
... | ... | @@ -94,7 +94,7 @@ |
94 | 94 |
Also, you can configure start options. |
95 | 95 |
If your system's memory is over than 4G, we recommend to use follow options. |
96 | 96 |
|
97 |
- _JAVA_OPTIONS="-Xmx2048m -Xms1024m" play "start -DapplyEvolutions.default=true -Dhttp.port=9000" |
|
97 |
+ _JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000" |
|
98 | 98 |
|
99 | 99 |
### Connect with browser |
100 | 100 |
|
... | ... | @@ -102,7 +102,7 @@ |
102 | 102 |
|
103 | 103 |
If you want to change port, check your permission to use 80 port |
104 | 104 |
|
105 |
-See [http://www.playframework.com/documentation/2.1.1/Production](http://www.playframework.com/documentation/2.1.1/Production) |
|
105 |
+See [http://www.playframework.com/documentation/2.3.6/Production](http://www.playframework.com/documentation/2.3.6/Production) |
|
106 | 106 |
|
107 | 107 |
### Upgrade Yobi |
108 | 108 |
|
... | ... | @@ -166,26 +166,25 @@ |
166 | 166 |
|
167 | 167 |
JDK 7(1.7)이어야 합니다. |
168 | 168 |
|
169 |
-### playframework 내려 받기 |
|
169 |
+### Play Activator 내려 받기 |
|
170 | 170 |
|
171 |
- curl -O http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
171 |
+ curl -O http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
172 | 172 |
|
173 | 173 |
혹은 |
174 | 174 |
|
175 |
- wget http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
175 |
+ wget http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
176 | 176 |
|
177 | 177 |
웹 브라우저에서 (이를테면, MS윈도우즈 사용자일 경우) |
178 | 178 |
|
179 |
- http://downloads.typesafe.com/play/2.1.0/play-2.1.0.zip |
|
180 |
- |
|
179 |
+ http://downloads.typesafe.com/typesafe-activator/1.2.10/typesafe-activator-1.2.10-minimal.zip |
|
181 | 180 |
|
182 | 181 |
### 압축풀기 |
183 | 182 |
|
184 |
- unzip play-2.1.0.zip |
|
183 |
+ unzip typesafe-activator-1.2.10-minimal.zip |
|
185 | 184 |
|
186 | 185 |
### 압축을 푼 다음 하위 디렉터리로 이동 |
187 | 186 |
|
188 |
- cd play-2.1.0 |
|
187 |
+ cd typesafe-activator-1.2.10-minimal |
|
189 | 188 |
|
190 | 189 |
### Yobi 소스 내려 받기 |
191 | 190 |
|
... | ... | @@ -199,20 +198,20 @@ |
199 | 198 |
|
200 | 199 |
주의! case2의 경우, 업그레이드를 할 때 문제가 생길 수 있습니다. |
201 | 200 |
|
202 |
-> 임의의 장소에 Yobi 디렉터리를 위치시킬 경우에는 play 실행파일이 있는 playframework 디렉터리를 $PATH 환경변수에 추가해 주세요. |
|
201 |
+> 임의의 장소에 Yobi 디렉터리를 위치시킬 경우에는 activator 실행파일이 있는 Play Activator 디렉터리를 $PATH 환경변수에 추가해 주세요. |
|
203 | 202 |
|
204 | 203 |
### clone 받은 Yobi 디렉터리로 이동 |
205 | 204 |
(혹은 압축을 해제한 디렉터리로 이동) |
206 | 205 |
|
207 | 206 |
cd yobi |
208 | 207 |
|
209 |
-### 상단에 있는 play 실행파일 실행 |
|
208 |
+### 상단에 있는 activator 실행파일 실행 |
|
210 | 209 |
|
211 |
- ../play |
|
210 |
+ ../activator |
|
212 | 211 |
|
213 | 212 |
혹은 (윈도우 사용자일 경우) |
214 | 213 |
|
215 |
- ..\play |
|
214 |
+ ..\activator |
|
216 | 215 |
|
217 | 216 |
실행하면 필요한 파일들을 web에서 내려받습니다. 첫 실행시 네트워크 상황에 따라 10여분 가까이 소요될 수 있습니다. |
218 | 217 |
|
... | ... | @@ -226,7 +225,7 @@ |
226 | 225 |
시작 옵션은 조정가능합니다. 만약 시스템 메모리가 4기가 이상이라면 |
227 | 226 |
아래 옵션으로 실행하는걸 권장합니다. |
228 | 227 |
|
229 |
- _JAVA_OPTIONS="-Xmx2048m -Xms1024m" play "start -DapplyEvolutions.default=true -Dhttp.port=9000" |
|
228 |
+ _JAVA_OPTIONS="-Xmx2048m -Xms1024m" activator "start -DapplyEvolutions.default=true -Dhttp.port=9000" |
|
230 | 229 |
|
231 | 230 |
|
232 | 231 |
### 브라우저로 접속 |
... | ... | @@ -234,7 +233,7 @@ |
234 | 233 |
http://127.0.0.1:9000 |
235 | 234 |
|
236 | 235 |
80 포트 등으로 포트를 변경하고 싶을 경우에는 해당 포트가 사용가능한지 확인 한 다음 80 포트를 사용할 수 있는 계정으로 실행합니다. |
237 |
-관련해서는 [http://www.playframework.com/documentation/2.1.1/Production](http://www.playframework.com/documentation/2.1.1/Production) 부분을 확인해 주세요. |
|
236 |
+관련해서는 [http://www.playframework.com/documentation/2.3.6/Production](http://www.playframework.com/documentation/2.3.6/Production) 부분을 확인해 주세요. |
|
238 | 237 |
|
239 | 238 |
### 업그레이드 하기 |
240 | 239 |
|
--- app/Global.java
+++ app/Global.java
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 |
import play.data.Form; |
44 | 44 |
import play.mvc.*; |
45 | 45 |
import play.mvc.Http.RequestHeader; |
46 |
-import play.mvc.SimpleResult; |
|
46 |
+import play.mvc.Result; |
|
47 | 47 |
import play.libs.F.Promise; |
48 | 48 |
|
49 | 49 |
import utils.AccessControl; |
... | ... | @@ -104,12 +104,12 @@ |
104 | 104 |
private Action<Void> getDefaultAction(final Http.Request request) { |
105 | 105 |
final long start = System.currentTimeMillis(); |
106 | 106 |
return new Action.Simple() { |
107 |
- public Promise<SimpleResult> call(Http.Context ctx) throws Throwable { |
|
107 |
+ public Promise<Result> call(Http.Context ctx) throws Throwable { |
|
108 | 108 |
UserApp.initTokenUser(); |
109 | 109 |
UserApp.updatePreferredLanguage(); |
110 | 110 |
ctx.response().setHeader("Date", DateUtils.formatDate(new Date())); |
111 | 111 |
ctx.response().setHeader("Cache-Control", "no-cache"); |
112 |
- Promise<SimpleResult> promise = delegate.call(ctx); |
|
112 |
+ Promise<Result> promise = delegate.call(ctx); |
|
113 | 113 |
AccessLogger.log(request, promise, start); |
114 | 114 |
return promise; |
115 | 115 |
} |
... | ... | @@ -119,8 +119,8 @@ |
119 | 119 |
private Action<Void> getRestartAction() { |
120 | 120 |
return new Action.Simple() { |
121 | 121 |
@Override |
122 |
- public Promise<SimpleResult> call(Http.Context ctx) throws Throwable { |
|
123 |
- return Promise.pure((SimpleResult) ok(restart.render())); |
|
122 |
+ public Promise<Result> call(Http.Context ctx) throws Throwable { |
|
123 |
+ return Promise.pure((Result) ok(restart.render())); |
|
124 | 124 |
} |
125 | 125 |
}; |
126 | 126 |
} |
... | ... | @@ -128,20 +128,20 @@ |
128 | 128 |
private Action<Void> getConfigSecretAction() { |
129 | 129 |
return new Action.Simple() { |
130 | 130 |
@Override |
131 |
- public Promise<SimpleResult> call(Http.Context ctx) throws Throwable { |
|
131 |
+ public Promise<Result> call(Http.Context ctx) throws Throwable { |
|
132 | 132 |
if( ctx.request().method().toLowerCase().equals("post") ) { |
133 | 133 |
Form<User> newSiteAdminUserForm = form(User.class).bindFromRequest(); |
134 | 134 |
|
135 | 135 |
if (hasError(newSiteAdminUserForm)) { |
136 |
- return Promise.pure((SimpleResult) badRequest(secret.render(SiteAdmin.SITEADMIN_DEFAULT_LOGINID, newSiteAdminUserForm))); |
|
136 |
+ return Promise.pure((Result) badRequest(secret.render(SiteAdmin.SITEADMIN_DEFAULT_LOGINID, newSiteAdminUserForm))); |
|
137 | 137 |
} |
138 | 138 |
|
139 | 139 |
User siteAdmin = SiteAdmin.updateDefaultSiteAdmin(newSiteAdminUserForm.get()); |
140 | 140 |
replaceSiteSecretKey(createSeed(siteAdmin.password)); |
141 | 141 |
isRestartRequired = true; |
142 |
- return Promise.pure((SimpleResult) ok(restart.render())); |
|
142 |
+ return Promise.pure((Result) ok(restart.render())); |
|
143 | 143 |
} else { |
144 |
- return Promise.pure((SimpleResult) ok(secret.render(SiteAdmin.SITEADMIN_DEFAULT_LOGINID, new Form<>(User.class)))); |
|
144 |
+ return Promise.pure((Result) ok(secret.render(SiteAdmin.SITEADMIN_DEFAULT_LOGINID, new Form<>(User.class)))); |
|
145 | 145 |
} |
146 | 146 |
} |
147 | 147 |
|
... | ... | @@ -211,26 +211,26 @@ |
211 | 211 |
} |
212 | 212 |
|
213 | 213 |
@Override |
214 |
- public Promise<SimpleResult> onHandlerNotFound(RequestHeader request) { |
|
214 |
+ public Promise<Result> onHandlerNotFound(RequestHeader request) { |
|
215 | 215 |
AccessLogger.log(request, null, Http.Status.NOT_FOUND); |
216 |
- return Promise.pure((SimpleResult) Results.notFound(ErrorViews.NotFound.render())); |
|
216 |
+ return Promise.pure((Result) Results.notFound(ErrorViews.NotFound.render())); |
|
217 | 217 |
} |
218 | 218 |
|
219 | 219 |
@Override |
220 |
- public Promise<SimpleResult> onError(RequestHeader request, Throwable t) { |
|
220 |
+ public Promise<Result> onError(RequestHeader request, Throwable t) { |
|
221 | 221 |
AccessLogger.log(request, null, Http.Status.INTERNAL_SERVER_ERROR); |
222 | 222 |
|
223 | 223 |
if (Play.isProd()) { |
224 |
- return Promise.pure((SimpleResult) Results.internalServerError(views.html.error.internalServerError_default.render("error.internalServerError"))); |
|
224 |
+ return Promise.pure((Result) Results.internalServerError(views.html.error.internalServerError_default.render("error.internalServerError"))); |
|
225 | 225 |
} else { |
226 | 226 |
return super.onError(request, t); |
227 | 227 |
} |
228 | 228 |
} |
229 | 229 |
|
230 | 230 |
@Override |
231 |
- public Promise<SimpleResult> onBadRequest(RequestHeader request, String error) { |
|
231 |
+ public Promise<Result> onBadRequest(RequestHeader request, String error) { |
|
232 | 232 |
AccessLogger.log(request, null, Http.Status.BAD_REQUEST); |
233 |
- return Promise.pure((SimpleResult) badRequest(ErrorViews.BadRequest.render())); |
|
233 |
+ return Promise.pure((Result) badRequest(ErrorViews.BadRequest.render())); |
|
234 | 234 |
} |
235 | 235 |
|
236 | 236 |
} |
--- app/actions/AbstractProjectCheckAction.java
+++ app/actions/AbstractProjectCheckAction.java
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 |
import play.mvc.Action; |
30 | 30 |
import play.mvc.Http.Context; |
31 | 31 |
import play.mvc.Result; |
32 |
-import play.mvc.SimpleResult; |
|
32 |
+import play.mvc.Result; |
|
33 | 33 |
import play.libs.F.Promise; |
34 | 34 |
import utils.AccessControl; |
35 | 35 |
import utils.AccessLogger; |
... | ... | @@ -48,21 +48,21 @@ |
48 | 48 |
*/ |
49 | 49 |
public abstract class AbstractProjectCheckAction<T> extends Action<T> { |
50 | 50 |
@Override |
51 |
- public final Promise<SimpleResult> call(Context context) throws Throwable { |
|
51 |
+ public final Promise<Result> call(Context context) throws Throwable { |
|
52 | 52 |
PathParser parser = new PathParser(context); |
53 | 53 |
String ownerLoginId = parser.getOwnerLoginId(); |
54 | 54 |
String projectName = parser.getProjectName(); |
55 | 55 |
|
56 | 56 |
Project project = Project.findByOwnerAndProjectName(ownerLoginId, projectName); |
57 | 57 |
|
58 |
- Promise<SimpleResult> promise; |
|
58 |
+ Promise<Result> promise; |
|
59 | 59 |
|
60 | 60 |
if (project == null) { |
61 | 61 |
if (UserApp.currentUser() == User.anonymous){ |
62 | 62 |
flash("failed", Messages.get("error.auth.unauthorized.waringMessage")); |
63 |
- promise = Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
63 |
+ promise = Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
64 | 64 |
} else { |
65 |
- promise = Promise.pure((SimpleResult) forbidden(ErrorViews.NotFound.render("error.forbidden.or.notfound"))); |
|
65 |
+ promise = Promise.pure((Result) forbidden(ErrorViews.NotFound.render("error.forbidden.or.notfound"))); |
|
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
AccessLogger.log(context.request(), promise, null); |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 |
|
73 | 73 |
if (!AccessControl.isAllowed(UserApp.currentUser(), project.asResource(), Operation.READ)) { |
74 | 74 |
flash("failed", Messages.get("error.auth.unauthorized.waringMessage")); |
75 |
- promise = Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
75 |
+ promise = Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
76 | 76 |
AccessLogger.log(context.request(), promise, null); |
77 | 77 |
return promise; |
78 | 78 |
} |
... | ... | @@ -80,6 +80,6 @@ |
80 | 80 |
return call(project, context, parser); |
81 | 81 |
} |
82 | 82 |
|
83 |
- protected abstract Promise<SimpleResult> call(Project project, Context context, PathParser parser) |
|
83 |
+ protected abstract Promise<Result> call(Project project, Context context, PathParser parser) |
|
84 | 84 |
throws Throwable; |
85 | 85 |
} |
--- app/actions/AnonymousCheckAction.java
+++ app/actions/AnonymousCheckAction.java
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 |
import play.mvc.Action; |
27 | 27 |
import play.mvc.Http.Context; |
28 | 28 |
import play.mvc.Result; |
29 |
-import play.mvc.SimpleResult; |
|
29 |
+import play.mvc.Result; |
|
30 | 30 |
import play.libs.F.Promise; |
31 | 31 |
import utils.AccessControl; |
32 | 32 |
import utils.AccessLogger; |
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 |
public class AnonymousCheckAction extends Action<AnonymousCheck> { |
43 | 43 |
|
44 | 44 |
@Override |
45 |
- public Promise<SimpleResult> call(Context context) throws Throwable { |
|
45 |
+ public Promise<Result> call(Context context) throws Throwable { |
|
46 | 46 |
if ((AccessControl.isAnonymousNotAllowed() || configuration.requiresLogin()) && |
47 | 47 |
UserApp.currentUser().isAnonymous()) { |
48 | 48 |
if (configuration.displaysFlashMessage()) { |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 |
} |
51 | 51 |
String loginFormUrl = routes.UserApp.loginForm().url(); |
52 | 52 |
loginFormUrl += "?redirectUrl=" + context.request().path(); |
53 |
- Promise<SimpleResult> promise = Promise.pure(redirect(loginFormUrl)); |
|
53 |
+ Promise<Result> promise = Promise.pure(redirect(loginFormUrl)); |
|
54 | 54 |
AccessLogger.log(context.request(), promise, null); |
55 | 55 |
return promise; |
56 | 56 |
} |
--- app/actions/DefaultProjectCheckAction.java
+++ app/actions/DefaultProjectCheckAction.java
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
import models.Project; |
25 | 25 |
import play.mvc.Http.Context; |
26 | 26 |
import play.mvc.Result; |
27 |
-import play.mvc.SimpleResult; |
|
27 |
+import play.mvc.Result; |
|
28 | 28 |
import play.libs.F.Promise; |
29 | 29 |
|
30 | 30 |
/** |
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 |
*/ |
37 | 37 |
public class DefaultProjectCheckAction extends AbstractProjectCheckAction<Void> { |
38 | 38 |
@Override |
39 |
- protected Promise<SimpleResult> call(Project project, Context context, PathParser parser) throws Throwable { |
|
39 |
+ protected Promise<Result> call(Project project, Context context, PathParser parser) throws Throwable { |
|
40 | 40 |
return this.delegate.call(context); |
41 | 41 |
} |
42 | 42 |
} |
--- app/actions/IsAllowedAction.java
+++ app/actions/IsAllowedAction.java
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 |
import models.resource.ResourceConvertible; |
31 | 31 |
import play.mvc.Http.Context; |
32 | 32 |
import play.mvc.Result; |
33 |
-import play.mvc.SimpleResult; |
|
33 |
+import play.mvc.Result; |
|
34 | 34 |
import play.libs.F.Promise; |
35 | 35 |
import utils.AccessControl; |
36 | 36 |
import utils.AccessLogger; |
... | ... | @@ -49,19 +49,19 @@ |
49 | 49 |
*/ |
50 | 50 |
public class IsAllowedAction extends AbstractProjectCheckAction<IsAllowed> { |
51 | 51 |
@Override |
52 |
- protected Promise<SimpleResult> call(Project project, Context context, PathParser parser) throws Throwable { |
|
52 |
+ protected Promise<Result> call(Project project, Context context, PathParser parser) throws Throwable { |
|
53 | 53 |
ResourceType resourceType = this.configuration.resourceType(); |
54 | 54 |
ResourceConvertible resourceObject = Resource.getResourceObject(parser, project, resourceType); |
55 | 55 |
Operation operation = this.configuration.value(); |
56 | 56 |
|
57 | 57 |
if(resourceObject == null) { |
58 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) notFound(ErrorViews.NotFound.render("error.notfound", project, resourceType.resource()))); |
|
58 |
+ Promise<Result> promise = Promise.pure((Result) notFound(ErrorViews.NotFound.render("error.notfound", project, resourceType.resource()))); |
|
59 | 59 |
AccessLogger.log(context.request(), promise, null); |
60 | 60 |
return promise; |
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
if(!AccessControl.isAllowed(UserApp.currentUser(), resourceObject.asResource(), operation)) { |
64 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.forbidden", project))); |
|
64 |
+ Promise<Result> promise = Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.forbidden", project))); |
|
65 | 65 |
AccessLogger.log(context.request(), promise, null); |
66 | 66 |
return promise; |
67 | 67 |
} |
--- app/actions/IsCreatableAction.java
+++ app/actions/IsCreatableAction.java
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
import models.User; |
25 | 25 |
import play.mvc.Http.Context; |
26 | 26 |
import play.mvc.Result; |
27 |
-import play.mvc.SimpleResult; |
|
27 |
+import play.mvc.Result; |
|
28 | 28 |
import play.libs.F.Promise; |
29 | 29 |
import utils.AccessControl; |
30 | 30 |
import utils.AccessLogger; |
... | ... | @@ -43,10 +43,10 @@ |
43 | 43 |
*/ |
44 | 44 |
public class IsCreatableAction extends AbstractProjectCheckAction<IsCreatable> { |
45 | 45 |
@Override |
46 |
- protected Promise<SimpleResult> call(Project project, Context context, PathParser parser) throws Throwable { |
|
46 |
+ protected Promise<Result> call(Project project, Context context, PathParser parser) throws Throwable { |
|
47 | 47 |
User currentUser = UserApp.currentUser(); |
48 | 48 |
if (!AccessControl.isProjectResourceCreatable(currentUser, project, this.configuration.value())) { |
49 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.forbidden", project))); |
|
49 |
+ Promise<Result> promise = Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.forbidden", project))); |
|
50 | 50 |
AccessLogger.log(context.request(), promise, null); |
51 | 51 |
return promise; |
52 | 52 |
} |
--- app/actions/IsOnlyGitAvailableAction.java
+++ app/actions/IsOnlyGitAvailableAction.java
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
import models.Project; |
26 | 26 |
import play.mvc.Http.Context; |
27 | 27 |
import play.mvc.Result; |
28 |
-import play.mvc.SimpleResult; |
|
28 |
+import play.mvc.Result; |
|
29 | 29 |
import play.libs.F.Promise; |
30 | 30 |
import utils.AccessLogger; |
31 | 31 |
import utils.ErrorViews; |
... | ... | @@ -40,9 +40,9 @@ |
40 | 40 |
*/ |
41 | 41 |
public class IsOnlyGitAvailableAction extends AbstractProjectCheckAction<IsOnlyGitAvailable> { |
42 | 42 |
@Override |
43 |
- protected Promise<SimpleResult> call(Project project, Context context, PathParser parser) throws Throwable { |
|
43 |
+ protected Promise<Result> call(Project project, Context context, PathParser parser) throws Throwable { |
|
44 | 44 |
if(!project.isGit()) { |
45 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) badRequest(ErrorViews.BadRequest.render("error.badrequest.only.available.for.git"))); |
|
45 |
+ Promise<Result> promise = Promise.pure((Result) badRequest(ErrorViews.BadRequest.render("error.badrequest.only.available.for.git"))); |
|
46 | 46 |
AccessLogger.log(context.request(), promise, null); |
47 | 47 |
return promise; |
48 | 48 |
} |
--- app/actions/NullProjectCheckAction.java
+++ app/actions/NullProjectCheckAction.java
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 |
import play.mvc.Action; |
29 | 29 |
import play.mvc.Http; |
30 | 30 |
import play.mvc.Result; |
31 |
-import play.mvc.SimpleResult; |
|
31 |
+import play.mvc.Result; |
|
32 | 32 |
import play.libs.F.Promise; |
33 | 33 |
import utils.AccessLogger; |
34 | 34 |
import utils.ErrorViews; |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 |
public class NullProjectCheckAction extends Action<Void> { |
46 | 46 |
|
47 | 47 |
@Override |
48 |
- public Promise<SimpleResult> call(Http.Context context) throws Throwable { |
|
48 |
+ public Promise<Result> call(Http.Context context) throws Throwable { |
|
49 | 49 |
PathParser parser = new PathParser(context); |
50 | 50 |
String ownerLoginId = parser.getOwnerLoginId(); |
51 | 51 |
String projectName = parser.getProjectName(); |
... | ... | @@ -53,13 +53,13 @@ |
53 | 53 |
Project project = Project.findByOwnerAndProjectName(ownerLoginId, projectName); |
54 | 54 |
|
55 | 55 |
if (project == null) { |
56 |
- Promise<SimpleResult> promise; |
|
56 |
+ Promise<Result> promise; |
|
57 | 57 |
|
58 | 58 |
if (UserApp.currentUser() == User.anonymous){ |
59 | 59 |
flash("failed", Messages.get("error.auth.unauthorized.waringMessage")); |
60 |
- promise = Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
60 |
+ promise = Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.forbidden.or.notfound", context.request().path()))); |
|
61 | 61 |
} else { |
62 |
- promise = Promise.pure((SimpleResult) forbidden(ErrorViews.NotFound.render("error.forbidden.or.notfound"))); |
|
62 |
+ promise = Promise.pure((Result) forbidden(ErrorViews.NotFound.render("error.forbidden.or.notfound"))); |
|
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
AccessLogger.log(context.request(), promise, null); |
--- app/controllers/IssueApp.java
+++ app/controllers/IssueApp.java
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
import org.apache.commons.lang3.StringUtils; |
35 | 35 |
import org.apache.tika.Tika; |
36 | 36 |
import com.fasterxml.jackson.databind.node.ObjectNode; |
37 |
-import play.api.templates.Html; |
|
37 |
+import play.twirl.api.Html; |
|
38 | 38 |
import play.data.Form; |
39 | 39 |
import play.data.validation.ValidationError; |
40 | 40 |
import play.db.ebean.Transactional; |
--- app/controllers/PullRequestApp.java
+++ app/controllers/PullRequestApp.java
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
import play.libs.Json; |
48 | 48 |
import play.mvc.Controller; |
49 | 49 |
import play.mvc.Result; |
50 |
-import play.mvc.SimpleResult; |
|
50 |
+import play.mvc.Result; |
|
51 | 51 |
import playRepository.GitBranch; |
52 | 52 |
import playRepository.GitRepository; |
53 | 53 |
import playRepository.RepositoryService; |
--- app/models/Attachment.java
+++ app/models/Attachment.java
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 |
import play.db.ebean.Model; |
55 | 55 |
import play.libs.Akka; |
56 | 56 |
import scala.concurrent.duration.Duration; |
57 |
-import scalax.file.NotDirectoryException; |
|
57 |
+import java.nio.file.NotDirectoryException; |
|
58 | 58 |
import utils.FileUtil; |
59 | 59 |
import utils.JodaDateUtil; |
60 | 60 |
|
--- app/utils/AccessLogger.java
+++ app/utils/AccessLogger.java
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
import play.libs.F.Callback; |
26 | 26 |
import play.libs.F.Promise; |
27 | 27 |
import play.mvc.Http; |
28 |
-import play.mvc.SimpleResult; |
|
28 |
+import play.mvc.Result; |
|
29 | 29 |
|
30 | 30 |
import java.text.SimpleDateFormat; |
31 | 31 |
import java.util.Date; |
... | ... | @@ -86,13 +86,13 @@ |
86 | 86 |
* @see <a href="http://httpd.apache.org/docs/2.2/en/logs.html#combined">Combined Log Format - Apache HTTP Server</a> |
87 | 87 |
* @see <a href="http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats">Custom Log Formats - Apache HTTP Server</a> |
88 | 88 |
*/ |
89 |
- public static void log(final Http.Request request, final Promise<SimpleResult> promise, |
|
89 |
+ public static void log(final Http.Request request, final Promise<Result> promise, |
|
90 | 90 |
final Long startTimeMillis) { |
91 | 91 |
final String username = UserApp.currentUser().loginId; |
92 |
- promise.onRedeem(new Callback<SimpleResult>() { |
|
92 |
+ promise.onRedeem(new Callback<Result>() { |
|
93 | 93 |
@Override |
94 |
- public void invoke(final SimpleResult result) throws Throwable { |
|
95 |
- log(request, username, result.getWrappedSimpleResult().header().status(), |
|
94 |
+ public void invoke(final Result result) throws Throwable { |
|
95 |
+ log(request, username, result.toScala().header().status(), |
|
96 | 96 |
startTimeMillis); |
97 | 97 |
} |
98 | 98 |
}); |
--- app/utils/BasicAuthAction.java
+++ app/utils/BasicAuthAction.java
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 |
import play.mvc.Http.Request; |
30 | 30 |
import play.mvc.Http.Response; |
31 | 31 |
import play.mvc.Result; |
32 |
-import play.mvc.SimpleResult; |
|
32 |
+import play.mvc.Result; |
|
33 | 33 |
import play.libs.F.Promise; |
34 | 34 |
|
35 | 35 |
import java.io.UnsupportedEncodingException; |
... | ... | @@ -98,16 +98,16 @@ |
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
@Override |
101 |
- public Promise<SimpleResult> call(Context context) throws Throwable { |
|
101 |
+ public Promise<Result> call(Context context) throws Throwable { |
|
102 | 102 |
User user; |
103 | 103 |
try { |
104 | 104 |
user = authenticate(context.request()); |
105 | 105 |
} catch (MalformedCredentialsException error) { |
106 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) badRequest()); |
|
106 |
+ Promise<Result> promise = Promise.pure((Result) badRequest()); |
|
107 | 107 |
AccessLogger.log(context.request(), promise, null); |
108 | 108 |
return promise; |
109 | 109 |
} catch (UnsupportedEncodingException e) { |
110 |
- Promise<SimpleResult> promise = Promise.pure((SimpleResult) internalServerError()); |
|
110 |
+ Promise<Result> promise = Promise.pure((Result) internalServerError()); |
|
111 | 111 |
AccessLogger.log(context.request(), promise, null); |
112 | 112 |
return promise; |
113 | 113 |
} |
--- app/utils/ErrorViews.java
+++ app/utils/ErrorViews.java
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 |
import models.Organization; |
24 | 24 |
import models.Project; |
25 | 25 |
import models.User; |
26 |
-import play.api.templates.Html; |
|
26 |
+import play.twirl.api.Html; |
|
27 | 27 |
import views.html.index.index; |
28 | 28 |
|
29 | 29 |
|
--- app/utils/PlayServletContext.java
+++ app/utils/PlayServletContext.java
... | ... | @@ -302,4 +302,7 @@ |
302 | 302 |
throw new UnsupportedOperationException(); |
303 | 303 |
} |
304 | 304 |
|
305 |
+ public String getVirtualServerName() { |
|
306 |
+ throw new UnsupportedOperationException(); |
|
307 |
+ } |
|
305 | 308 |
} |
--- app/utils/PlayServletRequest.java
+++ app/utils/PlayServletRequest.java
... | ... | @@ -115,6 +115,16 @@ |
115 | 115 |
return Integer.parseInt(contentLength); |
116 | 116 |
} |
117 | 117 |
|
118 |
+ public long getContentLengthLong() { |
|
119 |
+ String contentLength = request.getHeader(Http.HeaderNames.CONTENT_LENGTH); |
|
120 |
+ |
|
121 |
+ if (contentLength == null) { |
|
122 |
+ return -1; |
|
123 |
+ } |
|
124 |
+ |
|
125 |
+ return Long.parseLong(contentLength); |
|
126 |
+ } |
|
127 |
+ |
|
118 | 128 |
@Override |
119 | 129 |
public String getContentType() { |
120 | 130 |
return request.getHeader(Http.HeaderNames.CONTENT_TYPE); |
... | ... | @@ -172,6 +182,18 @@ |
172 | 182 |
protected void finalize() throws Throwable { |
173 | 183 |
close(); |
174 | 184 |
super.finalize(); |
185 |
+ } |
|
186 |
+ |
|
187 |
+ public void setReadListener(javax.servlet.ReadListener readListener) { |
|
188 |
+ throw new UnsupportedOperationException(); |
|
189 |
+ } |
|
190 |
+ |
|
191 |
+ public boolean isReady() { |
|
192 |
+ throw new UnsupportedOperationException(); |
|
193 |
+ } |
|
194 |
+ |
|
195 |
+ public boolean isFinished() { |
|
196 |
+ throw new UnsupportedOperationException(); |
|
175 | 197 |
} |
176 | 198 |
}; |
177 | 199 |
} |
... | ... | @@ -556,4 +578,14 @@ |
556 | 578 |
throw new UnsupportedOperationException(); |
557 | 579 |
} |
558 | 580 |
|
581 |
+ public <T extends javax.servlet.http.HttpUpgradeHandler> T upgrade(java.lang.Class<T> httpUpgradeHandlerClass) |
|
582 |
+ throws java.io.IOException, |
|
583 |
+ ServletException { |
|
584 |
+ throw new UnsupportedOperationException(); |
|
585 |
+ } |
|
586 |
+ |
|
587 |
+ public String changeSessionId() { |
|
588 |
+ throw new UnsupportedOperationException(); |
|
589 |
+ } |
|
590 |
+ |
|
559 | 591 |
} |
--- app/utils/PlayServletResponse.java
+++ app/utils/PlayServletResponse.java
... | ... | @@ -101,6 +101,14 @@ |
101 | 101 |
target.close(); |
102 | 102 |
super.close(); |
103 | 103 |
} |
104 |
+ |
|
105 |
+ public void setWriteListener(WriteListener writeListener) { |
|
106 |
+ throw new UnsupportedOperationException(); |
|
107 |
+ } |
|
108 |
+ |
|
109 |
+ public boolean isReady() { |
|
110 |
+ throw new UnsupportedOperationException(); |
|
111 |
+ } |
|
104 | 112 |
} |
105 | 113 |
|
106 | 114 |
public PlayServletResponse(Response response) throws IOException { |
... | ... | @@ -189,6 +197,10 @@ |
189 | 197 |
@Override |
190 | 198 |
public void setContentLength(int length) { |
191 | 199 |
this.response.setHeader(Http.HeaderNames.CONTENT_LENGTH, Integer.toString(length)); |
200 |
+ } |
|
201 |
+ |
|
202 |
+ public void setContentLengthLong(long length) { |
|
203 |
+ this.response.setHeader(Http.HeaderNames.CONTENT_LENGTH, Long.toString(length)); |
|
192 | 204 |
} |
193 | 205 |
|
194 | 206 |
@Override |
... | ... | @@ -380,4 +392,8 @@ |
380 | 392 |
} |
381 | 393 |
return (encoding.trim()); |
382 | 394 |
} |
395 |
+ |
|
396 |
+ public String getVirtualServerName() { |
|
397 |
+ throw new UnsupportedOperationException(); |
|
398 |
+ } |
|
383 | 399 |
} |
--- app/utils/SiteManagerAuthAction.java
+++ app/utils/SiteManagerAuthAction.java
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
import play.mvc.Action; |
25 | 25 |
import play.mvc.Http.Context; |
26 | 26 |
import play.mvc.Result; |
27 |
-import play.mvc.SimpleResult; |
|
27 |
+import play.mvc.Result; |
|
28 | 28 |
import play.libs.F.Promise; |
29 | 29 |
|
30 | 30 |
/** |
... | ... | @@ -32,9 +32,9 @@ |
32 | 32 |
*/ |
33 | 33 |
public class SiteManagerAuthAction extends Action.Simple { |
34 | 34 |
@Override |
35 |
- public Promise<SimpleResult> call(Context context) throws Throwable { |
|
35 |
+ public Promise<Result> call(Context context) throws Throwable { |
|
36 | 36 |
if (!UserApp.currentUser().isSiteManager()) { |
37 |
- return Promise.pure((SimpleResult) forbidden(ErrorViews.Forbidden.render("error.auth.unauthorized.waringMessage"))); |
|
37 |
+ return Promise.pure((Result) forbidden(ErrorViews.Forbidden.render("error.auth.unauthorized.waringMessage"))); |
|
38 | 38 |
} |
39 | 39 |
return delegate.call(context); |
40 | 40 |
} |
--- app/utils/TemplateHelper.scala
+++ app/utils/TemplateHelper.scala
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
import play.api.i18n.Lang |
26 | 26 |
import models.CodeCommentThread |
27 | 27 |
import models.CommentThread |
28 |
-import play.api.templates.Html |
|
28 |
+import play.twirl.api.Html |
|
29 | 29 |
|
30 | 30 |
object TemplateHelper { |
31 | 31 |
|
... | ... | @@ -364,12 +364,12 @@ |
364 | 364 |
def shortId(commitId: String) = commitId.substring(0, Math.min(7, commitId.size)) |
365 | 365 |
|
366 | 366 |
@tailrec |
367 |
- def renderNonRangedThreads(threads: List[models.CommentThread], commitId: String, html: play.api.templates.Html): play.api.templates.Html = |
|
367 |
+ def renderNonRangedThreads(threads: List[models.CommentThread], commitId: String, html: play.twirl.api.Html): play.twirl.api.Html = |
|
368 | 368 |
threads match { |
369 | 369 |
case head :: tail => |
370 | 370 |
head match { |
371 | 371 |
case (thread: models.NonRangedCodeCommentThread) |
372 |
- if commitId == null || commitId == thread.commitId => html += partial_comment_thread(thread) |
|
372 |
+ if commitId == null || commitId == thread.commitId => new Html(List(html, partial_comment_thread(thread))) |
|
373 | 373 |
case _ => ; |
374 | 374 |
} |
375 | 375 |
renderNonRangedThreads(tail, commitId, html) |
... | ... | @@ -378,16 +378,16 @@ |
378 | 378 |
|
379 | 379 |
@tailrec |
380 | 380 |
def _renderEventsOnPullRequest(pull: PullRequest, events: List[PullRequestEvent], |
381 |
- html: play.api.templates.Html): play.api.templates.Html = |
|
381 |
+ html: play.twirl.api.Html): play.twirl.api.Html = |
|
382 | 382 |
events match { |
383 | 383 |
case head :: tail => |
384 |
- html += partial_pull_request_event(pull, head) |
|
384 |
+ new Html(List(html, partial_pull_request_event(pull, head))) |
|
385 | 385 |
_renderEventsOnPullRequest(pull, tail, html) |
386 | 386 |
case _ => html |
387 | 387 |
} |
388 | 388 |
|
389 | 389 |
def renderEventsOnPullRequest(pull: PullRequest) = |
390 |
- _renderEventsOnPullRequest(pull, pull.pullRequestEvents.toList, play.api.templates.Html("")) |
|
390 |
+ _renderEventsOnPullRequest(pull, pull.pullRequestEvents.toList, play.twirl.api.Html("")) |
|
391 | 391 |
|
392 | 392 |
def urlToCommentThread(thread: CommentThread) = { |
393 | 393 |
urlToContainer(thread) + "#thread-" + thread.id |
--- app/views/board/create.scala.html
+++ app/views/board/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form:Form[Posting], project:Project, isAllowedToNotice:Boolean, preparedPostBody:String = "") |
|
21 |
+@(title:String, form: play.data.Form[Posting], project:Project, isAllowedToNotice:Boolean, preparedPostBody:String = "") |
|
22 | 22 |
|
23 | 23 |
@import utils.AccessControl._ |
24 | 24 |
@import utils.TemplateHelper._ |
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
28 | 28 |
|
29 | 29 |
@readmeUpdateMessage = @{ |
30 |
- if( request().getQueryString("readme") != null ) { |
|
30 |
+ if( requestHeader.getQueryString("readme") != null ) { |
|
31 | 31 |
"Update README.md" |
32 | 32 |
} |
33 | 33 |
} |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 |
@** end of fileUploader **@ |
67 | 67 |
|
68 | 68 |
<div class="right-txt mt10 mb10"> |
69 |
- @if(isAllowedToNotice && !stringToBoolean(request().getQueryString("readme"))){ |
|
69 |
+ @if(isAllowedToNotice && !stringToBoolean(requestHeader.getQueryString("readme").get)){ |
|
70 | 70 |
<label class="checkbox"> |
71 | 71 |
<input type="checkbox" id="notice" name="notice"> |
72 | 72 |
@Messages("post.notice.label") |
... | ... | @@ -74,9 +74,9 @@ |
74 | 74 |
} |
75 | 75 |
|
76 | 76 |
@if(isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){ |
77 |
- @if(project.isGit && stringToBoolean(request().getQueryString("readme"))){ |
|
77 |
+ @if(project.isGit && stringToBoolean(requestHeader.getQueryString("readme").get)){ |
|
78 | 78 |
<label class="checkbox"> |
79 |
- <input type="checkbox" id="readme" name="readme" @boolToCheckedString(request().getQueryString("readme"))> |
|
79 |
+ <input type="checkbox" id="readme" name="readme" @boolToCheckedString(requestHeader.getQueryString("readme"))> |
|
80 | 80 |
@Messages("post.readmefy") |
81 | 81 |
</label> |
82 | 82 |
} |
--- app/views/board/edit.scala.html
+++ app/views/board/edit.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form:Form[Posting], posting:Posting, number:Long, project:Project, isAllowedToNotice:Boolean) |
|
21 |
+@(title:String, form: play.data.Form[Posting], posting:Posting, number:Long, project:Project, isAllowedToNotice:Boolean) |
|
22 | 22 |
|
23 | 23 |
@import utils.AccessControl._ |
24 | 24 |
@import utils.TemplateHelper._ |
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 |
@** end of fileUploader **@ |
61 | 61 |
|
62 | 62 |
<div class="right-txt mt10 mb10"> |
63 |
- @if(isAllowedToNotice && !stringToBoolean(request().getQueryString("readme"))){ |
|
63 |
+ @if(isAllowedToNotice && !stringToBoolean(requestHeader.getQueryString("readme").get)){ |
|
64 | 64 |
@helper.input(form("notice")){(id, name, value, args) => |
65 | 65 |
<label class="checkbox"> |
66 | 66 |
<input type="checkbox" id="notice" name="notice" @toHtmlArgs(args) @(if(value.equals(Some("true"))) "checked" else "")/> |
--- app/views/board/view.scala.html
+++ app/views/board/view.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(post:Posting, commentForm:Form[PostingComment], project:Project) |
|
21 |
+@(post:Posting, commentForm: play.data.Form[PostingComment], project:Project) |
|
22 | 22 |
|
23 | 23 |
@import utils.JodaDateUtil |
24 | 24 |
@import utils.TemplateHelper._ |
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 |
@import utils.Markdown |
29 | 29 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
30 | 30 |
|
31 |
-@urlToPostings = @{ urlToList(request.getHeader("Referer"), routes.BoardApp.posts(project.owner, project.name).toString()) } |
|
31 |
+@urlToPostings = @{ urlToList(requestHeader.headers.get("Referer").get, routes.BoardApp.posts(project.owner, project.name).toString()) } |
|
32 | 32 |
|
33 | 33 |
@projectLayout(post.title, project, utils.MenuType.BOARD){ |
34 | 34 |
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only") |
--- app/views/code/branches.scala.html
+++ app/views/code/branches.scala.html
... | ... | @@ -57,7 +57,7 @@ |
57 | 57 |
<tbody> |
58 | 58 |
@partial_branchrow(project, head, true) |
59 | 59 |
|
60 |
- @for(branch <- branches.iterator()) { |
|
60 |
+ @for(branch <- branches.iterator) { |
|
61 | 61 |
@partial_branchrow(project, branch, false) |
62 | 62 |
} |
63 | 63 |
</tbody> |
--- app/views/code/diff.scala.html
+++ app/views/code/diff.scala.html
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 |
<p class="content">@thread.getFirstReviewComment().getContents()</p> |
152 | 152 |
<span class="date" title="@utils.JodaDateUtil.getDateString(thread.createdDate)"> |
153 | 153 |
<span class="comments"> |
154 |
- @if( thread.hasChildComments ){<i class="yobicon-comments"></i> @thread.reviewComments.size()} |
|
154 |
+ @if( thread.hasChildComments ){<i class="yobicon-comments"></i> @thread.reviewComments.size} |
|
155 | 155 |
</span> |
156 | 156 |
<span class="avatar-wrap smaller margin-right-5"> |
157 | 157 |
<img src="@User.findByLoginId(thread.author.loginId).avatarUrl" alt="@thread.author.name" /> |
... | ... | @@ -170,7 +170,7 @@ |
170 | 170 |
<p class="content">@thread.getFirstReviewComment().getContents()</p> |
171 | 171 |
<span class="date" title="@utils.JodaDateUtil.getDateString(thread.createdDate)"> |
172 | 172 |
<span class="comments"> |
173 |
- @if( thread.hasChildComments ){<i class="yobicon-comments"></i> @thread.reviewComments.size()} |
|
173 |
+ @if( thread.hasChildComments ){<i class="yobicon-comments"></i> @thread.reviewComments.size} |
|
174 | 174 |
</span> |
175 | 175 |
<span class="avatar-wrap smaller margin-right-5"> |
176 | 176 |
<img src="@User.findByLoginId(thread.author.loginId).avatarUrl" alt="@thread.author.name" /> |
--- app/views/code/history.scala.html
+++ app/views/code/history.scala.html
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
@isHistoryExistAndHasParent(history: List[playRepository.Commit]) = @{ |
80 |
- (history.size() > 0 && history.get(history.size() - 1).getParentCount() > 0) |
|
80 |
+ (history.size > 0 && history.get(history.size - 1).getParentCount() > 0) |
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
@projectLayout(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
... | ... | @@ -137,7 +137,7 @@ |
137 | 137 |
@if(history.isEmpty()){ |
138 | 138 |
<tr><td colspan="5" class="warning-none">@Messages("code.nocommits")</td></tr> |
139 | 139 |
} |
140 |
- @for(commit <- history.iterator()) { |
|
140 |
+ @for(commit <- history.iterator) { |
|
141 | 141 |
@defining(getShowCommitURL(project, commit, path)){ showCommitURL => |
142 | 142 |
<tr> |
143 | 143 |
<td class="commit-id"> |
--- app/views/code/nohead.scala.html
+++ app/views/code/nohead.scala.html
... | ... | @@ -21,12 +21,12 @@ |
21 | 21 |
@(project: Project) |
22 | 22 |
|
23 | 23 |
@getCodeURL(project: Project) = @{ |
24 |
- if(session == null){ |
|
24 |
+ if(requestHeader.session == null){ |
|
25 | 25 |
CodeApp.getURL(project.owner, project.name) |
26 | 26 |
} else { |
27 |
- defining(ProjectUser.roleOf(session.get("loginId"), project)) { role => |
|
27 |
+ defining(ProjectUser.roleOf(UserApp.currentUser.loginId, project)) { role => |
|
28 | 28 |
if(role == "manager" || role == "member"){ |
29 |
- CodeApp.getURL(project.owner, project.name).replace("://", "://" + session.get("loginId") + "@") |
|
29 |
+ CodeApp.getURL(project.owner, project.name).replace("://", "://" + UserApp.currentUser.loginId + "@") |
|
30 | 30 |
} else { |
31 | 31 |
CodeApp.getURL(project.owner, project.name) |
32 | 32 |
} |
--- app/views/common/commentForm.scala.html
+++ app/views/common/commentForm.scala.html
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
@import models.enumeration.ResourceType |
25 | 25 |
@import utils.AccessControl._ |
26 | 26 |
|
27 |
-@if(isResourceCreatable(User.findByLoginId(session.get("loginId")), container, resourceType)){ |
|
27 |
+@if(isResourceCreatable(UserApp.currentUser, container, resourceType)){ |
|
28 | 28 |
|
29 | 29 |
<form id="comment-form" action="@action" method="post" enctype="multipart/form-data"> |
30 | 30 |
<div class="write-comment-box"> |
--- app/views/common/debug.scala.html
+++ app/views/common/debug.scala.html
... | ... | @@ -22,5 +22,5 @@ |
22 | 22 |
@import play.api.Play.current |
23 | 23 |
|
24 | 24 |
<div class="container"> |
25 |
- lang = @lang.code |
|
25 |
+ lang = @implicitJavaLang.code |
|
26 | 26 |
</div> |
--- app/views/common/scripts.scala.html
+++ app/views/common/scripts.scala.html
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 |
|
102 | 102 |
// current language set! |
103 | 103 |
if (typeof window.moment == "function" && typeof window.moment.lang == "function") { |
104 |
- moment.lang("@lang.language"); |
|
104 |
+ moment.lang("@implicitJavaLang.language"); |
|
105 | 105 |
} |
106 | 106 |
|
107 | 107 |
// yobi.Dropdown |
... | ... | @@ -120,10 +120,15 @@ |
120 | 120 |
$(htInfo.welTarget.parents("form").get(0)).submit(); |
121 | 121 |
} |
122 | 122 |
}); |
123 |
- @if(session.contains("loginId")){ |
|
124 |
- yobi.ShortcutKey.setKeymapLink({ |
|
125 |
- "P": "@routes.UserApp.userInfo(session.get("loginId"))" |
|
126 |
- }); |
|
123 |
+ @requestHeader.session.get("loginId") match { |
|
124 |
+ case Some(loginId) => { } |
|
125 |
+ case None => { } |
|
126 |
+ } |
|
127 |
+ @requestHeader.session.get("loginId") match { |
|
128 |
+ case Some(v) => { yobi.ShortcutKey.setKeymapLink({ |
|
129 |
+ "P": "@routes.UserApp.userInfo(v)" |
|
130 |
+ }); } |
|
131 |
+ case None => { } |
|
127 | 132 |
} |
128 | 133 |
|
129 | 134 |
// yobi.Files |
... | ... | @@ -168,14 +173,11 @@ |
168 | 173 |
} |
169 | 174 |
|
170 | 175 |
// notify flash messages |
171 |
- @for(key <- flash.keys) { |
|
172 |
- @if(key != utils.Constants.TITLE && |
|
173 |
- key != utils.Constants.DESCRIPTION){ |
|
174 |
- $yobi.notify("@Messages(flash.get(key))", 3000); |
|
176 |
+ @requestHeader.flash.get(utils.Constants.TITLE) match { |
|
177 |
+ case Some(title) => { $yobi.alert("@Messages(title)", null, "@Messages(requestHeader.flash.get(utils.Constants.DESCRIPTION).get)"); } |
|
178 |
+ case None => { @requestHeader.flash.data.foreach { |
|
179 |
+ case (_, value) => { $yobi.notify("@Messages(value)", 3000); } |
|
175 | 180 |
} |
176 |
- @if(key == utils.Constants.TITLE){ |
|
177 |
- $yobi.alert("@Messages(flash.get(key))", null, |
|
178 |
- "@Messages(flash.get(utils.Constants.DESCRIPTION))"); |
|
179 | 181 |
} |
180 | 182 |
} |
181 | 183 |
|
--- app/views/common/select2.scala.html
+++ app/views/common/select2.scala.html
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 |
<script src="@routes.Assets.at("javascripts/lib/select2/select2.js")"></script> |
23 | 23 |
<script src="@routes.Assets.at("javascripts/common/yobi.ui.Select2.js")"></script> |
24 | 24 |
@{ |
25 |
- lang.language match { |
|
25 |
+ implicitJavaLang.language match { |
|
26 | 26 |
case "ko" => { |
27 | 27 |
Html("<script src=\"" + routes.Assets.at("javascripts/lib/select2/select2_locale_ko.js") + "\"></script>") |
28 | 28 |
} |
--- app/views/error/forbidden.scala.html
+++ app/views/error/forbidden.scala.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 |
<i class="ico ico-err2"></i> |
29 | 29 |
<p>@Messages(messageKey)</p> |
30 | 30 |
@if(UserApp.currentUser.isAnonymous){ |
31 |
- <a href="@routes.UserApp.loginForm?redirectUrl=@request.uri" class="ybtn ybtn-primary" data-login="required">@Messages("title.login")</a> |
|
31 |
+ <a href="@routes.UserApp.loginForm?redirectUrl=@requestHeader.uri" class="ybtn ybtn-primary" data-login="required">@Messages("title.login")</a> |
|
32 | 32 |
} |
33 | 33 |
</div> |
34 | 34 |
</div> |
--- app/views/git/create.scala.html
+++ app/views/git/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form:Form[PullRequest], project:Project, projects:List[Project], |
|
21 |
+@(title:String, form: play.data.Form[PullRequest], project:Project, projects:List[Project], |
|
22 | 22 |
fromProject:Project, toProject:Project, |
23 | 23 |
fromBranches:List[playRepository.GitBranch], toBranches:List[playRepository.GitBranch], |
24 | 24 |
pullRequest:models.PullRequest) |
--- app/views/git/edit.scala.html
+++ app/views/git/edit.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form:Form[PullRequest], project:Project, |
|
21 |
+@(title:String, form: play.data.Form[PullRequest], project:Project, |
|
22 | 22 |
fromBranches: List[playRepository.GitBranch], toBranches:List[playRepository.GitBranch], |
23 | 23 |
pullRequest:models.PullRequest) |
24 | 24 |
|
--- app/views/git/fork.scala.html
+++ app/views/git/fork.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, project: Project, forkProject: Project, forkedProjects: List[Project], form: Form[Project], orgUserList:List[OrganizationUser]) |
|
21 |
+@(title:String, project: Project, forkProject: Project, forkedProjects: List[Project], form: play.data.Form[Project], orgUserList:List[OrganizationUser]) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
@import controllers.UserApp |
--- app/views/git/partial_list.scala.html
+++ app/views/git/partial_list.scala.html
... | ... | @@ -25,8 +25,8 @@ |
25 | 25 |
@import org.apache.commons.lang3.StringUtils |
26 | 26 |
|
27 | 27 |
<ul class="post-list-wrap"> |
28 |
-@if(page.getList.size()> 0){ |
|
29 |
- @for(req <- page.getList.iterator()) { |
|
28 |
+@if(page.getList.size> 0){ |
|
29 |
+ @for(req <- page.getList.iterator) { |
|
30 | 30 |
@defining(User.findByLoginId(req.contributor.loginId)){ user => |
31 | 31 |
<li class="post-item"> |
32 | 32 |
<div class="span10"> |
--- app/views/git/partial_pull_request_event.scala.html
+++ app/views/git/partial_pull_request_event.scala.html
... | ... | @@ -55,7 +55,7 @@ |
55 | 55 |
@if(event.newValue == PullRequestReviewAction.DONE.name) { |
56 | 56 |
<li class="event" id="comment-@event.id"> |
57 | 57 |
<span class="state changed">@Messages("pullRequest.review")</span> |
58 |
- @Html(Messages("notification.pullrequest.reviewed",linkToUser(user.loginId, user.name))) |
|
58 |
+ @Html(Messages("notification.pullrequestHeader.reviewed",linkToUser(user.loginId, user.name))) |
|
59 | 59 |
<span class="date"> |
60 | 60 |
<a href="#event-@event.id" title="@getDateString(event.getDate())">@agoOrDateString(event.getDate())</a> |
61 | 61 |
</span> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 |
} else { |
64 | 64 |
<li class="event" id="comment-@event.id"> |
65 | 65 |
<span class="state changed">@Messages("pullRequest.unreview")</span> |
66 |
- @Html(Messages("notification.pullrequest.unreviewed", linkToUser(user.loginId, user.name))) |
|
66 |
+ @Html(Messages("notification.pullrequestHeader.unreviewed", linkToUser(user.loginId, user.name))) |
|
67 | 67 |
<span class="date"> |
68 | 68 |
<a href="#event-@event.id" title="@getDateString(event.getDate())">@agoOrDateString(event.getDate())</a> |
69 | 69 |
</span> |
--- app/views/git/partial_reviewlist.scala.html
+++ app/views/git/partial_reviewlist.scala.html
... | ... | @@ -32,7 +32,7 @@ |
32 | 32 |
@thread.getFirstReviewComment().getContents() |
33 | 33 |
</p> |
34 | 34 |
<p class="info"> |
35 |
- @defining(thread.reviewComments.size()-1) { numberOfComments => |
|
35 |
+ @defining(thread.reviewComments.size-1) { numberOfComments => |
|
36 | 36 |
@if(numberOfComments > 0) { |
37 | 37 |
<span class="comments pull-left"> |
38 | 38 |
<i class="yobicon-comments"></i> @numberOfComments |
--- app/views/git/partial_state.scala.html
+++ app/views/git/partial_state.scala.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 |
|
29 | 29 |
@getCodeURL(project: Project) = @{ |
30 | 30 |
if(ProjectUser.isMember(project.id, UserApp.currentUser().id)){ |
31 |
- CodeApp.getURL(project.owner, project.name).replace("://", "://" + session.get("loginId") + "@") |
|
31 |
+ CodeApp.getURL(project.owner, project.name).replace("://", "://" + UserApp.currentUser.loginId + "@") |
|
32 | 32 |
} else { |
33 | 33 |
CodeApp.getURL(project.owner, project.name) |
34 | 34 |
} |
--- app/views/git/viewChanges.scala.html
+++ app/views/git/viewChanges.scala.html
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
</div> |
48 | 48 |
</div> |
49 | 49 |
|
50 |
- <div class="codediff-wrap mt10 @if(request.cookies.get("diffs-only") != null){diffs-only}"> |
|
50 |
+ <div class="codediff-wrap mt10 @if(requestHeader.cookies.get("diffs-only") != null){diffs-only}"> |
|
51 | 51 |
<button type="button" class="ybtn ybtn-default btn-show-reviewcards"> |
52 | 52 |
<i class="yobicon-restore"></i> |
53 | 53 |
</button> |
... | ... | @@ -158,8 +158,8 @@ |
158 | 158 |
</button> |
159 | 159 |
|
160 | 160 |
<ul class="nav nav-tabs" style="margin-bottom:10px;"> |
161 |
- <li class="active"><a href="#reviewcards-open" data-toggle="tab">@Messages("issue.state.open") @pull.getCommentThreadsByState(CommentThread.ThreadState.OPEN).size()</a></li> |
|
162 |
- <li><a href="#reviewcards-closed" data-toggle="tab">@Messages("issue.state.closed") @pull.getCommentThreadsByState(CommentThread.ThreadState.CLOSED).size()</a></li> |
|
161 |
+ <li class="active"><a href="#reviewcards-open" data-toggle="tab">@Messages("issue.state.open") @pull.getCommentThreadsByState(CommentThread.ThreadState.OPEN).size</a></li> |
|
162 |
+ <li><a href="#reviewcards-closed" data-toggle="tab">@Messages("issue.state.closed") @pull.getCommentThreadsByState(CommentThread.ThreadState.CLOSED).size</a></li> |
|
163 | 163 |
</ul> |
164 | 164 |
|
165 | 165 |
<div class="tab-content review-list"> |
--- app/views/help/keymap.scala.html
+++ app/views/help/keymap.scala.html
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 |
**@ |
21 | 21 |
@(section:String, project:Project)(implicit request: play.api.mvc.RequestHeader) |
22 | 22 |
|
23 |
-@isMac = @{request.headers.get("User-Agent").getOrElse("").contains("Macintosh")} |
|
23 |
+@isMac = @{requestHeader.headers.get("User-Agent").getOrElse("").contains("Macintosh")} |
|
24 | 24 |
@ctrl = @{if(isMac){"⌘"}else{"CTRL"}} |
25 | 25 |
|
26 | 26 |
<div class="pull-right" style="padding:10px 0;"> |
--- app/views/index/partial_notifications.scala.html
+++ app/views/index/partial_notifications.scala.html
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
@defining(NotificationEvent.findByReceiver(UserApp.currentUser, from, size)){ notifications => |
54 |
- @if(notifications.size() == 0){ |
|
54 |
+ @if(notifications.size == 0){ |
|
55 | 55 |
<div class="warning-none"> |
56 | 56 |
<i class="yobicon-danger"></i> @Messages("notification.none") |
57 | 57 |
</div> |
--- app/views/issue/create.scala.html
+++ app/views/issue/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, issueForm:Form[Issue], project:Project) |
|
21 |
+@(title:String, issueForm: play.data.Form[Issue], project:Project) |
|
22 | 22 |
@import helper._ |
23 | 23 |
@import scala.collection.mutable.Map |
24 | 24 |
@import models.enumeration.ResourceType |
--- app/views/issue/edit.scala.html
+++ app/views/issue/edit.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, issueForm:Form[Issue], issue:Issue, project:Project) |
|
21 |
+@(title:String, issueForm: play.data.Form[Issue], issue:Issue, project:Project) |
|
22 | 22 |
@import helper._ |
23 | 23 |
@import scala.collection.mutable.Map |
24 | 24 |
@import models.enumeration.ResourceType |
--- app/views/issue/my_partial_list.scala.html
+++ app/views/issue/my_partial_list.scala.html
... | ... | @@ -70,13 +70,13 @@ |
70 | 70 |
</span> |
71 | 71 |
} |
72 | 72 |
|
73 |
- @if(issue.comments.size()>0 || issue.voters.size()>0) { |
|
73 |
+ @if(issue.comments.size>0 || issue.voters.size>0) { |
|
74 | 74 |
<span class="infos-item item-count-groups"> |
75 |
- @if(issue.comments.size()>0){ |
|
76 |
- @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size() ) |
|
75 |
+ @if(issue.comments.size>0){ |
|
76 |
+ @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size ) |
|
77 | 77 |
} |
78 |
- @if(issue.voters.size()>0){ |
|
79 |
- @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size(), "strong" ) |
|
78 |
+ @if(issue.voters.size>0){ |
|
79 |
+ @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size, "strong" ) |
|
80 | 80 |
} |
81 | 81 |
</span> |
82 | 82 |
} |
--- app/views/issue/my_partial_list_quicksearch.scala.html
+++ app/views/issue/my_partial_list_quicksearch.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
<li @if(param.assigneeId == UserApp.currentUser().id){ class="active"}> |
26 | 26 |
<a pjax-filter href="#" |
27 | 27 |
data-author-id="" |
28 |
- data-assignee-id="@User.findByLoginId(session.get("loginId")).id" |
|
28 |
+ data-assignee-id="@UserApp.currentUser.id" |
|
29 | 29 |
data-milestone-id="@param.milestoneId" |
30 | 30 |
data-mention-id=""> |
31 | 31 |
@Messages("issue.list.assignedToMe") |
... | ... | @@ -33,7 +33,7 @@ |
33 | 33 |
</li> |
34 | 34 |
<li @if(param.authorId == UserApp.currentUser().id){ class="active"}> |
35 | 35 |
<a pjax-filter href="#" |
36 |
- data-author-id="@User.findByLoginId(session.get("loginId")).id" |
|
36 |
+ data-author-id="@UserApp.currentUser.id" |
|
37 | 37 |
data-assignee-id="" |
38 | 38 |
data-milestone-id="@param.milestoneId" |
39 | 39 |
data-mention-id=""> |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 |
data-author-id="" |
46 | 46 |
data-assignee-id="" |
47 | 47 |
data-milestone-id="@param.milestoneId" |
48 |
- data-mention-id="@User.findByLoginId(session.get("loginId")).id"> |
|
48 |
+ data-mention-id="@UserApp.currentUser.id"> |
|
49 | 49 |
@Messages("issue.list.mentionedOfMe") |
50 | 50 |
</a> |
51 | 51 |
</li> |
--- app/views/issue/my_partial_search.scala.html
+++ app/views/issue/my_partial_search.scala.html
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 |
</ul> |
79 | 79 |
@if(!currentPage.getList.isEmpty){ |
80 | 80 |
<div class="filter-wrap small-heights"> |
81 |
- @if(currentPage.getList.size() > 1){ |
|
81 |
+ @if(currentPage.getList.size > 1){ |
|
82 | 82 |
|
83 | 83 |
<div class="filters pull-right"> |
84 | 84 |
@makeFilterLink("dueDate", param.orderBy, param.orderDir, Messages("common.order.dueDate")) |
--- app/views/issue/partial_list.scala.html
+++ app/views/issue/partial_list.scala.html
... | ... | @@ -73,13 +73,13 @@ |
73 | 73 |
</span> |
74 | 74 |
} |
75 | 75 |
|
76 |
- @if(issue.comments.size()>0 || issue.voters.size()>0) { |
|
76 |
+ @if(issue.comments.size>0 || issue.voters.size>0) { |
|
77 | 77 |
<span class="infos-item item-count-groups"> |
78 |
- @if(issue.comments.size()>0){ |
|
79 |
- @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size() ) |
|
78 |
+ @if(issue.comments.size>0){ |
|
79 |
+ @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size ) |
|
80 | 80 |
} |
81 |
- @if(issue.voters.size()>0){ |
|
82 |
- @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size(), "strong" ) |
|
81 |
+ @if(issue.voters.size>0){ |
|
82 |
+ @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size, "strong" ) |
|
83 | 83 |
} |
84 | 84 |
</span> |
85 | 85 |
} |
--- app/views/issue/partial_list_quicksearch.scala.html
+++ app/views/issue/partial_list_quicksearch.scala.html
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 |
@if(!UserApp.currentUser().isAnonymous){ |
38 | 38 |
<li @if(param.assigneeId == UserApp.currentUser().id){ class="active"}> |
39 | 39 |
<a pjax-filter href="#" |
40 |
- data-assignee-id="@User.findByLoginId(session.get("loginId")).id" |
|
40 |
+ data-assignee-id="@UserApp.currentUser.id" |
|
41 | 41 |
data-author-id="" |
42 | 42 |
data-milestone-id="@param.milestoneId"> |
43 | 43 |
@Messages("issue.list.assignedToMe") |
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
<li @if(param.authorId == UserApp.currentUser().id){ class="active"}> |
48 | 48 |
<a pjax-filter href="#" |
49 | 49 |
data-assignee-id="" |
50 |
- data-author-id="@User.findByLoginId(session.get("loginId")).id" |
|
50 |
+ data-author-id="@UserApp.currentUser.id" |
|
51 | 51 |
data-milestone-id="@param.milestoneId"> |
52 | 52 |
@Messages("issue.list.authoredByMe") |
53 | 53 |
<span class="num-badge pull-right">@Issue.countIssuesBy(project.id, paramForIssuesAuthoredByMe)</span> |
--- app/views/issue/partial_list_wrap.scala.html
+++ app/views/issue/partial_list_wrap.scala.html
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 |
@partial_massupdate(project, param) |
71 | 71 |
} |
72 | 72 |
|
73 |
- @if(currentPage.getList.size() > 1){ |
|
73 |
+ @if(currentPage.getList.size > 1){ |
|
74 | 74 |
<div class="filters pull-right"> |
75 | 75 |
@makeFilterLink("dueDate", param.orderBy, param.orderDir, Messages("common.order.dueDate")) |
76 | 76 |
@makeFilterLink("updatedDate", param.orderBy, param.orderDir, Messages("common.order.updatedDate")) |
... | ... | @@ -83,7 +83,7 @@ |
83 | 83 |
@partial_list(project, currentPage.getList, param, currentPage.getPageIndex, currentPage.getTotalPageCount) |
84 | 84 |
|
85 | 85 |
<div class="pull-left" style="padding:10px;"> |
86 |
- <a href="@addQueryString(removeQueryString(request.uri, "pageNum"), "format=xls")" class="ybtn small"> |
|
86 |
+ <a href="@addQueryString(removeQueryString(requestHeader.uri, "pageNum"), "format=xls")" class="ybtn small"> |
|
87 | 87 |
<i class="yobicon-file-excel"></i> @Messages("issue.downloadAsExcel") |
88 | 88 |
</a> |
89 | 89 |
</div> |
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, issue:Issue, issueForm:Form[Issue], commentForm:Form[Comment],project:Project) |
|
21 |
+@(title:String, issue:Issue, issueForm: play.data.Form[Issue], commentForm: play.data.Form[Comment],project:Project) |
|
22 | 22 |
@import org.apache.commons.lang.StringUtils |
23 | 23 |
@import helper._ |
24 | 24 |
@import scala.collection.mutable.Map |
... | ... | @@ -39,7 +39,12 @@ |
39 | 39 |
|
40 | 40 |
@isFirstState(state:State) = {@if(issue.state.state == Issue.availableStates.get(0).state()){dirty}} |
41 | 41 |
|
42 |
-@urlToIssues = @{ urlToList(request.getHeader("Referer"), routes.IssueApp.issues(project.owner, project.name, "open").toString()) } |
|
42 |
+@urlToIssues = @{ |
|
43 |
+ requestHeader.headers.get("Referer") match { |
|
44 |
+ case Some(u) => urlToList(u, routes.IssueApp.issues(project.owner, project.name, "open").toString()) |
|
45 |
+ case _ => routes.IssueApp.issues(project.owner, project.name, "open").toString() |
|
46 |
+ } |
|
47 |
+} |
|
43 | 48 |
|
44 | 49 |
@urlToVote = @{ |
45 | 50 |
if(issue.isVotedBy(UserApp.currentUser)){ |
... | ... | @@ -113,7 +118,7 @@ |
113 | 118 |
} |
114 | 119 |
|
115 | 120 |
<div id="vote" class="vote-wrap"> |
116 |
- @if(isResourceCreatable(User.findByLoginId(session.get("loginId")), issue.asResource(), ResourceType.ISSUE_COMMENT)) { |
|
121 |
+ @if(isResourceCreatable(UserApp.currentUser, issue.asResource(), ResourceType.ISSUE_COMMENT)) { |
|
117 | 122 |
<a href="@urlToVote" class="ybtn @if(issue.isVotedBy(UserApp.currentUser)){ybtn-watching}" title="@getVoteButtonTitle" |
118 | 123 |
data-request-method="post" data-toggle="tooltip"> |
119 | 124 |
<span class="heart"><i class="yobicon-hearts"></i></span> |
--- app/views/milestone/create.scala.html
+++ app/views/milestone/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form: Form[Milestone], project: Project) |
|
21 |
+@(title:String, form: play.data.Form[Milestone], project: Project) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
@import models.enumeration._ |
--- app/views/milestone/edit.scala.html
+++ app/views/milestone/edit.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title: String, form: Form[Milestone], milestoneId: Long, project: Project) |
|
21 |
+@(title: String, form: play.data.Form[Milestone], milestoneId: Long, project: Project) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
@import models.enumeration._ |
--- app/views/organization/create.scala.html
+++ app/views/organization/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, form: Form[Organization]) |
|
21 |
+@(title:String, form: play.data.Form[Organization]) |
|
22 | 22 |
|
23 | 23 |
@siteLayout("app.name", utils.MenuType.NONE) { |
24 | 24 |
<div class="page-wrap-outer"> |
... | ... | @@ -32,7 +32,10 @@ |
32 | 32 |
<dt> |
33 | 33 |
<div class="n-alert" data-errType="name"> |
34 | 34 |
<div class="orange-txt"> |
35 |
- @if(flash.get("warning") != null) { <span class="warning">@Messages(flash.get("warning"))</span> } |
|
35 |
+ @requestHeader.flash.get("warning") match { |
|
36 |
+ case Some(msg) => { <span class="warning">@Messages(msg)</span> } |
|
37 |
+ case None => { } |
|
38 |
+ } |
|
36 | 39 |
<span class="msg wrongName" style="display: none;"></span> |
37 | 40 |
</div> |
38 | 41 |
</div> |
--- app/views/organization/setting.scala.html
+++ app/views/organization/setting.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(organization:Organization, organizationForm: Form[Organization]) |
|
21 |
+@(organization:Organization, organizationForm: play.data.Form[Organization]) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
|
--- app/views/organization/view.scala.html
+++ app/views/organization/view.scala.html
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 |
} |
115 | 115 |
</ul> |
116 | 116 |
<p> |
117 |
- @Html(Messages("project.onmember", User.findUsersByProject(project.id).length)) |
|
117 |
+ @Html(Messages("project.onmember", User.findUsersByProject(project.id).size)) |
|
118 | 118 |
<i class="yobicon-eye yobicon-middle"></i> @Html(Messages("project.onwatching", project.getWatchingCount)) |
119 | 119 |
</p> |
120 | 120 |
</div> |
--- app/views/project/change_vcs.scala.html
+++ app/views/project/change_vcs.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(message: String)(projectForm: Form[Project], project:Project) |
|
21 |
+@(message: String)(projectForm: play.data.Form[Project], project:Project) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/project/create.scala.html
+++ app/views/project/create.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, newProjectForm:Form[Project], orgUserList:List[OrganizationUser]) |
|
21 |
+@(title:String, newProjectForm: play.data.Form[Project], orgUserList:List[OrganizationUser]) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
@import playRepository.RepositoryService |
--- app/views/project/delete.scala.html
+++ app/views/project/delete.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(message: String)(projectForm: Form[Project], project:Project) |
|
21 |
+@(message: String)(projectForm: play.data.Form[Project], project:Project) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/project/importing.scala.html
+++ app/views/project/importing.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(title:String, newProjectForm:Form[Project], orgUserList:List[OrganizationUser]) |
|
21 |
+@(title:String, newProjectForm: play.data.Form[Project], orgUserList:List[OrganizationUser]) |
|
22 | 22 |
|
23 | 23 |
@import utils.TemplateHelper._ |
24 | 24 |
@import playRepository.RepositoryService |
--- app/views/project/list.scala.html
+++ app/views/project/list.scala.html
... | ... | @@ -89,7 +89,7 @@ |
89 | 89 |
} |
90 | 90 |
</ul> |
91 | 91 |
<p> |
92 |
- @Html(Messages("project.onmember", User.findUsersByProject(project.id).length)) |
|
92 |
+ @Html(Messages("project.onmember", User.findUsersByProject(project.id).size)) |
|
93 | 93 |
<i class="yobicon-eye yobicon-middle"></i> @Html(Messages("project.onwatching", project.getWatchingCount)) |
94 | 94 |
</p> |
95 | 95 |
</div> |
--- app/views/project/partial_history.scala.html
+++ app/views/project/partial_history.scala.html
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
<div class="content-container nm"> |
48 | 48 |
<div class="main-stream" style="width:100%;"> |
49 | 49 |
<ul class="activity-streams unstyled"> |
50 |
- @for(history <- histories.iterator()) { |
|
50 |
+ @for(history <- histories.iterator) { |
|
51 | 51 |
<li class="activity-stream"> |
52 | 52 |
<a href="@userPageUrlOnHistory(history)" class="avatar-wrap pull-left mr10"> |
53 | 53 |
<img src="@userAvatarUrlOnHistory(history)" width="32" height="32"> |
--- app/views/project/setting.scala.html
+++ app/views/project/setting.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(message: String)(projectForm: Form[Project], project: Project, branches: List[String]) |
|
21 |
+@(message: String)(projectForm: play.data.Form[Project], project: Project, branches: List[String]) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/project/transfer.scala.html
+++ app/views/project/transfer.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(message: String)(projectForm: Form[Project], project:Project) |
|
21 |
+@(message: String)(projectForm: play.data.Form[Project], project:Project) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/projectMenu.scala.html
+++ app/views/projectMenu.scala.html
... | ... | @@ -131,8 +131,9 @@ |
131 | 131 |
@if(project.menuSetting.pullRequest && project.vcs.equals("GIT")){ |
132 | 132 |
,"F": "@getPullRequestURL(project)" |
133 | 133 |
} |
134 |
- @if(ProjectUser.roleOf(session.get("loginId"), project).equals("manager")){ |
|
135 |
- ,"Q": "@routes.ProjectApp.settingForm(project.owner, project.name)" |
|
134 |
+ @requestHeader.session.get("loginId") match { |
|
135 |
+ case Some(role) if role.equals("manager") => { "Q": "@routes.ProjectApp.settingForm(project.owner, project.name)" } |
|
136 |
+ case _ => { } |
|
136 | 137 |
} |
137 | 138 |
}; |
138 | 139 |
|
--- app/views/reviewthread/partial_list.scala.html
+++ app/views/reviewthread/partial_list.scala.html
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 |
@import utils.TemplateHelper._ |
25 | 25 |
@import utils.JodaDateUtil |
26 | 26 |
|
27 |
-@if(page.getList().size() > 0){ |
|
27 |
+@if(page.getList().size > 0){ |
|
28 | 28 |
<ul class="post-list-wrap"> |
29 | 29 |
@for(thread <- page.getList()) { |
30 | 30 |
@defining(User.find.byId(thread.getFirstReviewComment.author.id)){ user => |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 |
<span class="infos-item" title="@JodaDateUtil.getDateString(thread.createdDate)"> |
55 | 55 |
@agoOrDateString(thread.createdDate) |
56 | 56 |
</span> |
57 |
- @defining(thread.reviewComments.size()-1) { numberOfComments => |
|
57 |
+ @defining(thread.reviewComments.size-1) { numberOfComments => |
|
58 | 58 |
|
59 | 59 |
@if(numberOfComments > 0) { |
60 | 60 |
<span class="infos-item item-count-groups"> |
--- app/views/search/partial_issue_comments.scala.html
+++ app/views/search/partial_issue_comments.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
@import utils.JodaDateUtil |
26 | 26 |
|
27 | 27 |
@defining(searchResult.getIssueComments) { page => |
28 |
- @if(page.getList.length > 0) { |
|
28 |
+ @if(page.getList.size > 0) { |
|
29 | 29 |
<ul class="search-list-wrap"> |
30 | 30 |
@for(comment <- page.getList) { |
31 | 31 |
@defining(User.findByLoginId(comment.authorLoginId)){ user => |
--- app/views/search/partial_issues.scala.html
+++ app/views/search/partial_issues.scala.html
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 |
@urlToList(project:Project, state:String) = {@routes.IssueApp.issues(project.owner, project.name, "open", "html", 1)} |
28 | 28 |
|
29 | 29 |
@defining(searchResult.getIssues) { page => |
30 |
- @if(page.getList.length > 0) { |
|
30 |
+ @if(page.getList.size > 0) { |
|
31 | 31 |
<ul class="search-list-wrap"> |
32 | 32 |
@for(issue <- page.getList) { |
33 | 33 |
@defining(User.findByLoginId(issue.authorLoginId)){ user => |
--- app/views/search/partial_milestones.scala.html
+++ app/views/search/partial_milestones.scala.html
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
@defining(searchResult.getMilestones) { page => |
37 |
- @if(page.getList.length > 0) { |
|
37 |
+ @if(page.getList.size > 0) { |
|
38 | 38 |
<ul class="search-list-wrap"> |
39 | 39 |
@for(milestone <- page.getList) { |
40 | 40 |
<li class="search-list-item"> |
--- app/views/search/partial_post_comments.scala.html
+++ app/views/search/partial_post_comments.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
@import utils.JodaDateUtil |
26 | 26 |
|
27 | 27 |
@defining(searchResult.getPostComments) { page => |
28 |
- @if(page.getList.length > 0) { |
|
28 |
+ @if(page.getList.size > 0) { |
|
29 | 29 |
<ul class="search-list-wrap"> |
30 | 30 |
@for(comment <- page.getList) { |
31 | 31 |
@defining(User.findByLoginId(comment.authorLoginId)){ user => |
--- app/views/search/partial_posts.scala.html
+++ app/views/search/partial_posts.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
@import utils.JodaDateUtil |
26 | 26 |
|
27 | 27 |
@defining(searchResult.getPosts) { page => |
28 |
- @if(page.getList.length > 0) { |
|
28 |
+ @if(page.getList.size > 0) { |
|
29 | 29 |
<ul class="search-list-wrap"> |
30 | 30 |
@for(post <- page.getList) { |
31 | 31 |
@defining(User.findByLoginId(post.authorLoginId)){ user => |
--- app/views/search/partial_projects.scala.html
+++ app/views/search/partial_projects.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
@import utils.JodaDateUtil._ |
26 | 26 |
|
27 | 27 |
@defining(searchResult.getProjects) { page => |
28 |
- @if(page.getList.length > 0) { |
|
28 |
+ @if(page.getList.size > 0) { |
|
29 | 29 |
<ul class="search-list-wrap"> |
30 | 30 |
@for(project <- page.getList) { |
31 | 31 |
@defining(User.findByLoginId(project.owner)){ user => |
--- app/views/search/partial_reviews.scala.html
+++ app/views/search/partial_reviews.scala.html
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 |
@import utils.TemplateHelper.DiffRenderer._ |
27 | 27 |
|
28 | 28 |
@defining(searchResult.getReviews) { page => |
29 |
- @if(page.getList.length > 0) { |
|
29 |
+ @if(page.getList.size > 0) { |
|
30 | 30 |
<ul class="search-list-wrap"> |
31 | 31 |
@for(review <- page.getList) { |
32 | 32 |
<li class="search-list-item"> |
--- app/views/search/partial_users.scala.html
+++ app/views/search/partial_users.scala.html
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
@import utils.JodaDateUtil |
26 | 26 |
|
27 | 27 |
@defining(searchResult.getUsers) { page => |
28 |
- @if(page.getList.length > 0) { |
|
28 |
+ @if(page.getList.size > 0) { |
|
29 | 29 |
<ul class="search-list-wrap"> |
30 | 30 |
@for(user <- page.getList) { |
31 | 31 |
<li class="search-list-item project"> |
--- app/views/site/mail.scala.html
+++ app/views/site/mail.scala.html
... | ... | @@ -37,11 +37,11 @@ |
37 | 37 |
</div> |
38 | 38 |
} |
39 | 39 |
|
40 |
-@if(notConfiguredItems != null && notConfiguredItems.size() > 0) { |
|
40 |
+@if(notConfiguredItems != null && notConfiguredItems.size > 0) { |
|
41 | 41 |
<div class="alert alert-error"> |
42 | 42 |
<p>@Html(Messages("site.mail.notConfigured", "/admin/mailconf"))</p> |
43 | 43 |
<ul> |
44 |
- @for(item <- notConfiguredItems.iterator()) { |
|
44 |
+ @for(item <- notConfiguredItems.iterator) { |
|
45 | 45 |
<li>@item</li> |
46 | 46 |
} |
47 | 47 |
</ul> |
--- app/views/site/siteMngLayout.scala.html
+++ app/views/site/siteMngLayout.scala.html
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 |
@isActiveMenu(calls: Call*) = @{ |
24 | 24 |
var menuState = "" |
25 | 25 |
for(call <- calls) { |
26 |
- if(call.toString().equals(request().path())) { |
|
26 |
+ if(call.toString().equals(requestHeader.path)) { |
|
27 | 27 |
menuState = "active" |
28 | 28 |
} |
29 | 29 |
} |
--- app/views/site/userList.scala.html
+++ app/views/site/userList.scala.html
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 |
<script type="text/x-jquery-tmpl" id="dismissable-alerts-request"> |
180 | 180 |
<div class="alert alert-fail"> |
181 | 181 |
<button type="button" class="close" data-dismiss="alert">×</button> |
182 |
- <h4>sending request...</h4> |
|
182 |
+ <h4>sending requestHeader...</h4> |
|
183 | 183 |
</div> |
184 | 184 |
</script> |
185 | 185 |
|
--- app/views/user/edit.scala.html
+++ app/views/user/edit.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(userForm:Form[User], user:User) |
|
21 |
+@(userForm: play.data.Form[User], user:User) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/user/edit_emails.scala.html
+++ app/views/user/edit_emails.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(userForm:Form[User], user:User) |
|
21 |
+@(userForm: play.data.Form[User], user:User) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/user/edit_notifications.scala.html
+++ app/views/user/edit_notifications.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(userForm:Form[User], user:User) |
|
21 |
+@(userForm: play.data.Form[User], user:User) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/user/edit_password.scala.html
+++ app/views/user/edit_password.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(userForm:Form[User], user:User) |
|
21 |
+@(userForm: play.data.Form[User], user:User) |
|
22 | 22 |
|
23 | 23 |
@import helper._ |
24 | 24 |
@import utils.TemplateHelper._ |
--- app/views/user/login.scala.html
+++ app/views/user/login.scala.html
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
* See the License for the specific language governing permissions and |
19 | 19 |
* limitations under the License. |
20 | 20 |
**@ |
21 |
-@(message:String, authInfoForm:Form[AuthInfo], redirectUrl:String) |
|
21 |
+@(message:String, authInfoForm: play.data.Form[AuthInfo], redirectUrl:String) |
|
22 | 22 |
|
23 | 23 |
@siteLayout(message, utils.MenuType.NONE) { |
24 | 24 |
<div class="page full"> |
--- app/views/user/partial_issues.scala.html
+++ app/views/user/partial_issues.scala.html
... | ... | @@ -64,13 +64,13 @@ |
64 | 64 |
</span> |
65 | 65 |
} |
66 | 66 |
|
67 |
- @if(issue.comments.size()>0 || issue.voters.size()>0) { |
|
67 |
+ @if(issue.comments.size>0 || issue.voters.size>0) { |
|
68 | 68 |
<span class="infos-item item-count-groups"> |
69 |
- @if(issue.comments.size()>0){ |
|
70 |
- @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size() ) |
|
69 |
+ @if(issue.comments.size>0){ |
|
70 |
+ @countHtml("comments",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#comments", issue.comments.size ) |
|
71 | 71 |
} |
72 |
- @if(issue.voters.size()>0){ |
|
73 |
- @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size(), "strong" ) |
|
72 |
+ @if(issue.voters.size>0){ |
|
73 |
+ @countHtml("hearts",routes.IssueApp.issue(issue.project.owner, issue.project.name, issue.getNumber).toString() + "#vote", issue.voters.size, "strong" ) |
|
74 | 74 |
} |
75 | 75 |
</span> |
76 | 76 |
} |
--- app/views/user/partial_projectlist.scala.html
+++ app/views/user/partial_projectlist.scala.html
... | ... | @@ -68,9 +68,9 @@ |
68 | 68 |
</div> |
69 | 69 |
|
70 | 70 |
<div class="stats"> |
71 |
- @Html(Messages("project.onmember", User.findUsersByProject(project.id).length))<br/> |
|
71 |
+ @Html(Messages("project.onmember", User.findUsersByProject(project.id).size))<br/> |
|
72 | 72 |
|
73 |
- @if(session.get("loginId") != project.owner ){ |
|
73 |
+ @if(UserApp.currentUser.loginId != project.owner ){ |
|
74 | 74 |
@if(User.isWatching(project)){ |
75 | 75 |
<a href="@routes.WatchProjectApp.unwatch(project.owner, project.name)" class="nbtn blue medium watchBtn"> |
76 | 76 |
<i class="yobicon-eye-open yobicon-middle yobicon-white"></i> |
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 |
} |
88 |