--- 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
... | ... | @@ -5441,5 +5441,14 @@ |
5441 | 5441 |
height: 20px; |
5442 | 5442 |
.border-radius(3px); |
5443 | 5443 |
border: 1px solid #ececec; |
5444 |
+ margin-right: 3px; |
|
5444 | 5445 |
} |
5446 |
+ .dummy-25px { |
|
5447 |
+ width: 25px; |
|
5448 |
+ display: inline-block; |
|
5449 |
+ } |
|
5450 |
+} |
|
5451 |
+ |
|
5452 |
+.dropdown-menu>li { |
|
5453 |
+ .my-list-item; |
|
5445 | 5454 |
}(No newline at end of file) |
--- app/assets/stylesheets/less/_yobiUI.less
+++ app/assets/stylesheets/less/_yobiUI.less
... | ... | @@ -1031,7 +1031,7 @@ |
1031 | 1031 |
> a { |
1032 | 1032 |
.border-radius(3px); |
1033 | 1033 |
color:#292929; |
1034 |
- padding: 3px 20px 5px; |
|
1034 |
+ padding: 3px 40px 5px 15px; |
|
1035 | 1035 |
background-color:transparent !important; |
1036 | 1036 |
.transition(all 0.2s ease); |
1037 | 1037 |
|
--- app/utils/TemplateHelper.scala
+++ app/utils/TemplateHelper.scala
... | ... | @@ -139,6 +139,13 @@ |
139 | 139 |
} |
140 | 140 |
} |
141 | 141 |
|
142 |
+ def hasProjectLogo(project: Project) = { |
|
143 |
+ models.Attachment.findByContainer(project.asResource) match { |
|
144 |
+ case files if files.size > 0 => true |
|
145 |
+ case _ => false |
|
146 |
+ } |
|
147 |
+ } |
|
148 |
+ |
|
142 | 149 |
/** |
143 | 150 |
* get branch item name |
144 | 151 |
* @param branch |
... | ... | @@ -227,6 +234,13 @@ |
227 | 234 |
} |
228 | 235 |
} |
229 | 236 |
|
237 |
+ def hasOrganizationLogo(organization: Organization) = { |
|
238 |
+ models.Attachment.findByContainer(organization.asResource) match { |
|
239 |
+ case files if files.size > 0 => true |
|
240 |
+ case _ => false |
|
241 |
+ } |
|
242 |
+ } |
|
243 |
+ |
|
230 | 244 |
object DiffRenderer { |
231 | 245 |
|
232 | 246 |
def removedWord(word: String) = "<span class='remove'>" + word + "</span>" |
--- 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 |
- <img src="@urlToOrganizationLogo(organization)"><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,9 +5,11 @@ |
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(hasProjectLogo(project)){<img src="@urlToProjectLogo(project)" alt="@project.name"/>} else{<span class="dummy-25px"> </span>} |
|
8 | 9 |
<a href="@routes.ProjectApp.project(project.owner, project.name)" class="project-name"> |
9 |
- <img src="@urlToProjectLogo(project)" alt="@project.name"/> <strong>@project.name @if(project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
10 |
+ <strong>@project.name @if(project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
|
10 | 11 |
</a> |
12 |
+ <span class="gray-txt small-font">of <a href="@routes.UserApp.userInfo(project.owner)" >@project.owner</a></span> |
|
11 | 13 |
</li> |
12 | 14 |
} |
13 | 15 |
</ul> |
... | ... | @@ -16,9 +18,10 @@ |
16 | 18 |
<ul class="tab-pane unstyled my-project-item active" id="recentlyVisited"> |
17 | 19 |
@for(visited <- visitedProjects){ |
18 | 20 |
<li class="my-list-item" data-value="@if(visited.project.owner != currentUser.loginId) {@visited.project.owner / }@visited.project.name"> |
19 |
- <img src="@urlToProjectLogo(visited.project)" alt="@visited.project.name"/><a href="@routes.ProjectApp.project(visited.project.owner, visited.project.name)" class="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"> |
|
20 | 22 |
<strong>@visited.project.name @if(visited.project.isPrivate){ <i class="yobicon-lock yobicon-small"></i> }</strong> |
21 | 23 |
</a> |
24 |
+ <span class="gray-txt small-font">of <a href="@routes.UserApp.userInfo(visited.project.owner)" >@visited.project.owner</a></span> |
|
22 | 25 |
</li> |
23 | 26 |
} |
24 | 27 |
</ul> |
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?