Commits

Travis Odom committed f3720a7 Draft

Line break handling added to templates, removed uneeded quote stripping

  • Participants
  • Parent commits 91ccd65

Comments (0)

Files changed (4)

src/controller/lsdg_site_main_controller.erl

 	if Make =:= "make" ->
 		T = io_lib:format("~p-~2..0B-~2..0B", tuple_to_list(date())),
 		AnnText = lists:flatten(io_lib:format("Event: ~s - ~s: ~s", [DateIn, NameIn, DescIn])),
-		Strip = lists:filter(fun(X) -> case X of 34 -> false; _ -> true end end, AnnText),
 		NewAnn = announcement:new(id, AnnText, lists:flatten(T), now()),
 		{ok, SavedAnn} = NewAnn:save();
 		true -> ok

src/view/main/eventdetail.html

 		</tr>
 		<tr>
 			<td class="fields">Description: </td>
-			<td>{{ selected.description }}</td>
+			<td>{{ selected.description|linebreaks }}</td>
 		</tr>
 	</table>
 	{% endif %}

src/view/main/home.html

 						{% if announcements %}
 							{% for item in announcements %}
 							<li>
-							<p class="sbdate">{{ item.datestamp }}</p><p class="text">{{ item.text }}</p></li>
+							<p class="sbdate">{{ item.datestamp }}</p><p class="text">{{ item.text|linebreaks }}</p></li>
 							{% endfor %}
 							<li><a href="{% url action="listannounce" %}">All Announcements</a></li>
 						{% else %}

src/view/main/listevent.html

 		</tr>
 		<tr>
 			<td class="fields">Description: </td>
-			<td>{{ item.description }}</td>
+			<td>{{ item.description|linebreaks }}</td>
 		</tr>
 	</table>
 	<hr style="clear: both; width: 400px; position: relative; left: -220px;">