Skip to content
This repository has been archived by the owner on Feb 26, 2025. It is now read-only.

Commit

Permalink
update terms-tool css
Browse files Browse the repository at this point in the history
  • Loading branch information
queryluke committed Feb 15, 2020
1 parent f200dd9 commit 7ca017d
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ tests/_support/_generated/

# Workspace directory for IDE
/.idea

# Custom terms tool branding
licensing/css/custom.css
47 changes: 47 additions & 0 deletions licensing/css/base-terms.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*--- Terms Tool Design/Layout ---*/
#the-terms-titlebar {
width: 950px;
padding: 20px 0 15px 25px;
color: #fff;
background: #717171;
box-sizing: border-box;
margin-top: 20px;
}
#the-terms-titlebar h1 {
font-size: 21px;
}
#the-terms {
width: 100%;
background: #fff;
padding: 25px;
margin-bottom: 30px;
}
#the-terms>div {
width: 100%;
padding: 10px 20px 30px 20px;
box-sizing: border-box;
border-bottom: dotted 1px #b9b9b9;
}
#the-terms div {
font-size: 14px;
line-height: 18px;
margin-bottom: 10px;
}
#the-terms div strong {
display: block;
margin-bottom: 10px;
}
#the-terms .titleText {
font-size: 18px;
font-weight: 900;
display: block;
padding-top: 10px;
padding-bottom: 10px;
color: #3974a9;
}
#the-terms p a {
color: #63a0b7;
}
#the-terms div ul li {
color: #d24646;
}
2 changes: 2 additions & 0 deletions licensing/css/terms.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'base-terms.css';
@import 'custom.css';
23 changes: 12 additions & 11 deletions licensing/terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,36 +86,37 @@ function get_effective_date($documentId) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Terms Tool - License Terms</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/terms.css" type="text/css" />
</head>
<body>
<div style="margin:10px auto; width: 900px; background: white; padding: 20px; text-align: left;">
<div style="margin:10px auto; width: 900px; text-align: left;">
<?php if(!empty($error)): ?>
<p><?php echo $error; ?></p>
<?php else: ?>
<?php foreach($expressionTypes as $expressionType): ?>
<div class="darkShaded" style="width:664px; padding:8px; margin:0 0 7px 0;">
<div class="darkShaded" id="the-terms-titlebar">
<h1>
<?php echo $expressionType->shortName; ?> Terms <small>for <?php echo $termsToolObj->getTitle(); ?></small>
<?php echo $expressionType->shortName; ?> Terms for <?php echo $termsToolObj->getTitle(); ?>
</h1>
</div>
<div style="margin-left:5px;">
<div id="the-terms">
<?php foreach($expressionType->reorderTargets($targetsArray) as $i => $targetArray): ?>
<span class="titleText"><?php echo $targetArray['public_name']; ?></span>

<?php $expressionArray = $expressionType->getExpressionsByResource($targetArray['public_name']); ?>

<?php if (empty($expressionArray)): ?>
<p>No <?php echo $expressionType->shortName; ?> terms are defined.</p>
<p>No <?php echo $expressionType->shortName; ?> terms defined.</p>
<?php else: ?>
<?php foreach ($expressionArray as $expression): ?>
<p>
Terms as of <?php echo format_date($expression->getLastUpdateDate); ?> The following terms apply
Terms as of <?php echo format_date($expression->getLastUpdateDate); ?> — the following terms apply
ONLY to articles accessed via <a href="<?php echo $targetArray['target_url']; ?>" target="_blank">
<?php echo $targetArray['public_name']; ?>
</a>
</p>
<div style="margin:0 0 30px 20px;">
<div class="shaded" style="width:630px; padding:3px;">
<div style="margin:0 0 30px 0;">
<div class="shaded" style="width:850px; padding:3px;">
<?php
$qualifierArray = array();
// variables for permitted/prohibited qualifiers (this should match up with the available qualifiers in the license module)
Expand All @@ -135,7 +136,7 @@ function get_effective_date($documentId) {
}
}
?>
<strong> <?php echo $expressionType->shortName; ?> Notes:</strong> <?php if($icon): ?><img src="<?php echo $icon; ?>"><?php endif; ?>
<strong><?php echo $expressionType->shortName; ?> Notes:</strong> <?php if($icon): ?><img src="<?php echo $icon; ?>"><?php endif; ?>
<ul style="margin-left: 20px;">
<?php if (!empty($qualifierArray)): ?>
<li>Qualifier: <?php echo implode(", ", $qualifierArray); ?></li>
Expand All @@ -146,8 +147,8 @@ function get_effective_date($documentId) {
</ul>
</div>
<?php if ($expression->documentText): ?>
<div style="width:600px;">
<p><strong>From the license agreement <?php echo get_effective_date($expression->documentID); ?></strong></p>
<div style="width:850px;">
<p><strong>From the license agreement <?php echo get_effective_date($expression->documentID); ?>:</strong></p>
<p><em><?php echo nl2br($expression->documentText); ?></em></p>
</div>
<?php endif; ?>
Expand Down

0 comments on commit 7ca017d

Please sign in to comment.