Skip to content

Commit 7e7397f

Browse files
authored
Merge pull request #159 from PrakashDurlabhji/dev
Implemented Join Project and Decline links in emails when a user is invited to the project.
2 parents f7ca1c2 + 5ee40ee commit 7e7397f

File tree

4 files changed

+69
-15
lines changed

4 files changed

+69
-15
lines changed

emails/src/partials/project-team.html

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,23 +105,51 @@
105105
<table class="main-child">
106106
<tr>
107107
<td class="empty-child-one"></td>
108-
<td class="second-child" align="center">
109-
{{#if notifications.[0].[connect.notification.project.member.invite.requested]}}
110-
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}#manageTopcoderTeam">
111-
Manage project team
112-
</a>
108+
{{#if notifications.[0].[connect.notification.project.member.invite.created]}}
109+
{{#if notifications.[0].[isSSO]}}
110+
<td class="second-child project-team" align="center">
111+
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}%3Finvitation%3Daccept">
112+
Join Project
113+
</a>
114+
</td>
115+
<td class="empty-child-10"></td>
116+
<td class="second-child project-team decline-sec" align="center">
117+
<a class="decline-btn" href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}%3Finvitation%3Ddecline">
118+
Decline
119+
</a>
120+
</td>
113121
{{else}}
114-
{{#if notifications.[0].[isSSO]}}
115-
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
116-
SSO Login
117-
</a>
118-
{{else}}
119-
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
120-
View project on Connect
121-
</a>
122-
{{/if}}
122+
<td class="second-child project-team" align="center">
123+
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}?invitation=accept">
124+
Join Project
125+
</a>
126+
</td>
127+
<td class="empty-child-10"></td>
128+
<td class="second-child project-team decline-sec" align="center">
129+
<a class="decline-btn" href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}?invitation=decline">
130+
Decline
131+
</a>
132+
</td>
123133
{{/if}}
124-
</td>
134+
{{else}}
135+
<td class="second-child project-team" align="center">
136+
{{#if notifications.[0].[connect.notification.project.member.invite.requested]}}
137+
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}#manageTopcoderTeam">
138+
Manage project team
139+
</a>
140+
{{else}}
141+
{{#if notifications.[0].[isSSO]}}
142+
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
143+
SSO Login
144+
</a>
145+
{{else}}
146+
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
147+
View project on Connect
148+
</a>
149+
{{/if}}
150+
{{/if}}
151+
</td>
152+
{{/if}}
125153
<td class="empty-child-one"></td>
126154
</tr>
127155
</table>

emails/src/styles/main.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ table.container, table.footer-container {
148148
height: 15px;
149149
background-color: #FFFFFF; }
150150

151+
.empty-child-10 {
152+
width: 10px; }
153+
151154
.post-details .main-child {
152155
background-color: #FFFFFF; }
153156
.post-details .main-child .empty-child-one {
@@ -220,6 +223,12 @@ table.container, table.footer-container {
220223
text-align: center;
221224
color: #FFFFFF;
222225
font-size: 13px; }
226+
.button-row .main-child .second-child.project-team.decline-sec {
227+
background-color: #FFFFFF; }
228+
.button-row .main-child .second-child.project-team a.decline-btn {
229+
color: #555555;
230+
border: 1px solid #808080;
231+
background-color: #FFFFFF; }
223232

224233
.button-one .main-child .empty-child-one, .button-three .main-child .empty-child-one {
225234
width: 216px; }

emails/src/styles/modules/_color.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ $grey-color: #888894;
88
$blue-color: #006DEA;
99
$grey-hyperlink: #808080;
1010
$button-color: #0681FF;
11+
$tc-gray-70: #555555;

emails/src/styles/partials/_base.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,10 @@ table.container, table.footer-container {
206206
}
207207
}
208208

209+
.empty-child-10 {
210+
width: 10px;
211+
}
212+
209213
// emptys end
210214

211215
// post details
@@ -321,6 +325,18 @@ table.container, table.footer-container {
321325
color: $white-background;
322326
font-size: 13px;
323327
}
328+
&.project-team {
329+
&.decline-sec {
330+
background-color: $white-background;
331+
}
332+
a {
333+
&.decline-btn {
334+
color: $tc-gray-70;
335+
border: 1px solid $grey-hyperlink;
336+
background-color: $white-background;
337+
}
338+
}
339+
}
324340
}
325341
}
326342
}

0 commit comments

Comments
 (0)