Skip to content

Commit

Permalink
Merge pull request #127 from Zolon-DOL/master
Browse files Browse the repository at this point in the history
Sprint 2 changes
  • Loading branch information
pbhatt17 authored Jul 31, 2020
2 parents b42cc67 + 1a589bd commit f4c418b
Show file tree
Hide file tree
Showing 6 changed files with 6,015 additions and 5,278 deletions.
50 changes: 10 additions & 40 deletions Child Labor/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="FQM-HS-dU1">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="FQM-HS-dU1">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
Expand Down Expand Up @@ -98,48 +98,18 @@
<segue destination="BPw-8l-f6p" kind="show" identifier="presentSecretaryForward" id="GQC-PM-1fW"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="QKR-yU-3UX" style="IBUITableViewCellStyleDefault" id="gN1-0C-dau">
<rect key="frame" x="0.0" y="162" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gN1-0C-dau" id="MhD-aG-oKY">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Child Labor Report" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="QKR-yU-3UX">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Gut-zs-cUE" style="IBUITableViewCellStyleDefault" id="VCF-ik-Ers">
<rect key="frame" x="0.0" y="206" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VCF-ik-Ers" id="u4K-yk-tbG">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Child and Forced Labor List of Goods" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Gut-zs-cUE">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="qWH-UK-IlE" style="IBUITableViewCellStyleDefault" id="C5b-IZ-qMd">
<rect key="frame" x="0.0" y="250" width="320" height="44"/>
</cells>
</tableViewSection>
<tableViewSection id="hKS-xE-Gga">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="5th-Ej-GGg" style="IBUITableViewCellStyleDefault" id="5LB-yf-d4x">
<rect key="frame" x="0.0" y="182" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="C5b-IZ-qMd" id="zrE-ow-YWR">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="5LB-yf-d4x" id="60N-hl-9DG">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Forced Child Labor List of Products" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="qWH-UK-IlE">
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Sweat &amp; Toil Magazine" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5th-Ej-GGg">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
Expand All @@ -154,7 +124,7 @@
<tableViewSection id="Dji-MW-50l">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="gc1-x9-jLs" style="IBUITableViewCellStyleDefault" id="xYl-2I-RJz">
<rect key="frame" x="0.0" y="314" width="320" height="44"/>
<rect key="frame" x="0.0" y="246" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xYl-2I-RJz" id="51P-PI-lgW">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
Expand Down
2 changes: 1 addition & 1 deletion Child Labor/CountryController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class CountryController: UITableViewController, UICollectionViewDataSource, UICo

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// If this is a TVPRA-only country, or one of British Indian Ocean Territories, Heard and McDonald Islands, or Pitcairn Island, it has no indicator or PDF buttons, so return 0 for both sections
if ["China", "Iran", "Malaysia", "Turkey", "North Korea", "Tajikistan", "Turkmenistan", "Vietnam", "British Indian Ocean Territories", "Heard and McDonald Islands", "Pitcairn Islands", "Russia", "Sudan"].contains(self.countryName) {
if ["China", "Iran", "Malaysia", "Turkey", "North Korea", "Taiwan", "Tajikistan", "Turkmenistan", "Vietnam", "British Indian Ocean Territories", "Heard and McDonald Islands", "Pitcairn Islands", "Russia", "Sudan"].contains(self.countryName) {
return 0

// Otherwise
Expand Down
1 change: 1 addition & 0 deletions Child Labor/GoodsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class GoodsTableViewController: UITableViewController, UISearchBarDelegate {

if #available(iOS 13.0, *) {
cell.imageView?.backgroundColor = .systemOrange
cell.imageView?.alpha = 1
} else {
// Fallback on earlier versions
}
Expand Down
40 changes: 20 additions & 20 deletions Child Labor/MoreInfoController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,44 +40,44 @@ class MoreInfoController: UITableViewController {

override func numberOfSections(in tableView: UITableView) -> Int {
//return 4
return 3
return 4
}

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:
return 2
case 1:
return 4
// case 2:
// return 1
return 1
case 2:
return 1

default:
return 1
}
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if (indexPath.section == 1) {
switch indexPath.row {
case 1:
UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/child_labor_reports/tda2018/ChildLaborReport.pdf")!)
break
case 2:
UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/ListofGoods.pdf")!)
break
case 3:
UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/EO_Report_2014.pdf")!)
default:
break
}
}
// if (indexPath.section == 1) {
// switch indexPath.row {
//
// case 1:
// UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/child_labor_reports/tda2018/ChildLaborReport.pdf")!)
// break
// case 2:
// UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/ListofGoods.pdf")!)
// break
// case 3:
// UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/EO_Report_2014.pdf")!)
// default:
// break
// }
// }

if (indexPath.section == 2) {
switch indexPath.row {
case 0:
UIApplication.shared.openURL(URL(string: "https://www.dol.gov/general/apps/ilab-comply-chain")!)
UIApplication.shared.openURL(URL(string: "https://www.dol.gov/sites/dolgov/files/ILAB/child_labor_reports/tda2019/SweatToil.pdf")!)
default:
break
}
Expand Down
Loading

0 comments on commit f4c418b

Please sign in to comment.