|
@using MvcBasic.Logic;
@using MvcBasicSite.Models;
@using MvcBasicSite.Models.Helpers;
@{
int culture = SiteSession.CurrentUICulture;
//
// Get the user name from site session.
//
string username = null;
if (Session["SiteSession"] != null)
{
SiteSession shopSession = (SiteSession)Session["SiteSession"];
username = shopSession.Username;
}
}
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="header-table">
<tr>
<td colspan="2">
<div id="logindisplay">
@if (username != null)
{
<text>@Resources.Resource.HeaderPartialWelcome <strong>@username</strong>! [ @Html.ActionLink(@Resources.Resource.HeaderPartialLogoff, "Logoff", "Account")]</text>
}
else
{
@Html.ActionLink(Resources.Resource.HeaderPartialLogon, "LogOn", "Account")
}
</div>
</td>
<td style="width: 100px;">
<select class="currentCulture" name="selectCulture" id="_cultureDDL" onchange="changeCurrentCulture(this.value)">
@if (culture == 1)
{
<option value="0" title="@Url.Content("~/Content/Images/flag_En.png")">English</option>
<option value="1" title="@Url.Content("~/Content/Images/flag_Ro.png")" selected="selected">
Română</option>
<option value="2" title="@Url.Content("~/Content/Images/flag_De.png")">Deutsch</option>
}
else if (culture == 2)
{
<option value="0" title="@Url.Content("~/Content/Images/flag_En.png")">English</option>
<option value="1" title="@Url.Content("~/Content/Images/flag_Ro.png")">Română</option>
<option value="2" title="@Url.Content("~/Content/Images/flag_De.png")" selected="selected">
Deutsch</option>
}
else
{
<option value="0" title="@Url.Content("~/Content/Images/flag_En.png")" selected="selected">
English</option>
<option value="1" title="@Url.Content("~/Content/Images/flag_Ro.png")">Română</option>
<option value="2" title="@Url.Content("~/Content/Images/flag_De.png")">Deutsch</option>
}
</select>
</td>
</tr>
<tr>
<td id="headerLeftImage">
@if (MvcBasicSite.Controllers.SiteSettingController.HasHeaderImage)
{
@Html.ImageFromStream("Home", "SiteSetting", "GetHeaderImage", 7, new { id = "_leftImage" })
}
else
{
<img id="_leftImage" src="@Url.Content("~/Content/Images/HeaderLogo.png")"/>
}
</td>
<td>
<div class="headerTitle">
@MvcBasicSite.Controllers.SiteSettingController.HeaderDescription
</div>
@if (!(Model is LogOnModel))
{
<div class="errorMessage">
@Html.ValidationSummary(true)
</div>
}
</td>
</tr>
</table>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have about 20 years experiences in leading software projects and teams and about 25 years of working experience in software development (SW Developer, SW Lead, SW Architect, SW PM, SW Manager/Group Leader).