Skip to content

Commit 23c99a7

Browse files
committed
brotherbard#89: Don't link to current commit
1 parent 9898579 commit 23c99a7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

PBWebCommitController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,12 @@ - (NSString *)htmlForHeader:(NSArray *)header withRefs:(NSString *)badges
244244

245245
}else{
246246
if([[item objectForKey:kHeaderKeyContent] isKindOfClass:[NSString class]]){
247-
[refs appendString:[NSString stringWithFormat:@"<tr><td>%@</td><td><a href='' onclick='selectCommit(this.innerHTML); return false;'>%@</a></td></tr>",[item objectForKey:kHeaderKeyName],[item objectForKey:kHeaderKeyContent]]];
247+
NSString *name=[item objectForKey:kHeaderKeyName];
248+
if([name isEqualToString:@"commit"]){
249+
[refs appendString:[NSString stringWithFormat:@"<tr><td>%@&nbsp;:</td><td><p>%@</p></td></tr>",name,[item objectForKey:kHeaderKeyContent]]];
250+
}else{
251+
[refs appendString:[NSString stringWithFormat:@"<tr><td>%@&nbsp;:</td><td><a href='' onclick='selectCommit(this.innerHTML); return false;'>%@</a></td></tr>",name,[item objectForKey:kHeaderKeyContent]]];
252+
}
248253
}else{ // NSDictionary: author or committer
249254
NSDictionary *content = [item objectForKey:kHeaderKeyContent];
250255
NSString *email = [content objectForKey:kAuthorKeyEmail];

html/views/history/history.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,12 @@ a.showdiff {
264264
background-image: -webkit-gradient(linear,left top,left bottom, color-stop(.7, #EAF2f6), color-stop(1, #e3ebf3));
265265
}
266266

267-
#header table.references a {
267+
#header table.references td{
268+
text-align:right;
269+
}
270+
271+
#header table.references a,
272+
#header table.references p{
268273
font-family: Menlo, Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;
269274
}
270275

0 commit comments

Comments
 (0)