Fix empty lab showing, fix old disqus being lost.

This commit is contained in:
Thomas Hounsell 2015-05-31 17:56:42 +01:00
parent 1c88bf257d
commit 894cc9fad8

View File

@ -75,8 +75,15 @@
@Html.LabelFor(model => model.Lab, new { @class = "control-label col-sm-4" })
<div class="col-sm-8">
<p class="form-control-static">
@Model.Lab<br />
<a href="@Url.Action("viewLab", new { lab = Model.Lab })" class="more-link"><i class="fa fa-plus-square-o fa-sm"></i> Find more builds from @Model.Lab</a>
@if (string.IsNullOrEmpty(Model.Lab))
{
<em>No lab string</em>
}
else
{
@Model.Lab<br />
<a href="@Url.Action("viewLab", new { lab = Model.Lab })" class="more-link"><i class="fa fa-plus-square-o fa-sm"></i> Find more builds from @Model.Lab</a>
}
</p>
</div>
</div>
@ -141,7 +148,7 @@
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'buildfeed';
var disqus_url = 'https://buildfeed.net' + '@Url.Action()';
var disqus_url = 'https://buildfeed.net/actions/info/@Model.Id/' ;
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;