issue history logic done, with rough ui

This commit is contained in:
zhijie 2013-07-23 16:24:03 +08:00
parent e60bd809d1
commit d086ff1b2c
3 changed files with 11 additions and 5 deletions

View File

@ -44,7 +44,8 @@
NSMutableArray* detailItems = [[NSMutableArray alloc] init];
NSArray* dataArray = [dic objectForKey:@"details"];
for (NSDictionary* detailDic in dataArray) {
[detailItems addObject:[[OZLModelIssueJournalDetail alloc] initWithDictionary:detailDic]];
OZLModelIssueJournalDetail* detail = [[OZLModelIssueJournalDetail alloc] initWithDictionary:detailDic];
[detailItems addObject:detail];
}
_detailArray = detailItems;
return self;

View File

@ -45,7 +45,11 @@
_createdOn = [dic objectForKey:@"created_on"];
_lastLoginIn = [dic objectForKey:@"last_login_on"];
_name = _login;
_name = [dic objectForKey:@"name"];
if (_name == nil) {
_name = _login;
}
return self;
}

View File

@ -103,13 +103,14 @@
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"timeEntryCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ];
if (!cell) {
cell = [[UITableViewCell alloc]
initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
}
OZLModelIssueJournal* journal = [_journalList objectAtIndex:indexPath.row];
cell.textLabel.text = journal.user.name;
[cell.textLabel setText: journal.user.name];
[cell.detailTextLabel setText:[NSString stringWithFormat:@"number of change: %d",journal.detailArray.count]];
return cell;
}