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-02-08 09:15:49 +08:00
|
|
|
|
+ " id='" + element.DomId + "' "
|
|
|
|
|
+ " class='btn btn-sm " + element.Class + "' "
|
|
|
|
|
+ " onclick='" + element.Script + "' " + element.Attr
|
|
|
|
|
+ ">");
|
|
|
|
|
if (!string.IsNullOrEmpty(element.Icon))
|
|
|
|
|
{
|
|
|
|
|
sb.Append("<i class='ace-icon fa fa-" + element.Icon + "'></i>");
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|