THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

Added default image for project logo

tags/v1.0.0-beta
Hwi Ahn 7 years ago
parent
commit
2390cc391b
3 changed files with 6 additions and 1 deletions
  1. +1
    -0
      app/controllers/ProjectApp.java
  2. +5
    -1
      app/views/project/setting.scala.html
  3. BIN
      public/images/project_image_default.jpg

+ 1
- 0
app/controllers/ProjectApp.java View File

@@ -77,6 +77,7 @@ public class ProjectApp extends Controller {
if(filePart != null){
File file = new File("public/uploadFiles/" + filePart.getFilename());
filePart.getFile().renameTo(file);
project.logoPath = filePart.getFilename();
}


+ 5
- 1
app/views/project/setting.scala.html View File

@@ -27,8 +27,12 @@
)
<div class="thumbnail">
<img src="@routes.Assets.at("uploadFiles/" + projectForm("logoPath").value)" alt="">
@if(projectForm("logoPath").value != null) {
<img src="@routes.Assets.at("uploadFiles/" + projectForm("logoPath").value)" alt="" width="234" height="168">
<h5>@projectForm("logoPath").value</h5>
} else {
<img src="@routes.Assets.at("images/project_image_default.jpg")" alt="" width="234" height="168">
}
</div>
@inputFile(


BIN
public/images/project_image_default.jpg View File

Before After
Width: 234  |  Height: 82  |  Size: 2.5 KiB

Loading…
Cancel
Save