
Merge branch 'feature/organization-working' of doortts/yobi
from pull request 860
@d1fd3c0f3648aaee33b4b313a88a786790a0b514
--- app/assets/stylesheets/less/_common.less
+++ app/assets/stylesheets/less/_common.less
... | ... | @@ -135,6 +135,7 @@ |
135 | 135 |
/** text style **/ |
136 | 136 |
.bold { font-weight:bold; } |
137 | 137 |
.gray-txt { color:@gray-cc !important; } |
138 |
+.darkgray-txt { color:@gray-99 !important; } |
|
138 | 139 |
.orange-txt { color:@orange !important; } |
139 | 140 |
.primary-txt { color:@primary !important; } |
140 | 141 |
.secondary-txt { color:@secondary !important; } |
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -218,7 +218,7 @@ |
218 | 218 |
|
219 | 219 |
.project-header-outer { |
220 | 220 |
background-color:#ececec; |
221 |
- height:69px; |
|
221 |
+ height:80px; |
|
222 | 222 |
border-bottom:1px solid #ddd; |
223 | 223 |
background-clip: padding-box; |
224 | 224 |
background-position: bottom; |
... | ... | @@ -1600,7 +1600,7 @@ |
1600 | 1600 |
width:100%; |
1601 | 1601 |
ul { |
1602 | 1602 |
display:inline-block; |
1603 |
- width:115px; max-height:71px; |
|
1603 |
+ max-width: 920px; |
|
1604 | 1604 |
overflow:hidden; |
1605 | 1605 |
|
1606 | 1606 |
li { |
... | ... | @@ -5426,6 +5426,7 @@ |
5426 | 5426 |
white-space: nowrap; |
5427 | 5427 |
overflow: hidden; |
5428 | 5428 |
font-size: 14px; |
5429 |
+ font-weight: bold; |
|
5429 | 5430 |
} |
5430 | 5431 |
|
5431 | 5432 |
.review-meta { |
... | ... | @@ -5445,3 +5446,33 @@ |
5445 | 5446 |
} |
5446 | 5447 |
} |
5447 | 5448 |
} |
5449 |
+ |
|
5450 |
+.group-title-head{ |
|
5451 |
+ color: #00bff3; |
|
5452 |
+ .border-radius(3px); |
|
5453 |
+ font-size: 12px; |
|
5454 |
+ margin-right: 5px; |
|
5455 |
+ padding: 3px; |
|
5456 |
+} |
|
5457 |
+ |
|
5458 |
+.my-list-item { |
|
5459 |
+ img { |
|
5460 |
+ width: 20px; |
|
5461 |
+ height: 20px; |
|
5462 |
+ .border-radius(3px); |
|
5463 |
+ border: 1px solid #ececec; |
|
5464 |
+ margin-right: 3px; |
|
5465 |
+ } |
|
5466 |
+ .dummy-25px { |
|
5467 |
+ width: 25px; |
|
5468 |
+ display: inline-block; |
|
5469 |
+ } |
|
5470 |
+} |
|
5471 |
+ |
|
5472 |
+.dropdown-menu>li { |
|
5473 |
+ .my-list-item; |
|
5474 |
+} |
|
5475 |
+ |
|
5476 |
+.margin-right-15 { |
|
5477 |
+ margin-right: 15px; |
|
5478 |
+} |
--- app/assets/stylesheets/less/_yobiUI.less
+++ app/assets/stylesheets/less/_yobiUI.less
... | ... | @@ -422,7 +422,6 @@ |
422 | 422 |
display:inline-block; |
423 | 423 |
vertical-align:middle; |
424 | 424 |
overflow:hidden; |
425 |
- border: 1px solid #ccc; |
|
426 | 425 |
background:#ddd; |
427 | 426 |
.border-radius(3px) !important; |
428 | 427 |
|
... | ... | @@ -1037,7 +1036,7 @@ |
1037 | 1036 |
> a { |
1038 | 1037 |
.border-radius(3px); |
1039 | 1038 |
color:#292929; |
1040 |
- padding: 3px 20px 5px; |
|
1039 |
+ padding: 3px 5px 5px 15px; |
|
1041 | 1040 |
background-color:transparent !important; |
1042 | 1041 |
.transition(all 0.2s ease); |
1043 | 1042 |
|
--- app/utils/TemplateHelper.scala
+++ app/utils/TemplateHelper.scala
... | ... | @@ -142,10 +142,24 @@ |
142 | 142 |
"<a href=\"" + userInfoURL + "\" class=\"usf-group\" data-toggle=\"tooltip\" data-placement=\"top\" title=\"" + user.name + "\"><img src=\"" + user.avatarUrl + "\" class=\"avatar-wrap " + avatarSize + "\"></a>" |
143 | 143 |
} |
144 | 144 |
|
145 |
+ def urlToProjectBG(project: Project) = { |
|
146 |
+ models.Attachment.findByContainer(project.asResource) match { |
|
147 |
+ case files if files.size > 0 => routes.AttachmentApp.getFile(files.head.id) |
|
148 |
+ case _ => routes.Assets.at("images/project_default.png") |
|
149 |
+ } |
|
150 |
+ } |
|
151 |
+ |
|
145 | 152 |
def urlToProjectLogo(project: Project) = { |
146 | 153 |
models.Attachment.findByContainer(project.asResource) match { |
147 | 154 |
case files if files.size > 0 => routes.AttachmentApp.getFile(files.head.id) |
148 |
- case _ => routes.Assets.at("images/bg-default-project.jpg") |
|
155 |
+ case _ => routes.Assets.at("images/projet_deault.png") |
|
156 |
+ } |
|
157 |
+ } |
|
158 |
+ |
|
159 |
+ def hasProjectLogo(project: Project) = { |
|
160 |
+ models.Attachment.findByContainer(project.asResource) match { |
|
161 |
+ case files if files.size > 0 => true |
|
162 |
+ case _ => false |
|
149 | 163 |
} |
150 | 164 |
} |
151 | 165 |
|
... | ... | @@ -233,7 +247,14 @@ |
233 | 247 |
def urlToOrganizationLogo(organization: Organization) = { |
234 | 248 |
models.Attachment.findByContainer(organization.asResource) match { |
235 | 249 |
case files if files.size > 0 => routes.AttachmentApp.getFile(files.head.id) |
236 |
- case _ => routes.Assets.at("images/bg-default-project.jpg") |
|
250 |
+ case _ => routes.Assets.at("images/group_default.png") |
|
251 |
+ } |
|
252 |
+ } |
|
253 |
+ |
|
254 |
+ def hasOrganizationLogo(organization: Organization) = { |
|
255 |
+ models.Attachment.findByContainer(organization.asResource) match { |
|
256 |
+ case files if files.size > 0 => true |
|
257 |
+ case _ => false |
|
237 | 258 |
} |
238 | 259 |
} |
239 | 260 |
|
--- app/views/index/myOrganizationList.scala.html
+++ app/views/index/myOrganizationList.scala.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
@defining(Organization.findOrganizationsByUserLoginId(UserApp.currentUser.loginId)) { organizations => |
6 | 6 |
@for(organization <- organizations){ |
7 | 7 |
<li class="my-list-item" data-value="@organization.name"> |
8 |
- <a href="@routes.OrganizationApp.organization(organization.name)"> |
|
8 |
+ @if(hasOrganizationLogo(organization)){<img src="@urlToOrganizationLogo(organization)">}else{<span class="dummy-25px"> </span>}<a href="@routes.OrganizationApp.organization(organization.name)"> |
|
9 | 9 |
<span class="bold">@organization.name</span> |
10 | 10 |
</a> |
11 | 11 |
</li> |
--- app/views/index/myProjectList.scala.html
+++ app/views/index/myProjectList.scala.html
... | ... | @@ -5,26 +5,23 @@ |
5 | 5 |
<ul class="tab-pane unstyled my-project-item" id="@title"> |
6 | 6 |
@for(project <- projects){ |
7 | 7 |
<li class="my-list-item" data-value="@if(project.owner != currentUser.loginId) {@project.owner / }@project.name"> |
8 |
- @if(project.owner != currentUser.loginId) { |
|
9 |
- <a href="@routes.UserApp.userInfo(project.owner)">@project.owner</a> / |
|
10 |
- } |
|
8 |
+ @if(hasProjectLogo(project)){<img src="@urlToProjectLogo(project)" alt="@project.name"/>} else{<span class="dummy-25px"> </span>} |
|
11 | 9 |
<a href="@routes.ProjectApp.project(project.owner, project.name)" class="project-name"> |
12 | 10 |
<strong>@project.name @if(project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
13 | 11 |
</a> |
12 |
+ <span class="gray-txt small-font">of <a href="@routes.UserApp.userInfo(project.owner)" >@project.owner</a></span> |
|
14 | 13 |
</li> |
15 | 14 |
} |
16 | 15 |
</ul> |
17 | 16 |
} |
18 | 17 |
@defining(currentUser.getVisitedProjects(10)){ visitedProjects => |
19 | 18 |
<ul class="tab-pane unstyled my-project-item active" id="recentlyVisited"> |
20 |
-@for(pv <- visitedProjects){ |
|
21 |
- <li class="my-list-item" data-value="@if(pv.project.owner != currentUser.loginId) {@pv.project.owner / }@pv.project.name"> |
|
22 |
- @if(pv.project.owner != currentUser.loginId) { |
|
23 |
- <a href="@routes.UserApp.userInfo(pv.project.owner)">@pv.project.owner</a> / |
|
24 |
- } |
|
25 |
- <a href="@routes.ProjectApp.project(pv.project.owner, pv.project.name)" class="project-name"> |
|
26 |
- <strong>@pv.project.name @if(pv.project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
19 |
+@for(visited <- visitedProjects){ |
|
20 |
+ <li class="my-list-item" data-value="@if(visited.project.owner != currentUser.loginId) {@visited.project.owner / }@visited.project.name"> |
|
21 |
+ @if(hasProjectLogo(visited.project)){<img src="@urlToProjectLogo(visited.project)" alt="@visited.project.name"/>} else{<span class="dummy-25px"> </span>}<a href="@routes.ProjectApp.project(visited.project.owner, visited.project.name)" class="project-name"> |
|
22 |
+ <strong>@visited.project.name @if(visited.project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
27 | 23 |
</a> |
24 |
+ <span class="gray-txt small-font">of <a href="@routes.UserApp.userInfo(visited.project.owner)" >@visited.project.owner</a></span> |
|
28 | 25 |
</li> |
29 | 26 |
} |
30 | 27 |
</ul> |
--- app/views/organization/header.scala.html
+++ app/views/organization/header.scala.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 |
</div> |
12 | 12 |
<div class="project-breadcrumb-wrap"> |
13 | 13 |
<div class="project-breadcrumb"> |
14 |
- <span class="project-author"><a href="@routes.OrganizationApp.organization(org.name)">@org.name</a></span> |
|
14 |
+ <span class="project-author"><span class="group-title-head">group</span><a href="@routes.OrganizationApp.organization(org.name)">@org.name</a></span> |
|
15 | 15 |
</div> |
16 | 16 |
</div> |
17 | 17 |
</div> |
+++ public/images/bg-samples/yobi_bg01.jpg
Binary file is not shown |
+++ public/images/bg-samples/yobi_bg02.jpg
Binary file is not shown |
+++ public/images/group_default.png
Binary file is not shown |
+++ public/images/projet_deault.png
Binary file is not shown |
+++ public/images/yobi_bg01.jpg
Binary file is not shown |
+++ public/images/yobi_bg02.jpg
Binary file is not shown |
+++ public/images/yobi_bg03.jpg
Binary file is not shown |
+++ public/images/yobi_bg04.jpg
Binary file is not shown |
+++ public/images/yobi_bg05.jpg
Binary file is not shown |
+++ public/images/yobi_bg06.jpg
Binary file is not shown |
+++ public/images/yobi_bg07.jpg
Binary file is not shown |
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?