();
+
+
foreach (interfaces.IAction a in actionList)
{
if (a.CanBePermissionAssigned)
{
- HtmlTableCell hc = new HtmlTableCell();
- hc.Attributes.Add("class", "guiDialogTinyMark");
- hc.Controls.Add(new LiteralControl(ui.Text("actions", a.Alias)));
- captions.Cells.Add(hc);
+
+ HtmlTableRow permission = new HtmlTableRow();
+ HtmlTableCell label = new HtmlTableCell();
+ label.InnerText = ui.Text("actions", a.Alias);
+ permission.Cells.Add(label);
+ permissions.Add(a.Alias, permission);
}
}
- ht.Rows.Add(captions);
+
+ ht.Rows.Add(names);
+
foreach (BusinessLogic.User u in BusinessLogic.User.getAll())
{
// Not disabled users and not system account
if (!u.Disabled && u.Id > 0)
{
- HtmlTableRow hr = new HtmlTableRow();
-
- HtmlTableCell hc = new HtmlTableCell();
- hc.Attributes.Add("class", "guiDialogTinyMark");
- hc.Controls.Add(new LiteralControl(u.Name));
- hr.Cells.Add(hc);
+ HtmlTableCell hc = new HtmlTableCell("th");
+ hc.InnerText = u.Name;
+ hc.Style.Add("text-align", "center");
+ hc.Style.Add("border", "none");
+ names.Cells.Add(hc);
foreach (interfaces.IAction a in BusinessLogic.Actions.Action.GetAll())
{
@@ -80,17 +91,22 @@ namespace umbraco.dialogs
{
if (u.GetPermissions(node.Path).IndexOf(a.Letter) > -1)
c.Checked = true;
- HtmlTableCell cell = new HtmlTableCell();
+
+ HtmlTableCell cell = new HtmlTableCell();
cell.Style.Add("text-align", "center");
cell.Controls.Add(c);
- permissions.Add(c);
- hr.Cells.Add(cell);
+
+ permissions[a.Alias].Cells.Add(cell);
}
}
- ht.Rows.Add(hr);
}
}
+
+ //add all collected rows
+ foreach (var perm in permissions.Values)
+ ht.Rows.Add(perm);
+
PlaceHolder1.Controls.Add(ht);
}
@@ -128,7 +144,7 @@ namespace umbraco.dialogs
//FeedBackMessage.Text = "" + ui.Text("rights") + " " + ui.Text("ok") + "
";
feedback1.type = umbraco.uicontrols.Feedback.feedbacktype.success;
feedback1.Text = ui.Text("rights") + " " + ui.Text("ok");
- pane_form.Visible = false;
+ PlaceHolder1.Visible = false;
panel_buttons.Visible = false;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.designer.cs
index 633eb38373..0c8fa6d2d0 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.4200
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
@@ -13,15 +12,6 @@ namespace umbraco.dialogs {
public partial class cruds {
- ///
- /// feedback1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Feedback feedback1;
-
///
/// pane_form control.
///
@@ -31,6 +21,15 @@ namespace umbraco.dialogs {
///
protected global::umbraco.uicontrols.Pane pane_form;
+ ///
+ /// feedback1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Feedback feedback1;
+
///
/// PlaceHolder1 control.
///
@@ -47,7 +46,7 @@ namespace umbraco.dialogs {
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.Panel panel_buttons;
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl panel_buttons;
///
/// Button1 control.