Skip to content

Commit

Permalink
Merge pull request #74 from shikshalokam/Ed-1326
Browse files Browse the repository at this point in the history
ED-1326 fix
  • Loading branch information
aks30 authored Feb 22, 2023
2 parents 416ab2b + 50efe71 commit cfb46b5
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
32 changes: 31 additions & 1 deletion views/improvementProjectTaskTemplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,37 @@
<p><%= data.response.description %></p>
</div>
</div>
<% if ((data.response.title.length + data.response.description.length + data.response.programName.length) > 220) {%>
<% let projectNameLines = 0 %>
<% let programNameLines = 0 %>
<% let objectivesLines = 0 %>
<% if (data.response.title.length < 60) {%>
<% projectNameLines = 1 %>
<%} else { %>
<% projectNameLines = ~~(data.response.title.length / 60) %>
<% if ((data.response.title.length % 60) > 0 ) {%>
<% projectNameLines = projectNameLines + 1 %>
<%} %>
<% } %>

<% if (data.response.description.length < 50) {%>
<% programNameLines = 1 %>
<%} else { %>
<% programNameLines = ~~(data.response.description.length / 50) %>
<% if ((data.response.description.length % 50) > 0 ) {%>
<% programNameLines = programNameLines + 1 %>
<%} %>
<% } %>

<% if (data.response.programName.length < 50) {%>
<% objectivesLines = 1 %>
<%} else { %>
<% objectivesLines = ~~(data.response.programName.length / 50) %>
<% if ((data.response.programName.length % 50) > 0 ) {%>
<% objectivesLines = objectivesLines + 1 %>
<%} %>
<% } %>
<% let totalLines = projectNameLines + programNameLines + objectivesLines %>
<% if (totalLines > 4) {%>
<hr>
<% pageNo = pageNo + 1; %>
<div class="pageHeaderProject">
Expand Down
32 changes: 31 additions & 1 deletion views/improvementProjectTemplate.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,38 @@
<p><%= data.response.description %></p>
</div>
</div>
<% let projectNameLines = 0 %>
<% let programNameLines = 0 %>
<% let objectivesLines = 0 %>
<% if (data.response.title.length < 60) {%>
<% projectNameLines = 1 %>
<%} else { %>
<% projectNameLines = ~~(data.response.title.length / 60) %>
<% if ((data.response.title.length % 60) > 0 ) {%>
<% projectNameLines = projectNameLines + 1 %>
<%} %>
<% } %>

<% if (data.response.description.length < 50) {%>
<% programNameLines = 1 %>
<%} else { %>
<% programNameLines = ~~(data.response.description.length / 50) %>
<% if ((data.response.description.length % 50) > 0 ) {%>
<% programNameLines = programNameLines + 1 %>
<%} %>
<% } %>

<% if (data.response.programName.length < 50) {%>
<% objectivesLines = 1 %>
<%} else { %>
<% objectivesLines = ~~(data.response.programName.length / 50) %>
<% if ((data.response.programName.length % 50) > 0 ) {%>
<% objectivesLines = objectivesLines + 1 %>
<%} %>
<% } %>
<% let totalLines = projectNameLines + programNameLines + objectivesLines %>

<% if ((data.response.title.length + data.response.description.length + data.response.programName.length) > 220) {%>
<% if (totalLines > 4) {%>
<hr>
<% pageNo = pageNo + 1; %>
<div class="pageHeaderProject">
Expand Down

0 comments on commit cfb46b5

Please sign in to comment.