Layout Improvements [Notification Icons & User Personalization]

brunobola edited this page Jan 3, 2017 · 2 revisions
Clone this wiki locally

This Samples a way to personalize the Layout a bit

  • To create notification icons you can edit the _Layout.cshtml and change it to (example): image
                        <li class="dropdown messages-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-envelope-o"></i>
                                <span class="label label-success">4</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tem 4 Mensagens</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li>
                                            <!-- start message -->
                                            <a href="#">
                                                <div class="pull-left">
                                                    <img src="/Content/adminlte/img/avatar5.png" class="img-circle" alt="User Image">
                                                </div>
                                                <h4>
                                                    Bial Group
                                                    <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                                </h4>
                                                <p>Oportunidade de realização de Estudo ?</p>
                                            </a>
                                        </li><!-- end message -->
                                    </ul>
                                </li>
                                <li class="footer"><a href="#">Ver todas as Mensagens</a></li>
                            </ul>
                        </li>
                        <!-- Notifications: style can be found in dropdown.less -->
                        <li class="dropdown notifications-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-bell-o"></i>
                                <span class="label label-warning">10</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tem 10 notificações</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li>
                                            <a href="#">
                                                <i class="fa fa-users text-aqua"></i> 5 novos membros registaram-se hoje
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                                <li class="footer"><a href="#">Ver todas as Notificações</a></li>
                            </ul>
                        </li>
                        <!-- Tasks: style can be found in dropdown.less -->
                        <li class="dropdown tasks-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="fa fa-flag-o"></i>
                                <span class="label label-danger">9</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="header">Tem 9 Tarefas</li>
                                <li>
                                    <!-- inner menu: contains the actual data -->
                                    <ul class="menu">
                                        <li>
                                            <!-- Task item -->
                                            <a href="#">
                                                <h3>
                                                    Terminar Relatório de Contas
                                                    <small class="pull-right">20%</small>
                                                </h3>
                                                <div class="progress xs">
                                                    <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">20% Complete</span>
                                                    </div>
                                                </div>
                                            </a>
                                        </li><!-- end task item -->
                                    </ul>
                                </li>
                                <li class="footer">
                                    <a href="#">Ver todas as Tarefas</a>
                                </li>
                            </ul>
                        </li>
  • In the same Way you can customize the User interface changing a Bit Like So (example): image

User Code:

                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <img src="@(((UserDefinition)Serenity.Authorization.UserDefinition).UserImage)" class="user-image" alt="User Image">
                                <span class="hidden-xs">@Serenity.Authorization.UserDefinition.DisplayName</span>
                            </a>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header">
                                    <img src="@(((UserDefinition)Serenity.Authorization.UserDefinition).UserImage)" class="img-circle" alt="User Image">
                                    <p>
                                        @Serenity.Authorization.Username
                                        <small>Member since Nov. 2012</small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <li class="user-body">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Followers</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Sales</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">Friends</a>
                                    </div>
                                </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="~/Account/ChangePassword" class="btn btn-default btn-flat">@Texts.Forms.Membership.ChangePassword.FormTitle</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="~/Account/Signout" class="btn btn-default btn-flat">@LocalText.Get("Navigation.LogoutLink")</a>
                                    </div>
                                </li>
                            </ul>
                        </li>