Merge lp:~leeturner/quam-plures/num_blogs_config into lp:quam-plures

Proposed by Lee Turner
Status: Merged
Merged at revision: 7615
Proposed branch: lp:~leeturner/quam-plures/num_blogs_config
Merge into: lp:quam-plures
Diff against target: 74 lines (+14/-4)
4 files modified
qp_inc/users/model/_usersettings.class.php (+3/-1)
qp_inc/users/users.ctrl.php (+6/-0)
qp_inc/users/views/_user.form.php (+3/-1)
qp_view_admin/_adminUI_general.class.php (+2/-2)
To merge this branch: bzr merge lp:~leeturner/quam-plures/num_blogs_config
Reviewer Review Type Date Requested Status
EdB Approve
Tilman Blumenbach (community) Approve
Review via email: mp+72845@code.launchpad.net

Description of the change

See this thread for details:

http://forums.quamplures.net/viewtopic.php?f=6&t=668

Removes the hardcoded value and adds a user configurable option to specify the number of blogs to display on the blog menu in the admin console. Defaults to 10.

To post a comment you must log in.
Revision history for this message
EdB (edb) wrote :

Gonna make this as a comment only for the moment. The text on the User Profile page isn't very good IMHO, but I dunno what I think would be better. The thing is my first thought was "why would I limit how many - I want all of them displayed" even though I knew in my head it was referring to how many get displayed before a dropdown menu is created for all blogs beyond the number entered. I'll throw some ideas (if I have any) for the label and note out in the forums.

Otherwise works as advertised and doesn't cause problems and adds coolness so I'm totally okay with marking this "yay+" or whatever means good and doing the merge.

7615. By Lee Turner <email address hidden>

updated text on user settings form

Revision history for this message
Lee Turner (leeturner) wrote :

I have updated the text on the user settings form as per EdB's suggestion here:

http://forums.quamplures.net/viewtopic.php?f=6&t=668&start=10#p5969

If anyone else has any further comments on the labels then please comment in the forums.

L

Revision history for this message
Tilman Blumenbach (tblue) wrote :

I don't have a better suggestion re. the labels and everything works as advertised, so I'm happy to approve this.

review: Approve
Revision history for this message
EdB (edb) wrote :

Tblue you should put Lee on the gatekeepers team.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qp_inc/users/model/_usersettings.class.php'
2--- qp_inc/users/model/_usersettings.class.php 2010-12-31 12:12:03 +0000
3+++ qp_inc/users/model/_usersettings.class.php 2011-08-25 19:59:41 +0000
4@@ -71,6 +71,8 @@
5 'login_multiple_sessions' => 1, // allow multiple concurrent sessions? (PARAMOUNT ON DEMO SERVER)
6
7 'results_per_page' => 20,
8+
9+ 'num_admin_blogs' => 10,
10 );
11
12
13@@ -207,4 +209,4 @@
14 }
15
16
17-?>
18\ No newline at end of file
19+?>
20
21=== modified file 'qp_inc/users/users.ctrl.php'
22--- qp_inc/users/users.ctrl.php 2010-12-31 12:12:03 +0000
23+++ qp_inc/users/users.ctrl.php 2011-08-25 19:59:41 +0000
24@@ -329,6 +329,7 @@
25 param( 'edited_user_bozo', 'integer', 0 );
26 param( 'edited_user_focusonfirst', 'integer', 0 );
27 param( 'edited_user_results_per_page', 'integer', null );
28+ param( 'edited_user_num_admin_blogs', 'integer', null );
29
30 /**
31 * @todo EdB: probably don't need the messages->count(error) bit
32@@ -404,6 +405,11 @@
33 {
34 $UserSettings->set( 'results_per_page', $edited_user_results_per_page, $edited_User->ID );
35 }
36+ // Number of blogs to display in admin
37+ if( isset($edited_user_num_admin_blogs) )
38+ {
39+ $UserSettings->set( 'num_admin_blogs', $edited_user_num_admin_blogs, $edited_User->ID );
40+ }
41
42 // Update user settings:
43 if( $UserSettings->dbupdate() )
44
45=== modified file 'qp_inc/users/views/_user.form.php'
46--- qp_inc/users/views/_user.form.php 2010-12-31 12:12:03 +0000
47+++ qp_inc/users/views/_user.form.php 2011-08-25 19:59:41 +0000
48@@ -238,7 +238,9 @@
49
50 // Number of results per page
51 $Form->text( 'edited_user_results_per_page', $UserSettings->get( 'results_per_page', $edited_User->ID ), 3, T_('Results per page'), T_('Number of rows displayed in results tables.') );
52-
53+
54+ // Number of blogs to display in the admin
55+ $Form->text( 'edited_user_num_admin_blogs', $UserSettings->get( 'num_admin_blogs', $edited_User->ID ), 2, T_('Blog menu length'), T_('Number of blogs displayed in the admin console before using a select box') );
56 }
57 else
58 { // display only
59
60=== modified file 'qp_view_admin/_adminUI_general.class.php'
61--- qp_view_admin/_adminUI_general.class.php 2011-01-09 17:19:59 +0000
62+++ qp_view_admin/_adminUI_general.class.php 2011-08-25 19:59:41 +0000
63@@ -532,9 +532,9 @@
64 */
65 function get_bloglist_buttons( $title = '' )
66 {
67- global $current_User, $blog, $pagenow;
68+ global $current_User, $blog, $pagenow, $UserSettings;
69
70- $max_buttons = 7;
71+ $max_buttons = $UserSettings->get('num_admin_blogs', $current_User->ID );
72
73 if( empty( $this->coll_list_permname ) )
74 { // We have not requested a list of blogs to be displayed

Subscribers

People subscribed via source and target branches