From 81f78690dbcb0bb90304fb5e2b7343866d371615 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 12 Feb 2006 19:21:00 +0000 Subject: my turn to break things... harharhar - checking in permission settings and permission masks - permission presets and documentation not finished yet - added backtrace function to determine file/line for sql errors - fixed marlist for orphan attachments/groups/logs/users - able to change anonymous user settings/permissions now - re-arranged admin permissions a bit (added some and removed some) - setting forum permissions after creating/editing forum now selects every default group (copy permisson/dropdown to be added for adding forums) - finished user permissions in users acp note: the layout for permissions might change devs: please empty the user_permissions in phpbb_users. Also, first change your auth_options table, remove all cache files and then re-set admin permissions. After having set the admin permissions you can update your modules table (else you will not see the permission tabs) - or empty the auth setting within the modules table to be able to see the permission modules (they rely on newly added permission options) git-svn-id: file:///svn/phpbb/trunk@5553 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/images/arrow_down.gif | Bin 0 -> 113 bytes phpBB/adm/images/bg_hash1.gif | Bin 0 -> 48 bytes phpBB/adm/images/bg_hash2.gif | Bin 0 -> 48 bytes phpBB/adm/images/bg_hash3.gif | Bin 0 -> 48 bytes phpBB/adm/images/bg_hash4.gif | Bin 0 -> 48 bytes phpBB/adm/images/gradient2b.gif | Bin 0 -> 192 bytes phpBB/adm/style/acp_attachments.html | 22 +-- phpBB/adm/style/acp_groups.html | 2 +- phpBB/adm/style/acp_logs.html | 2 +- phpBB/adm/style/acp_main.html | 14 +- phpBB/adm/style/acp_permissions.html | 318 +++++++++++++++++++++++++++++++++++ phpBB/adm/style/acp_users.html | 15 +- phpBB/adm/style/admin.css | 163 ++++++++++++++++++ phpBB/adm/style/overall_header.html | 20 ++- phpBB/adm/style/permission_mask.html | 179 ++++++++++++++++++++ phpBB/adm/style/simple_header.html | 34 +++- 16 files changed, 720 insertions(+), 49 deletions(-) create mode 100644 phpBB/adm/images/arrow_down.gif create mode 100644 phpBB/adm/images/bg_hash1.gif create mode 100644 phpBB/adm/images/bg_hash2.gif create mode 100644 phpBB/adm/images/bg_hash3.gif create mode 100644 phpBB/adm/images/bg_hash4.gif create mode 100644 phpBB/adm/images/gradient2b.gif create mode 100644 phpBB/adm/style/acp_permissions.html create mode 100644 phpBB/adm/style/permission_mask.html (limited to 'phpBB/adm') diff --git a/phpBB/adm/images/arrow_down.gif b/phpBB/adm/images/arrow_down.gif new file mode 100644 index 0000000000..e45c365ecc Binary files /dev/null and b/phpBB/adm/images/arrow_down.gif differ diff --git a/phpBB/adm/images/bg_hash1.gif b/phpBB/adm/images/bg_hash1.gif new file mode 100644 index 0000000000..61163679a8 Binary files /dev/null and b/phpBB/adm/images/bg_hash1.gif differ diff --git a/phpBB/adm/images/bg_hash2.gif b/phpBB/adm/images/bg_hash2.gif new file mode 100644 index 0000000000..d31840361c Binary files /dev/null and b/phpBB/adm/images/bg_hash2.gif differ diff --git a/phpBB/adm/images/bg_hash3.gif b/phpBB/adm/images/bg_hash3.gif new file mode 100644 index 0000000000..40bc7e1b5c Binary files /dev/null and b/phpBB/adm/images/bg_hash3.gif differ diff --git a/phpBB/adm/images/bg_hash4.gif b/phpBB/adm/images/bg_hash4.gif new file mode 100644 index 0000000000..54e7f0019f Binary files /dev/null and b/phpBB/adm/images/bg_hash4.gif differ diff --git a/phpBB/adm/images/gradient2b.gif b/phpBB/adm/images/gradient2b.gif new file mode 100644 index 0000000000..a8107659e2 Binary files /dev/null and b/phpBB/adm/images/gradient2b.gif differ diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index a08a0f3d85..4d309e9b76 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -361,24 +361,6 @@ - -
@@ -403,8 +385,8 @@ - - + +
 {L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}{L_MARK_ALL} :: {L_UNMARK_ALL}
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index c083d930a3..125f39d70d 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -210,7 +210,7 @@
- {L_MARK_ALL} :: {L_UNMARK_ALL}
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html index 5d3e49a6a7..4603561d28 100644 --- a/phpBB/adm/style/acp_logs.html +++ b/phpBB/adm/style/acp_logs.html @@ -62,7 +62,7 @@
- {L_MARK_ALL} :: {L_UNMARK_ALL}
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
   
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index 4b754c3c74..1b521e1ec9 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -1,17 +1,5 @@ - -

{L_WELCOME_PHPBB}

{L_ADMIN_INTRO}

@@ -140,7 +128,7 @@
-

Mark allUnmark all

+

{L_MARK_ALL}{L_UNMARK_ALL}

diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html new file mode 100644 index 0000000000..a3fe26426f --- /dev/null +++ b/phpBB/adm/style/acp_permissions.html @@ -0,0 +1,318 @@ + + + + + + +

{L_TITLE}

+ +

{L_EXPLAIN}

+ + +

{L_FORUMS}: {FORUM_NAMES}

+ + + + + + +
+ {L_LOOK_UP_FORUM} +

{L_LOOK_UP_FORUMS_EXPLAIN}

+
+
+
+
  {L_ALL_FORUMS}
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ + + + + +
+ +
+ {L_LOOK_UP_USER} +
+
+
+
[ {L_FIND_USERNAME} ]
+
 {L_SELECT_ANONYMOUS}
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ + + +
+ +
+ {L_LOOK_UP_GROUP} +
+
+
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ + + +
+ + + +

{L_USERS}

+ +
+ +
+ {L_MANAGE_USERS} +
+
+
+
+ +
+ {S_HIDDEN_FIELDS} +   + +
+ +
+ +
+ +
+ {L_ADD_USERS} +

{L_USERNAMES_EXPLAIN}

+
+
+
 {L_SELECT_ANONYMOUS}
+
+
+ +
+ {S_HIDDEN_FIELDS} +   + +
+ +
+ + + +
+ +
+ + + +

{L_USERGROUPS}

+ +
+ +
+ {L_MANAGE_GROUPS} +
+
+
+
+ +
+ {S_HIDDEN_FIELDS} +   + +
+ +
+ +
+ +
+ {L_ADD_GROUPS} +
+
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ + + +
+ + + +
+ +

{L_USERS}

+ +
+ +
+ {L_MANAGE_USERS} +
+
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ +
+ +
+ {L_LOOK_UP_USER} +
+
+
+
[ {L_FIND_USERNAME} ]
+
 {L_SELECT_ANONYMOUS}
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ +
+ +
+ +

{L_USERGROUPS}

+ +
+ +
+ {L_MANAGE_GROUPS} +
+
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ +
+ +
+ {L_LOOK_UP_GROUP} +
+
+
+
 
+
+
+ +
+ {S_HIDDEN_FIELDS} + +
+ +
+ +
+ + + + + + + +

{L_ACL_VIEW}

+ +

{L_ACL_VIEW_EXPLAIN}

+ +
+ » {L_PERMISSION_TYPE} +
+ + + + + + + +

{L_ACL_SET}

+ +

{L_ACL_SET_EXPLAIN}

+ +
+ +
+ » {L_PERMISSION_TYPE} +
+ + +
+ +
+ {S_HIDDEN_FIELDS} + {L_SELECT_TYPE}: + + +
+ +
+ + +

+ +
+ + {S_HIDDEN_FIELDS} + + + +

+ +
+ {L_PERM_PRESET_APPLIED_TO_ALL}
+ {L_MARK_ALL}{L_UNMARK_ALL} +
+ +
+ +
+ +

+ +
+ + + + \ No newline at end of file diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 0ecfc49417..35ceefe171 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -16,7 +16,7 @@
[ {L_FIND_USERNAME} ]
-
 Select Anonymous User
+
 {L_SELECT_ANONYMOUS}
@@ -203,7 +203,7 @@
- {L_MARK_ALL} :: {L_UNMARK_ALL}
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
   
@@ -696,12 +696,21 @@
- {L_MARK_ALL} :: {L_UNMARK_ALL}
+ {L_MARK_ALL} :: {L_UNMARK_ALL}
+ + +
+ » {L_SET_USERS_PERMISSIONS}
+ » {L_SET_USERS_FORUM_PERMISSIONS} +
+ + + \ No newline at end of file diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index aa0cb68871..dd71698c93 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -281,6 +281,7 @@ td { .row1 { background-color: #EFEFEF; } .row2 { background-color: #DEE3E7; } .row3 { background-color: #D1D7DC; } +.row4 { background-color: #E4E8EB; } .col1 { background-color: #DEE3E7; } .col2 { background-color: #EFEFEF; } @@ -648,6 +649,168 @@ a.button2, a.button2:link, a.button2:visited, a.button2:active { padding: 4px 8px; } +/* Permission related +---------------------------------------- */ + +.permissions { + margin: 15px 0 0 0; + padding: 0; + border: none; + background-color: transparent; +} + +.permissions table { + width: 100%; + /*empty-cells: hide;*/ + border: 1px solid #CCCFD3; + background-color: #FFFFFF; + padding: 1px; +} + +.permissions th { + padding: 3px 4px; + color: #FFFFFF; + background: #DDE1E4 url("../images/gradient2b.gif") bottom left repeat-x; + border-top: 1px solid #6DACD2; + border-bottom: 1px solid #327AA5; + text-align: left; + font-size: .85em; + text-transform: uppercase; +} + +.permissions td { + text-align: left; + font-size: 1.1em; + padding: 4px; + line-height: 120%; +} + +table.pmask { + border: none; + background: none; + padding: 0; +} + +table.pmask th { + background: none; + border-top: none; + text-align: center; + vertical-align: bottom; + color: #115098; + padding: 2px 0; +} + +table.pmask td { + padding: 0px; +} + +table.pmask td.name { + padding: 2px; + vertical-align: middle; +} + +.permissions th.name { + text-align: left; + width: auto; + padding-left: 4px; +} + +.permissions .entry { + text-align: left; + font-weight: normal; +} + +.permissions td.name { + text-align: left; + font-weight: bold; +} + +.permissions table.type3 { + float: right; + width: 350px; /* Setting the length of the permission view box */ + border: none; + background-color: transparent; + padding: 0; +} + +.permissions table.type3 thead th { + background-color: transparent; + border-top: none; + text-align: center; + color: #115098; + padding: 0 3px; + font-size: .9em; + font-weight: normal; + text-transform: none; +} + +.permissions table.type3 tbody th { + border-top: none; + text-align: left; + text-transform: none; + padding: 0; + border: none; + font-size: 1em; + font-weight: normal; + width: 100%; + vertical-align: middle; +} + +.permissions table.type3 td { + text-align: center; + padding: 1px; +} + +.permissions td.yes { + width: 20px; + background-color: #40C53D; +} + +.permissions td.no { + width: 20px; + background-color: #EC7181; +} + +.permissions td.unset { + width: 20px; + background-color: transparent; +} + +/* Preset Styles +---------------------------------------- */ +.preset_yes, .preset_custom, .preset_no, .preset_unset { + width: 60px; +} + +.preset_yes a span, .preset_custom a span, .preset_no a span, .preset_unset a span { + float: left; + display: block; + width: 100%; + height: 20px; + cursor: pointer; + background: none; +} + +.preset_yes a:hover span, .preset_custom a:hover span, .preset_no a:hover span, .preset_unset a:hover span { + background: url("../images/arrow_down.gif") no-repeat 50% 50%; + text-decoration: none; +} + +.preset_yes { + background: #D3F3D2 url("../images/bg_hash1.gif") repeat; +} + +.preset_custom { + background: #DAE4EC url("../images/bg_hash2.gif") repeat; +} + +.preset_no { + background: #ECD7DA url("../images/bg_hash3.gif") repeat; +} + +.preset_unset { + background: #ECD7DA url("../images/bg_hash4.gif") repeat; +} /* Action Highlighting ---------------------------------------- */ diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 0cfc50bbdd..9345ae0682 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -45,12 +45,24 @@ function dE(n, s, type) e.style.display = (s == 1) ? type : 'none'; } -function marklist(match, status) +// Mark/unmark checkboxes +// id = ID of parent container, name = name prefix, state = state [true/false] +function marklist(id, name, state) { - doc = document.getElementById(match); - for (i = 0; i < doc.length; i++) + var parent = document.getElementById(id); + if (!parent) { - doc.elements[i].checked = status; + return; + } + + var rb = parent.getElementsByTagName('input'); + + for (var r = 0; r < rb.length; r++) + { + if (rb[r].name.substr(0, name.length) == name) + { + rb[r].checked = state; + } } } diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html new file mode 100644 index 0000000000..263ff3fffa --- /dev/null +++ b/phpBB/adm/style/permission_mask.html @@ -0,0 +1,179 @@ + + + + + +
+ +
+

+ {p_mask.NAME} {L_USER_IS_MEMBER_OF_DEFAULT}: {p_mask.USER_GROUPS_DEFAULT}
+ {p_mask.NAME} {L_USER_IS_MEMBER_OF_CUSTOM}: {p_mask.USER_GROUPS_CUSTOM} +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
{p_mask.NAME} [{p_mask.L_ACL_TYPE}]{p_mask.CATEGORIES}
+ + + + + + + + +
+ style="display: none;"> +   + + {p_mask.f_mask.PADDING}{p_mask.f_mask.NAME} + +   + + + +
+
+ + + + + + + +  
+
+ +
+

{L_APPLY_PERMISSIONS_EXPLAIN}

+ +
+ + +   + +
+
+
 
+ + style="display: none;"> + + + + + + + + + + + + + + + + + + + class="yes" class="unset">  + class="no" class="unset">  + + + + + + + + +
{L_ACL_SETTING} [{p_mask.f_mask.category.CAT_NAME}]{L_ACL_YES}{L_ACL_NO}{L_ACL_YES}{L_ACL_UNSET}{L_ACL_NO}
{p_mask.f_mask.category.mask.PERMISSION} checked="checked" value="1" /> checked="checked" value="-1" /> checked="checked" value="0" />
+ +
+ +
+ + diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index 4aab5fe973..3a21c3bdab 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -30,19 +30,39 @@ function jumpto() // Set display of page element // s[-1,0,1] = hide,toggle display,show -function dE(n,s) +function dE(n, s, type) { + if (!type) + { + type = 'block'; + } + var e = document.getElementById(n); - if(!s) s = (e.style.display=='') ? -1:1; - e.style.display = (s==1) ? 'block':'none'; + if (!s) + { + s = (e.style.display == '') ? -1 : 1; + } + e.style.display = (s == 1) ? type : 'none'; } -function marklist(match, status) +// Mark/unmark checkboxes +// id = ID of parent container, name = name prefix, state = state [true/false] +function marklist(id, name, state) { - doc = document.getElementById(match); - for (i = 0; i < doc.length; i++) + var parent = document.getElementById(id); + if (!parent) + { + return; + } + + var rb = parent.getElementsByTagName('input'); + + for (var r = 0; r < rb.length; r++) { - doc.elements[i].checked = status; + if (rb[r].name.substr(0, name.length) == name) + { + rb[r].checked = state; + } } } -- cgit v1.2.1