push @{$change->{pages}}, { link => '...' } if $is_excess;
# Take the first line of the commit message as a summary.
- my $m=shift @{$change->{message}};
- $change->{summary}=$m->{line};
+ #my $m=shift @{$change->{message}};
+ #$change->{summary}=$m->{line};
+ #delete $change->{message} unless @{$change->{message}};
# See if the committer is an openid.
my $oiduser=IkiWiki::openiduser($change->{user});
# Fill out a template with the change info.
my $template=template("change.tmpl", blind_cache => 1);
- $template->param(%$change);
+ $template->param(
+ %$change,
+ commitdate => displaytime($change->{when}, "%x %x"),
+ wikiname => $config{wikiname},
+ );
$template->param(baseurl => "$config{url}/") if length $config{url};
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page, template => $template);
+Recent changes to this wiki:
+
[[recentchanges pages="*" num=100 template=change]]
-[[inline pages="recentchanges/change_* and !*/Discussion" show=0]]
+[[inline pages="recentchanges/change_* and !*/Discussion"
+template=inlinechange show=0]]
border-style: none;
}
-/* Stuff for the RecentChanges table. */
-tr.changeheader {
+div.recentchanges {
+ border-style: solid;
+ border-width: 1px;
+ overflow: auto;
+ width: 100%;
background: #eee;
color: black !important;
}
-tr.changeinfo {
- background: #eee;
+.recentchanges .metadata {
+ padding: 0px 0.5em;
+}
+.recentchanges .changelog {
+ font-style: italic;
+ clear: both;
+ display: block;
+ padding: 1px 2px;
+ background: white !important;
color: black !important;
}
-th.changeheader {
- padding: 1px .3em;
+.recentchanges .desc {
+ display: none;
+}
+.recentchanges .committer {
+ float: left;
+ margin: 0;
+ width: 40%;
}
-td.changeinfo {
- padding: 1px .3em;
+.recentchanges .committype {
+ float: left;
+ margin: 0;
+ width: 5%;
+ font-size: small;
}
-td.changetime {
- white-space: nowrap;
- padding: 1px .3em;
+.recentchanges .changedate {
+ float: left;
+ margin: 0;
+ width: 35%;
+ font-size: small;
}
-td.changelog {
- font-style: italic;
+.recentchanges .pagelinks {
+ float: right;
+ margin: 0;
+ width: 60%;
}
/* Used for adding a blog page. */
<TMPL_IF AUTHORURL>
[[meta authorurl="""<TMPL_VAR AUTHORURL>"""]]
</TMPL_IF>
-[[meta title="""<TMPL_VAR SUMMARY>"""]]
-<p class=changelog>
+[[meta title="""update of <TMPL_VAR WIKINAME>'s <TMPL_LOOP NAME="PAGES"> <TMPL_VAR PAGE></TMPL_LOOP>"""]]
+<div class=changelog>
<TMPL_LOOP NAME="MESSAGE">
<TMPL_IF NAME="LINE">
<TMPL_VAR NAME="LINE" ESCAPE="HTML"><br />
</TMPL_IF>
</TMPL_LOOP>
-</p>
-<p>
-<span class="changeinfo">
+</div>
+<div class="metadata">
+<span class="desc"><br />Changed pages:</span>
+<span class="pagelinks">
<TMPL_LOOP NAME="PAGES">
<TMPL_IF NAME="DIFFURL">
<a href="<TMPL_VAR NAME="DIFFURL">">
</TMPL_IF>
<TMPL_VAR LINK>
</TMPL_LOOP>
-changed via <TMPL_VAR NAME="COMMITTYPE">
+</span>
+<span class="desc"><br />Changed by:</span>
+<span class="committer">
+<TMPL_IF NAME="AUTHORURL">
+<a href="<TMPL_VAR NAME=AUTHORURL>"><TMPL_VAR NAME=USER></a>
+<TMPL_ELSE>
+<TMPL_VAR NAME=USER>
+</TMPL_IF>
+</span>
+<span class="desc"><br />Commit type:</span>
+<span class="committype"><TMPL_VAR COMMITTYPE></span>
+<span class="desc"><br />Date:</span>
+<span class="changedate"><TMPL_VAR COMMITDATE></span>
+</div>
<!-- <TMPL_VAR NAME="REV"> -->
<TMPL_IF FIRST>
-<div class="inlinechange">
+<div class="recentchanges">
</TMPL_IF>
<TMPL_VAR CONTENT>
-<span class="desc"><br />Date:</span>
-<span class="changedate">
-<TMPL_VAR CTIME>
-</span>
<TMPL_IF LAST>
</div>
</TMPL_IF>