2017-08-30 18:16:06 +08:00
|
|
|
|
using System.Text;
|
2016-10-14 11:22:16 +08:00
|
|
|
|
using System.Web.Mvc;
|
2015-09-22 23:10:00 +08:00
|
|
|
|
|
|
|
|
|
namespace OpenAuth.Mvc.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class HomeController : BaseController
|
|
|
|
|
{
|
2015-11-22 21:32:38 +08:00
|
|
|
|
|
2015-09-22 23:10:00 +08:00
|
|
|
|
public ActionResult Index()
|
2016-10-14 11:22:16 +08:00
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
|
|
|
|
|
2017-08-30 17:15:05 +08:00
|
|
|
|
public ActionResult Main()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2017-08-30 18:16:06 +08:00
|
|
|
|
|
2017-08-31 19:23:29 +08:00
|
|
|
|
|
2016-01-14 17:30:29 +08:00
|
|
|
|
|
2015-12-01 22:46:29 +08:00
|
|
|
|
public ActionResult Git()
|
|
|
|
|
{
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2015-12-06 00:05:32 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 所有页面按钮控制分部视图
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>ActionResult.</returns>
|
|
|
|
|
[ChildActionOnly]
|
|
|
|
|
public ActionResult MenuHeader()
|
|
|
|
|
{
|
2016-10-14 11:22:16 +08:00
|
|
|
|
var sb = new StringBuilder();
|
|
|
|
|
foreach (var element in CurrentModule.Elements)
|
|
|
|
|
{
|
|
|
|
|
sb.Append("<button "
|
2017-10-12 16:38:46 +08:00
|
|
|
|
+ " data-type='" + element.DomId + "' "
|
2017-12-11 17:49:59 +08:00
|
|
|
|
+ " class='layui-btn layui-btn-small " + element.Class + "' "
|
2017-10-12 16:38:46 +08:00
|
|
|
|
+ element.Attr
|
2017-02-08 09:15:49 +08:00
|
|
|
|
+ ">");
|
|
|
|
|
if (!string.IsNullOrEmpty(element.Icon))
|
|
|
|
|
{
|
2017-10-12 16:38:46 +08:00
|
|
|
|
sb.Append("<i class='layui-icon'>" + element.Icon + "</i>");
|
2017-02-08 09:15:49 +08:00
|
|
|
|
}
|
|
|
|
|
sb.Append(element.Name + "</button>");
|
2016-10-14 11:22:16 +08:00
|
|
|
|
}
|
|
|
|
|
ViewBag.Buttons = sb.ToString();
|
|
|
|
|
return View();
|
|
|
|
|
}
|
2015-09-22 23:10:00 +08:00
|
|
|
|
}
|
2015-09-20 21:59:36 +08:00
|
|
|
|
}
|