[Notice] Announcing the End of Demo Server [Read me]
--- app/controllers/SiteApp.java
+++ app/controllers/SiteApp.java
... | ... | @@ -1,23 +1,9 @@ |
1 | 1 |
/** |
2 |
- * Yobi, Project Hosting SW |
|
3 |
- * |
|
4 |
- * Copyright 2012 NAVER Corp. |
|
5 |
- * http://yobi.io |
|
6 |
- * |
|
7 |
- * @author Hwi Ahn |
|
8 |
- * |
|
9 |
- * Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
- * you may not use this file except in compliance with the License. |
|
11 |
- * You may obtain a copy of the License at |
|
12 |
- * |
|
13 |
- * http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
- * |
|
15 |
- * Unless required by applicable law or agreed to in writing, software |
|
16 |
- * distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
- * See the License for the specific language governing permissions and |
|
19 |
- * limitations under the License. |
|
20 |
- */ |
|
2 |
+ * Yona, 21st Century Project Hosting SW |
|
3 |
+ * <p> |
|
4 |
+ * Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+ * https://yona.io |
|
6 |
+ **/ |
|
21 | 7 |
package controllers; |
22 | 8 |
|
23 | 9 |
import com.avaje.ebean.Page; |
--- app/models/Project.java
+++ app/models/Project.java
... | ... | @@ -152,6 +152,10 @@ |
152 | 152 |
|
153 | 153 |
public static Page<Project> findByName(String name, int pageSize, |
154 | 154 |
int pageNum) { |
155 |
+ if(StringUtils.isBlank(name)){ |
|
156 |
+ return find.where().order().desc("createdDate").findPagingList(pageSize).getPage(pageNum); |
|
157 |
+ } |
|
158 |
+ |
|
155 | 159 |
return find.where().ilike("name", "%" + decodeUrlString(name) + "%") |
156 | 160 |
.findPagingList(pageSize).getPage(pageNum); |
157 | 161 |
} |
--- app/models/User.java
+++ app/models/User.java
... | ... | @@ -383,7 +383,7 @@ |
383 | 383 |
el.endJunction(); |
384 | 384 |
} |
385 | 385 |
|
386 |
- return el.findPagingList(USER_COUNT_PER_PAGE).getPage(pageNum); |
|
386 |
+ return el.order().desc("createdDate").findPagingList(USER_COUNT_PER_PAGE).getPage(pageNum); |
|
387 | 387 |
} |
388 | 388 |
|
389 | 389 |
/** |
--- app/views/site/projectList.scala.html
+++ app/views/site/projectList.scala.html
... | ... | @@ -1,26 +1,13 @@ |
1 | 1 |
@** |
2 |
-* Yobi, Project Hosting SW |
|
2 |
+* Yona, 21st Century Project Hosting SW |
|
3 | 3 |
* |
4 |
-* Copyright 2012 NAVER Corp. |
|
5 |
-* http://yobi.io |
|
6 |
-* |
|
7 |
-* @author Hwi Ahn |
|
8 |
-* |
|
9 |
-* Licensed under the Apache License, Version 2.0 (the "License"); |
|
10 |
-* you may not use this file except in compliance with the License. |
|
11 |
-* You may obtain a copy of the License at |
|
12 |
-* |
|
13 |
-* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
-* |
|
15 |
-* Unless required by applicable law or agreed to in writing, software |
|
16 |
-* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
-* See the License for the specific language governing permissions and |
|
19 |
-* limitations under the License. |
|
4 |
+* Copyright Yona & Yobi Authors & NAVER Corp. |
|
5 |
+* https://yona.io |
|
20 | 6 |
**@ |
21 | 7 |
@(message: String, currentPage: com.avaje.ebean.Page[Project], filter:String) |
22 | 8 |
|
23 | 9 |
@import utils.TemplateHelper._ |
10 |
+@import utils.JodaDateUtil._ |
|
24 | 11 |
|
25 | 12 |
@siteMngLayout(message) { |
26 | 13 |
<div class="title_area"> |
... | ... | @@ -54,10 +41,13 @@ |
54 | 41 |
@project.owner/@project.name |
55 | 42 |
</a> |
56 | 43 |
</div> |
57 |
- <div class="span5 listitem-col"> |
|
44 |
+ <div class="span4 listitem-col"> |
|
58 | 45 |
@project.overview |
59 | 46 |
</div> |
60 | 47 |
<div class="span2 listitem-col"> |
48 |
+ @geYMDDate(project.createdDate) |
|
49 |
+ </div> |
|
50 |
+ <div class="span1 listitem-col"> |
|
61 | 51 |
<button class="ybtn ybtn-danger" data-project-name="@project.owner/@project.name" data-toggle="delete-project" data-href="@routes.SiteApp.deleteProject(project.id)">@Messages("button.delete")</button> |
62 | 52 |
</div> |
63 | 53 |
</li> |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?