Skip to content

Commit f622b99

Browse files
Enable admin plots
Non-sub plot feature #38
1 parent ce64993 commit f622b99

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

Controllers/MainAdminController.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@ public MainAdminController()
2626
/// Load plot admin view
2727
/// </summary>
2828
/// <returns>plot admin view</returns>
29-
/* public ActionResult Index()
29+
public ActionResult Index()
3030
{
3131

3232
PlotChartViewModel plotviewmodel = new PlotChartViewModel();
33-
plotviewmodel.plotList = helper.GetPlots();
33+
var plotList = helper.GetPlots();
34+
plotviewmodel.plotlist = plotList.ToList().OrderBy(x => x.PlotId, new BExIS.Modules.PMM.UI.Helper.NaturalSorter());
3435
plotviewmodel.isAdmin = true;
35-
plotviewmodel.allPlots = "," + String.Join(",", plotviewmodel.plotList.Select(x => x.Id.ToString()).ToArray());
36+
plotviewmodel.allPlots = "," + String.Join(",", plotviewmodel.plotlist.Select(x => x.Id.ToString()).ToArray());
3637
return View(plotviewmodel);
37-
}*/
38+
}
3839

3940
/// <summary>
4041
/// add new plot

Models/PlotChartViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class PlotChartViewModel
1010
{
1111
public string ImageSource { set; get; }
1212
public Plot selectedPlot { set; get; }
13-
public IOrderedEnumerable<Plot> plotlist { get; internal set; }
13+
public IOrderedEnumerable<Plot> plotlist { get; set; }
1414
public IOrderedEnumerable<Plot> plotlistNew { get; internal set; }
1515
public List<string> plotlist_new { set; get; }
1616
public IList<int> gridsize { set; get; }

PMM.Manifest.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,15 @@
3434
<!--admin area-->
3535

3636
<Export tag="settings" id="adminPlotChart" order="16"
37-
title="Manage Plot Charts" description="manage plot charts" icon=""
37+
title="Manage Subplots" description="manage subplots" icon=""
3838
controller="MainAdmin" action="SubPlots"
3939
extends="./settingsRoot" />
4040

41+
<Export tag="settings" id="adminPlotChart" order="16"
42+
title="Manage Plot Charts" description="manage plot charts" icon=""
43+
controller="MainAdmin" action="Index"
44+
extends="./settingsRoot" />
45+
4146

4247
</Exports>
4348
</Manifest>

0 commit comments

Comments
 (0)