Skip to content
Browse files

homepage updater

  • Loading branch information...
1 parent 6a32177 commit 7717503216803de97701f6da81096337758992f8 @witek witek committed Jan 11, 2012
View
7 src/main/java/scrum/server/project/HomepageUpdater.java
@@ -16,6 +16,7 @@
import ilarkesto.base.Proc;
import ilarkesto.base.Str;
+import ilarkesto.base.Sys;
import ilarkesto.base.Utl;
import ilarkesto.base.time.Date;
import ilarkesto.base.time.DateAndTime;
@@ -26,10 +27,12 @@
import ilarkesto.persistence.AEntity;
import java.io.File;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.Locale;
import java.util.Properties;
import scrum.client.wiki.Header;
@@ -70,7 +73,8 @@ public HomepageUpdater(Project project, String templatePath, String outputPath)
}
public HomepageUpdater(Project project) {
- this(project, project.getHomepageVelocityDir(), project.getHomepageDir());
+ this(project, project.getHomepageVelocityDir(), Sys.isDevelopmentMode() ? "runtimedata/homepage" : project
+ .getHomepageDir());
}
public void processAll() {
@@ -327,6 +331,7 @@ private void fillBlogEntry(ContextBuilder context, BlogEntry entry) {
context.put("plainText", wikiToText(entry.getText()));
DateAndTime date = entry.getDateAndTime();
context.put("date", date.toString(Date.FORMAT_LONGMONTH_DAY_YEAR));
+ context.put("dateDe", date.toString(new SimpleDateFormat("dd. MMMM yyyy", Locale.GERMANY)));
context.put("rssDate", date.toString(DateAndTime.FORMAT_RFC822));
fillComments(context, entry);
}
View
14 src/projectHomepage/velocity/VM_global_library.vm
@@ -150,13 +150,13 @@ pageTracker._trackPageview();
</div>
#end
-#if ( $entity.id )
- <div class="separator"></div>
- <div class="section">
- <h2>Post a comment</h2>
- #commentForm("postComment", $entity.id, "Your comment", $null, "Post comment")
- </div>
-#end
+ #if ( $entity.id )
+ <div class="separator"></div>
+ <div class="section">
+ <h2>Post a comment</h2>
+ #commentForm("postComment", $entity.id, "Your comment", $null, "Post comment")
+ </div>
+ #end
#end
View
2 src/projectHomepage/velocity/message.html.vm
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
-#header("home", "Message - Kunagi", "Kunagi Message", "Kunagi")
+#header("message", "Message - Kunagi", "Kunagi Message", "Kunagi")
<div class="section">
<span id="messageOutput"></span>

0 comments on commit 7717503

Please sign in to comment.
Something went wrong with that request. Please try again.