Skip to content

Commit 15a8cd7

Browse files
committed
close creativecommons#367 - improve applicant flow when log in
1 parent 42fb983 commit 15a8cd7

File tree

7 files changed

+40
-5
lines changed

7 files changed

+40
-5
lines changed

frontend-redesign/scss/widgets.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@
6161
.status-content {
6262
display: flex;
6363
.status-action {
64+
display: flex;
6465
margin-left: 1rem;
66+
.button {
67+
&:first-child {
68+
margin-right: .5rem;
69+
}
70+
}
6571
}
6672
}
6773
}

plugins/cc-global-network/includes/application-state.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,10 @@ function ccgn_show_current_application_status($user_id) {
382382
'title' => "Let's get started",
383383
'msg' => 'You should begin your application process',
384384
'class' => 'success',
385-
'link' => $link_form,
386-
'link_text' => 'Application form'
385+
'link' => site_url('sign-up/individual/form'),
386+
'link_text' => 'Individual Application',
387+
'link2' => site_url('sign-up/institution/form'),
388+
'link_text2' => 'Institutional Application',
387389
),
388390
'charter-form' => array(
389391
'step' => 1,

themes/cc-commoners-2019/assets/css/style.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6716,7 +6716,10 @@ a {
67166716
.widget.user-status .widget-content .dropdown-pane .status-content {
67176717
display: flex; }
67186718
.widget.user-status .widget-content .dropdown-pane .status-content .status-action {
6719+
display: flex;
67196720
margin-left: 1rem; }
6721+
.widget.user-status .widget-content .dropdown-pane .status-content .status-action .button:first-child {
6722+
margin-right: .5rem; }
67206723

67216724
.widget.big-search {
67226725
position: relative;

themes/cc-commoners-2019/functions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@
9797
),
9898
'Logged inactive - Home - second row' => array(
9999
'name' => 'home-logged-inactive-second'
100+
),
101+
'Logged inactive (no form yet) - Home - second row' => array(
102+
'name' => 'home-logged-inactive-no-form-second'
100103
),
101104
'Logged inactive - Home - third row' => array(
102105
'name' => 'home-logged-inactive-third'

themes/cc-commoners-2019/header.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,14 @@
4949
if ( is_user_logged_in() ) {
5050
$current_user = get_user_by( 'ID', get_current_user_id());
5151
$member_or_applicant = ( bp_commoners::current_user_is_accepted() )? 'member' : 'applicant';
52-
$individual_or_institutional = (ccgn_member_is_individual( get_current_user_id() )) ? 'Individual' : 'Institutional';
53-
$user_type = ' ( '.$individual_or_institutional.' '.$member_or_applicant.' ) ';
52+
//$individual_or_institutional = () ? 'Individual' : 'Institutional';
53+
$usert_type = '';
54+
if ( ccgn_user_is_individual_applicant( get_current_user_id() ) ) {
55+
$user_type = ' ( Individual '.$member_or_applicant.' ) ';
56+
} else if ( ccgn_user_is_institutional_applicant( get_current_user_id() ) ) {
57+
$user_type = ' ( Insitutional '.$member_or_applicant.' ) ';
58+
}
59+
5460
echo '<div class="status-bar">';
5561
echo '<div class="grid-container">';
5662
echo '<div class="grid-x align-justify">';

themes/cc-commoners-2019/inc/partials/home-logged-in-not-accepted.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
</div>
88
</section>
99
<?php endif; ?>
10+
<?php if ( is_active_sidebar( 'home-logged-inactive-no-form-second' ) && ( !ccgn_user_is_individual_applicant( get_current_user_id() ) && !ccgn_user_is_institutional_applicant( get_current_user_id() ) ) ): ?>
11+
<section class="sidebar sidebar-second no-form inner-space">
12+
<div class="grid-container">
13+
<div class="grid-x">
14+
<?php dynamic_sidebar( 'home-logged-inactive-no-form-second' ) ?>
15+
</div>
16+
</div>
17+
</section>
18+
<?php endif; ?>
1019
<?php if ( is_active_sidebar( 'home-logged-inactive-second' ) ): ?>
1120
<section class="sidebar sidebar-second inner-space">
1221
<div class="grid-container">

themes/cc-commoners-2019/inc/widgets/ccgn_widget_user_status.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ function widget($args, $instance) {
5757
echo '<p>'.$application_status['step']['msg'].'</p>';
5858
echo '<div class="status-action">';
5959
if ( !empty( $application_status['step']['link'] ) ) {
60-
echo '<a href="'.$application_status['step']['link'].'" class="button primary">'.$application_status['step']['link_text'].'</a>';
60+
echo '<a href="'.$application_status['step']['link'].'" class="button small primary">'.$application_status['step']['link_text'].'</a>';
61+
}
62+
if ( !empty( $application_status['step']['link2'] ) ) {
63+
echo '<a href="'.$application_status['step']['link2'].'" class="button small primary">'.$application_status['step']['link_text2'].'</a>';
6164
}
6265
echo '</div>';
6366
echo '</div>';
@@ -71,6 +74,9 @@ function widget($args, $instance) {
7174
if ( !empty( $application_status['step']['link'] ) ) {
7275
echo '<a href="'.$application_status['step']['link'].'" class="button primary">'.$application_status['step']['link_text'].'</a>';
7376
}
77+
if ( !empty( $application_status['step']['link2'] ) ) {
78+
echo '<a href="'.$application_status['step']['link2'].'" class="button primary">'.$application_status['step']['link_text2'].'</a>';
79+
}
7480
echo '</div>';
7581
echo '</div>';
7682

0 commit comments

Comments
 (0)