issue history detial view
This commit is contained in:
parent
8e5c0ec534
commit
b541ae561c
|
@ -67,11 +67,11 @@
|
|||
if (lastProjectID < 0) {
|
||||
|
||||
}else {
|
||||
OZLProjectViewController* projectview = [[OZLProjectViewController alloc] initWithNibName:@"OZLProjectViewController" bundle:nil];
|
||||
OZLModelProject* data = [[OZLModelProject alloc] init];
|
||||
data.index = lastProjectID;
|
||||
[projectview setProjectData:data];
|
||||
[_navigationController pushViewController:projectview animated:NO];
|
||||
// OZLProjectViewController* projectview = [[OZLProjectViewController alloc] initWithNibName:@"OZLProjectViewController" bundle:nil];
|
||||
// OZLModelProject* data = [[OZLModelProject alloc] init];
|
||||
// data.index = lastProjectID;
|
||||
// [projectview setProjectData:data];
|
||||
// [_navigationController pushViewController:projectview animated:NO];
|
||||
}
|
||||
|
||||
self.window.rootViewController = _navigationController;
|
||||
|
|
|
@ -27,6 +27,10 @@
|
|||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "OZLModelTracker.h"
|
||||
#import "OZLModelUser.h"
|
||||
#import "OZLModelIssueStatus.h"
|
||||
#import "OZLModelIssuePriority.h"
|
||||
|
||||
@interface OZLSingleton : NSObject
|
||||
|
||||
|
@ -52,6 +56,9 @@
|
|||
@property (strong, nonatomic) NSArray* statusList;
|
||||
@property (strong, nonatomic) NSArray* userList;
|
||||
@property (strong, nonatomic) NSArray* timeEntryActivityList;
|
||||
|
||||
-(OZLModelTracker*)trackerWithId:(int)index;
|
||||
-(OZLModelIssuePriority*)issuePriorityWithId:(int)index;
|
||||
-(OZLModelIssueStatus*)issueStatusWithId:(int)index;
|
||||
-(OZLModelUser*)userWithId:(int)index;
|
||||
|
||||
@end
|
||||
|
|
|
@ -64,6 +64,7 @@ static OZLSingleton* sharedInstance = nil;
|
|||
return sharedInstance;
|
||||
}
|
||||
|
||||
#pragma mark getter and setter
|
||||
-(NSString*)redmineHomeURL
|
||||
{
|
||||
NSUserDefaults* userdefaults = [NSUserDefaults standardUserDefaults];
|
||||
|
@ -160,4 +161,48 @@ static OZLSingleton* sharedInstance = nil;
|
|||
[userdefaults setObject:[NSNumber numberWithInt:issueListSortType] forKey:USER_DEFAULTS_ISSUE_LIST_SORT];
|
||||
[userdefaults synchronize];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark data retrival
|
||||
-(OZLModelTracker*)trackerWithId:(int)index
|
||||
{
|
||||
for (OZLModelTracker* tracker in _trackerList) {
|
||||
if (tracker.index == index) {
|
||||
return tracker;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
-(OZLModelIssuePriority*)issuePriorityWithId:(int)index
|
||||
{
|
||||
for (OZLModelIssuePriority* priority in _priorityList) {
|
||||
if (priority.index == index) {
|
||||
return priority;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
|
||||
}
|
||||
-(OZLModelIssueStatus*)issueStatusWithId:(int)index
|
||||
{
|
||||
for (OZLModelIssueStatus* status in _statusList) {
|
||||
if (status.index == index) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
|
||||
}
|
||||
-(OZLModelUser*)userWithId:(int)index
|
||||
{
|
||||
for (OZLModelUser* user in _userList) {
|
||||
if (user.index == index) {
|
||||
return user;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -74,17 +74,17 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Status" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="M1J-3w-9Ev">
|
||||
<rect key="frame" x="20" y="11" width="98" height="21"/>
|
||||
<rect key="frame" x="20" y="11" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Priority" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9ij-IZ-PQa">
|
||||
<rect key="frame" x="182" y="11" width="98" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="9ij-IZ-PQa">
|
||||
<rect key="frame" x="111" y="11" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
|
@ -98,18 +98,18 @@
|
|||
<rect key="frame" x="10" y="0.0" width="300" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Author" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DJM-aG-CVN">
|
||||
<rect key="frame" x="20" y="11" width="98" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Priority" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="dvW-oB-ycc">
|
||||
<rect key="frame" x="20" y="11" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Assigned To" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QgQ-KR-O9g">
|
||||
<rect key="frame" x="182" y="11" width="98" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GI1-Hl-Beh">
|
||||
<rect key="frame" x="111" y="11" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
|
@ -117,26 +117,101 @@
|
|||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="43" id="Gaa-KU-Jq7">
|
||||
<rect key="frame" x="0.0" y="210" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="210" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="300" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Start" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kR0-QI-9kR">
|
||||
<rect key="frame" x="20" y="10" width="98" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Author" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="V9r-Hq-wat">
|
||||
<rect key="frame" x="20" y="10" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Due" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7TX-bt-6iV">
|
||||
<rect key="frame" x="182" y="10" width="98" height="21"/>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="JUa-vZ-Tn4">
|
||||
<rect key="frame" x="111" y="10" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="43" id="cI2-dw-1s8">
|
||||
<rect key="frame" x="0.0" y="253" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="300" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Assignee" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="oj5-mA-vxW">
|
||||
<rect key="frame" x="20" y="10" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="mXV-6C-xUC">
|
||||
<rect key="frame" x="111" y="10" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="43" id="Isl-CV-0Kn">
|
||||
<rect key="frame" x="0.0" y="296" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="300" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Start Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="tUJ-GL-xfU">
|
||||
<rect key="frame" x="20" y="10" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Dpz-B5-K7A">
|
||||
<rect key="frame" x="111" y="10" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" rowHeight="43" id="X7Z-Ic-QsS">
|
||||
<rect key="frame" x="0.0" y="339" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="300" height="42"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Due Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QaY-p1-Ndb">
|
||||
<rect key="frame" x="20" y="10" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6Bt-qa-bCK">
|
||||
<rect key="frame" x="111" y="10" width="169" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="highlightedColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
|
@ -146,7 +221,7 @@
|
|||
<tableViewSection id="xaD-2y-a9L">
|
||||
<cells>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="tZK-rw-oZG" style="IBUITableViewCellStyleDefault" id="kJL-SI-aru">
|
||||
<rect key="frame" x="0.0" y="274" width="320" height="45"/>
|
||||
<rect key="frame" x="0.0" y="403" width="320" height="45"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="1" width="280" height="43"/>
|
||||
|
@ -164,7 +239,7 @@
|
|||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="lsq-IE-inL" style="IBUITableViewCellStyleDefault" id="eUc-gI-k4g">
|
||||
<rect key="frame" x="0.0" y="319" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="448" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
|
||||
|
@ -181,7 +256,7 @@
|
|||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="O9o-aN-GPb" rowHeight="44" style="IBUITableViewCellStyleDefault" id="tiZ-Xc-Edh">
|
||||
<rect key="frame" x="0.0" y="363" width="320" height="44"/>
|
||||
<rect key="frame" x="0.0" y="492" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
|
||||
|
@ -199,7 +274,7 @@
|
|||
</view>
|
||||
</tableViewCell>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" accessoryType="disclosureIndicator" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" textLabel="Bwr-O8-sLJ" rowHeight="44" style="IBUITableViewCellStyleDefault" id="UBR-Vr-trT">
|
||||
<rect key="frame" x="0.0" y="407" width="320" height="45"/>
|
||||
<rect key="frame" x="0.0" y="536" width="320" height="45"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="10" y="0.0" width="280" height="43"/>
|
||||
|
@ -226,14 +301,14 @@
|
|||
</tableView>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<connections>
|
||||
<outlet property="assignedTo" destination="QgQ-KR-O9g" id="Anj-sv-D0B"/>
|
||||
<outlet property="author" destination="DJM-aG-CVN" id="ctm-TQ-pNA"/>
|
||||
<outlet property="assignedTo" destination="mXV-6C-xUC" id="fTB-sX-pdM"/>
|
||||
<outlet property="author" destination="JUa-vZ-Tn4" id="afv-VQ-V4W"/>
|
||||
<outlet property="description" destination="Q3W-JM-6Wz" id="7dx-Xg-XTk"/>
|
||||
<outlet property="dueTime" destination="7TX-bt-6iV" id="7nb-gx-ba8"/>
|
||||
<outlet property="priority" destination="9ij-IZ-PQa" id="GaT-Sb-BtP"/>
|
||||
<outlet property="dueTime" destination="6Bt-qa-bCK" id="VGK-Dq-rIc"/>
|
||||
<outlet property="priority" destination="GI1-Hl-Beh" id="xdK-AQ-ADo"/>
|
||||
<outlet property="progressbar" destination="S7C-6S-qdG" id="URk-Rs-hJK"/>
|
||||
<outlet property="startTime" destination="kR0-QI-9kR" id="CoL-rt-DVW"/>
|
||||
<outlet property="status" destination="M1J-3w-9Ev" id="pkH-8T-YnT"/>
|
||||
<outlet property="startTime" destination="Dpz-B5-K7A" id="4lR-x1-jJH"/>
|
||||
<outlet property="status" destination="9ij-IZ-PQa" id="361-52-5eX"/>
|
||||
<outlet property="subject" destination="Ifj-t9-HCz" id="bbw-9n-dVN"/>
|
||||
</connections>
|
||||
</tableViewController>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#import "OZLNetwork.h"
|
||||
#import "OZLModelIssueJournal.h"
|
||||
#import "OZLModelIssueJournalDetail.h"
|
||||
#import "OZLSingleton.h"
|
||||
|
||||
@interface OZLIssueHistoryViewController () {
|
||||
MBProgressHUD* _HUD;
|
||||
|
@ -54,7 +55,7 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
// Uncomment the following line to preserve selection between presentations.
|
||||
// self.clearsSelectionOnViewWillAppear = NO;
|
||||
|
||||
|
@ -65,7 +66,7 @@
|
|||
[self.view addSubview:_HUD];
|
||||
_HUD.labelText = @"Refreshing...";
|
||||
|
||||
[self.navigationItem setTitle:_issueData.subject];
|
||||
[self.navigationItem setTitle:@"History"];
|
||||
}
|
||||
|
||||
|
||||
|
@ -92,12 +93,12 @@
|
|||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 1;
|
||||
return _journalList.count;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return _journalList.count;
|
||||
return [[[_journalList objectAtIndex:section] detailArray] count];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
@ -107,11 +108,74 @@
|
|||
if (!cell) {
|
||||
cell = [[UITableViewCell alloc]
|
||||
initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.textLabel.textColor = [UIColor darkTextColor];
|
||||
cell.textLabel.font = [UIFont systemFontOfSize:14];
|
||||
}
|
||||
OZLModelIssueJournal* journal = [_journalList objectAtIndex:indexPath.row];
|
||||
[cell.textLabel setText: journal.user.name];
|
||||
[cell.detailTextLabel setText:[NSString stringWithFormat:@"number of change: %d",journal.detailArray.count]];
|
||||
OZLModelIssueJournalDetail* detail = [[[_journalList objectAtIndex:indexPath.section] detailArray] objectAtIndex:indexPath.row];
|
||||
NSString* content;
|
||||
if ([detail.name isEqualToString:@"done_ratio"]) {
|
||||
content = [NSString stringWithFormat:@"Done changed from %@ to %@",detail.oldValue,detail.freshValue];
|
||||
}else if([detail.name isEqualToString:@"tracker_id"]){
|
||||
OZLModelTracker* old = [[OZLSingleton sharedInstance] trackerWithId:[detail.oldValue intValue]];
|
||||
OZLModelTracker* new = [[OZLSingleton sharedInstance] trackerWithId:[detail.freshValue intValue]];
|
||||
content = [NSString stringWithFormat:@"Tracker changed from %@ to %@", old.name, new.name];
|
||||
|
||||
}else if([detail.name isEqualToString:@"priority_id"]) {
|
||||
OZLModelIssuePriority* old = [[OZLSingleton sharedInstance] issuePriorityWithId:[detail.oldValue intValue]];
|
||||
OZLModelIssuePriority* new = [[OZLSingleton sharedInstance] issuePriorityWithId:[detail.freshValue intValue]];
|
||||
content = [NSString stringWithFormat:@"Priority changed from %@ to %@", old.name, new.name];
|
||||
|
||||
}else if([detail.name isEqualToString:@"status_id"]) {
|
||||
OZLModelIssueStatus* old = [[OZLSingleton sharedInstance] issueStatusWithId:[detail.oldValue intValue]];
|
||||
OZLModelIssueStatus* new = [[OZLSingleton sharedInstance] issueStatusWithId:[detail.freshValue intValue]];
|
||||
content = [NSString stringWithFormat:@"Status changed from %@ to %@", old.name, new.name];
|
||||
}else if([detail.name isEqualToString:@"assigned_to_id"]) {
|
||||
OZLModelUser* new = [[OZLSingleton sharedInstance] userWithId:[detail.freshValue intValue]];
|
||||
content = [NSString stringWithFormat:@"Assignee set to %@", new.name];
|
||||
}else if([detail.name isEqualToString:@"estimated_hours"]){
|
||||
content = [NSString stringWithFormat:@"Estimated time changed from %.2f to %.2f", [detail.oldValue floatValue], [detail.freshValue floatValue]];
|
||||
}else if([detail.name isEqualToString:@"subject"]) {
|
||||
//content = [NSString stringWithFormat:@"Subject changed from %@ to %@",detail.oldValue, detail.freshValue];
|
||||
content = [NSString stringWithFormat:@"Subject changed to %@",detail.freshValue];
|
||||
}
|
||||
|
||||
[cell.textLabel setText:content];
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
UIView* view = [[UIView alloc ] initWithFrame:CGRectMake(0, 0, 320, 44)];
|
||||
view.backgroundColor = [UIColor lightGrayColor];
|
||||
|
||||
OZLModelIssueJournal* journal = [_journalList objectAtIndex:section];
|
||||
UILabel* nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 2, 160, 20)];
|
||||
[nameLabel setText: journal.user.name];
|
||||
nameLabel.font = [UIFont systemFontOfSize:12];
|
||||
nameLabel.backgroundColor = [UIColor clearColor];
|
||||
nameLabel.textColor = [UIColor darkTextColor];
|
||||
[view addSubview:nameLabel];
|
||||
|
||||
UILabel* timeLable = [[UILabel alloc] initWithFrame:CGRectMake(160, 2, 160, 20)];
|
||||
[timeLable setText: journal.createdOn];
|
||||
timeLable.font = [UIFont systemFontOfSize:12];
|
||||
timeLable.backgroundColor = [UIColor clearColor];
|
||||
timeLable.textColor = [UIColor lightTextColor];
|
||||
[view addSubview:timeLable];
|
||||
|
||||
UILabel* notesLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 24, 300, 20)];
|
||||
[notesLable setText: journal.notes];
|
||||
notesLable.font = [UIFont systemFontOfSize:12];
|
||||
notesLable.backgroundColor = [UIColor clearColor];
|
||||
notesLable.textColor = [UIColor lightTextColor];
|
||||
[view addSubview:notesLable];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
return 44.0;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue