Permalink
Browse files

Implemented cross references to class documentation from hierarchy page.

  • Loading branch information...
1 parent b808277 commit 75c13718fb30551aa5e4b20dd3445135125cb6d6 @tomaz committed Dec 22, 2010
Showing with 4 additions and 1 deletion.
  1. +3 −0 Generating/GBHTMLTemplateVariablesProvider.m
  2. +1 −1 Templates/html/hierarchy-template.html
@@ -412,8 +412,11 @@ - (NSArray *)arrayFromHierarchyLevel:(NSDictionary *)level {
NSMutableArray *result = [NSMutableArray arrayWithCapacity:[level count]];
[level enumerateKeysAndObjectsUsingBlock:^(NSString *name, NSDictionary *data, BOOL *stop) {
NSArray *subclasses = [self arrayFromHierarchyLevel:[data objectForKey:@"subclasses"]];
+ GBClassData *class = [self.store classWithName:name];
+ NSString *href = [self hrefForObject:class fromObject:nil];
NSMutableDictionary *classData = [NSMutableDictionary dictionary];
[classData setObject:name forKey:@"name"];
+ if (href) [classData setObject:href forKey:@"href"];
[classData setObject:subclasses forKey:@"classes"];
[classData setObject:[subclasses count] > 0 ? [GRYes yes] : [GRNo no] forKey:@"hasClasses"];
[result addObject:classData];
@@ -57,7 +57,7 @@ <h2 class="index-title">{{strings/hierarchyPage/categoriesTitle}}</h2>
{{#hasClasses}}
<ul>
{{#classes}}
- <li>{{name}}{{>Classes}}</li>
+ <li>{{#href}}<a href="{{href}}">{{/href}}{{name}}{{#href}}</a>{{/href}}{{>Classes}}</li>
{{/classes}}
</ul>
{{/hasClasses}}

0 comments on commit 75c1371

Please sign in to comment.