Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New properties for SZNAltmetricArticle #4

Merged
merged 16 commits into from Apr 11, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -20,6 +20,8 @@
1403C65C1704901D0027615A /* SZNAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1403C659170490170027615A /* SZNAppDelegate.m */; };
1403C65D170490200027615A /* SZNSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1403C65B170490170027615A /* SZNSearchViewController.m */; };
1403C6601704984D0027615A /* SZNArticleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1403C65F1704984D0027615A /* SZNArticleViewController.m */; };
14FFCB2417155F2300EFDBAA /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FFCB2317155F2300EFDBAA /* Icon.png */; };
14FFCB2617155F2E00EFDBAA /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14FFCB2517155F2E00EFDBAA /* Icon@2x.png */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -41,6 +43,8 @@
1403C65B170490170027615A /* SZNSearchViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SZNSearchViewController.m; path = classes/SZNSearchViewController.m; sourceTree = "<group>"; };
1403C65E1704984D0027615A /* SZNArticleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SZNArticleViewController.h; path = classes/SZNArticleViewController.h; sourceTree = "<group>"; };
1403C65F1704984D0027615A /* SZNArticleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SZNArticleViewController.m; path = classes/SZNArticleViewController.m; sourceTree = "<group>"; };
14FFCB2317155F2300EFDBAA /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
14FFCB2517155F2E00EFDBAA /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
76A0B4ED8C6F4082A1950B88 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = SOURCE_ROOT; };
DF9E98A725724DC08C8B8DBB /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -114,6 +118,8 @@
1403C64717048FCD0027615A /* Default.png */,
1403C64917048FCD0027615A /* Default@2x.png */,
1403C64B17048FCD0027615A /* Default-568h@2x.png */,
14FFCB2517155F2E00EFDBAA /* Icon@2x.png */,
14FFCB2317155F2300EFDBAA /* Icon.png */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -176,6 +182,8 @@
1403C64A17048FCD0027615A /* Default@2x.png in Resources */,
1403C64C17048FCD0027615A /* Default-568h@2x.png in Resources */,
1403C64F17048FCD0027615A /* MainStoryboard.storyboard in Resources */,
14FFCB2417155F2300EFDBAA /* Icon.png in Resources */,
14FFCB2617155F2E00EFDBAA /* Icon@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -5,9 +5,22 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<string>SZNAltmetric</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
</array>
<key>UIPrerenderedIcon</key>
<true/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.shazino.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -26,6 +39,8 @@
<true/>
<key>UIMainStoryboardFile</key>
<string>MainStoryboard</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
Expand Down
Expand Up @@ -18,4 +18,33 @@
@property (weak, nonatomic) IBOutlet UILabel *scoreLabel;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@property (weak, nonatomic) IBOutlet UILabel *altmetricIdentifierLabel;
@property (weak, nonatomic) IBOutlet UILabel *DOILabel;
@property (weak, nonatomic) IBOutlet UILabel *arXivLabel;
@property (weak, nonatomic) IBOutlet UILabel *NLMIdentifierLabel;
@property (weak, nonatomic) IBOutlet UILabel *pubMedIdentifierLabel;
@property (weak, nonatomic) IBOutlet UILabel *ADSBibcodeLabel;

@property (weak, nonatomic) IBOutlet UILabel *journalLabel;
@property (weak, nonatomic) IBOutlet UILabel *publishedOnLabel;
@property (weak, nonatomic) IBOutlet UILabel *lastUpdatedLabel;
@property (weak, nonatomic) IBOutlet UILabel *addedOnLabel;

@property (weak, nonatomic) IBOutlet UILabel *articleURLLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailsURLLabel;

@property (weak, nonatomic) IBOutlet UILabel *tweetersLabel;
@property (weak, nonatomic) IBOutlet UILabel *facebookUsersLabel;
@property (weak, nonatomic) IBOutlet UILabel *scienceBlogsLabel;
@property (weak, nonatomic) IBOutlet UILabel *googlePlusLabel;

@property (weak, nonatomic) IBOutlet UILabel *readersMendeleyLabel;
@property (weak, nonatomic) IBOutlet UILabel *readersCiteULikeLabel;
@property (weak, nonatomic) IBOutlet UILabel *readersConnoteaLabel;

@property (weak, nonatomic) IBOutlet UILabel *subjectsLabel;
@property (weak, nonatomic) IBOutlet UILabel *scopusSubjectsLabel;

@property (weak, nonatomic) IBOutlet UILabel *quotesLabel;

@end
Expand Up @@ -22,6 +22,8 @@ @implementation SZNArticleViewController
- (void)viewDidLoad
{
[super viewDidLoad];
((UIScrollView *)self.view).alwaysBounceVertical = YES;
((UIScrollView *)self.view).contentSize = CGSizeMake(self.view.frame.size.width, self.quotesLabel.frame.origin.y + 120);
[self configureViewWithArticle:self.article];
}

Expand All @@ -34,8 +36,39 @@ - (void)setArticle:(SZNAltmetricArticle *)article
- (void)configureViewWithArticle:(SZNAltmetricArticle *)article
{
self.titleLabel.text = self.article.title;
self.scoreLabel.text = [self.article.score stringValue];
[self.imageView setImageWithURL:self.article.imageLargeURL];
self.scoreLabel.text = [self.article.score stringValue];
self.altmetricIdentifierLabel.text = article.identifier;
self.DOILabel.text = article.DOI;
self.arXivLabel.text = article.arXiv;
self.NLMIdentifierLabel.text = article.NLMIdentifier;
self.pubMedIdentifierLabel.text = article.pubMedIdentifier;
self.ADSBibcodeLabel.text = article.ADSBibcode;
self.journalLabel.text = article.journal;

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateStyle = NSDateFormatterLongStyle;
dateFormatter.doesRelativeDateFormatting = YES;
self.publishedOnLabel.text = [dateFormatter stringFromDate:article.publishedOn];
self.lastUpdatedLabel.text = [dateFormatter stringFromDate:article.lastUpdated];
self.addedOnLabel.text = [dateFormatter stringFromDate:article.addedOn];

self.articleURLLabel.text = [article.articleURL absoluteString];
self.detailsURLLabel.text = [article.detailsURL absoluteString];

self.tweetersLabel.text = [article.citedByTweetersCount stringValue];
self.facebookUsersLabel.text = [article.citedByFacebookWallsCount stringValue];
self.scienceBlogsLabel.text = [article.citedByFeedsCount stringValue];
self.googlePlusLabel.text = [article.citedByGooglePlusCount stringValue];

self.readersMendeleyLabel.text = [article.readers[@"mendeley"] stringValue];
self.readersCiteULikeLabel.text = [article.readers[@"citeulike"] stringValue];
self.readersConnoteaLabel.text = [article.readers[@"connotea"] stringValue];

self.subjectsLabel.text = [article.subjects componentsJoinedByString:@", "];
self.scopusSubjectsLabel.text = [article.scopusSubjects componentsJoinedByString:@", "];

self.quotesLabel.text = [article.tweetQuotes componentsJoinedByString:@"\n"];
}

@end