Index: trunk/extensions/SocialProfile/SystemGifts/SpecialSystemGiftManager.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | * @param $par Mixed: parameter passed to the page or null |
17 | 17 | */ |
18 | 18 | public function execute( $par ){ |
19 | | - global $wgUser, $wgOut, $wgRequest, $wgScriptPath; |
| 19 | + global $wgUser, $wgOut, $wgRequest, $wgScriptPath, $wgSystemGiftsScripts; |
20 | 20 | wfLoadExtensionMessages( 'SystemGifts' ); |
21 | 21 | |
22 | 22 | $wgOut->setPageTitle( wfMsg( 'systemgiftmanager' ) ); |
— | — | @@ -38,11 +38,8 @@ |
39 | 39 | return; |
40 | 40 | } |
41 | 41 | |
42 | | - $css = "<style> |
43 | | - .view-form { font-weight:800; font-size:12px; font-color:#666666; } |
44 | | - .view-status { font-weight:800; font-size:12px; background-color:#FFFB9B; color:#666666; padding:5px; margin-bottom:5px; } |
45 | | - </style>"; |
46 | | - $wgOut->addHTML( $css ); |
| 42 | + // Add CSS |
| 43 | + $wgOut->addStyle( $wgSystemGiftsScripts . '/SystemGift.css' ); |
47 | 44 | |
48 | 45 | if( $wgRequest->wasPosted() ){ |
49 | 46 | $g = new SystemGifts(); |
— | — | @@ -68,7 +65,7 @@ |
69 | 66 | if( $gift_id || $wgRequest->getVal( 'method' ) == 'edit' ){ |
70 | 67 | $wgOut->addHTML( $this->displayForm( $gift_id ) ); |
71 | 68 | } else { |
72 | | - $wgOut->addHTML( '<div><b><a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager&method=edit">'.wfMsg( 'ga-addnew' ).'</a></b></div><p>' ); |
| 69 | + $wgOut->addHTML( '<div><b><a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager&method=edit">'.wfMsg( 'ga-addnew' ).'</a></b></div>' ); |
73 | 70 | $wgOut->addHTML( $this->displayGiftList() ); |
74 | 71 | } |
75 | 72 | } |
— | — | @@ -92,41 +89,41 @@ |
93 | 90 | function displayForm( $gift_id ){ |
94 | 91 | global $wgUploadPath, $wgScriptPath; |
95 | 92 | |
96 | | - $form = '<div><b><a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager">'.wfMsg( 'ga-viewlist' ).'</a></b></div><p>'; |
| 93 | + $form = '<div><b><a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManager">'.wfMsg( 'ga-viewlist' ).'</a></b></div>'; |
97 | 94 | |
98 | 95 | if( $gift_id ) $gift = SystemGifts::getGift( $gift_id ); |
99 | 96 | |
100 | | - $form .= '<form action="" method="post" enctype="multipart/form-data" name="gift">'; |
101 | | - $form .= '<table border="0" cellpadding="5" cellspacing="0" width="500">'; |
102 | | - $form .= '<tr> |
103 | | - <td width="200" class="view-form">'.wfMsg( 'ga-giftname' ).'</td> |
104 | | - <td width="695"><input type="text" size="45" class="createbox" name="gift_name" value="'. $gift['gift_name'] . '"/></td> |
105 | | - </tr> |
106 | | - <tr> |
107 | | - <td width="200" class="view-form" valign="top">'.wfMsg( 'ga-giftdesc' ).'</td> |
108 | | - <td width="695"><textarea class="createbox" name="gift_description" rows="2" cols="30">'. $gift['gift_description'] . '</textarea></td> |
109 | | - </tr> |
110 | | - <tr> |
111 | | - <td width="200" class="view-form">'.wfMsg( 'ga-gifttype' ).'</td> |
112 | | - <td width="695"> |
113 | | - <select name="gift_category">'; |
| 97 | + $form .= '<form action="" method="post" enctype="multipart/form-data" name="gift"> |
| 98 | + <table border="0" cellpadding="5" cellspacing="0" width="500"> |
| 99 | + <tr> |
| 100 | + <td width="200" class="view-form">'.wfMsg( 'ga-giftname' ).'</td> |
| 101 | + <td width="695"><input type="text" size="45" class="createbox" name="gift_name" value="'. $gift['gift_name'] . '"/></td> |
| 102 | + </tr> |
| 103 | + <tr> |
| 104 | + <td width="200" class="view-form" valign="top">'.wfMsg( 'ga-giftdesc' ).'</td> |
| 105 | + <td width="695"><textarea class="createbox" name="gift_description" rows="2" cols="30">'. $gift['gift_description'] . '</textarea></td> |
| 106 | + </tr> |
| 107 | + <tr> |
| 108 | + <td width="200" class="view-form">'.wfMsg( 'ga-gifttype' ).'</td> |
| 109 | + <td width="695"> |
| 110 | + <select name="gift_category">'; |
114 | 111 | $g = new SystemGifts(); |
115 | 112 | foreach( $g->categories as $category => $id ){ |
116 | 113 | $form .= '<option' . ( ( $gift['gift_category'] == $id ) ? ' selected="selected"' : '' ) . " value=\"{$id}\">{$category}</option>"; |
117 | 114 | } |
118 | 115 | $form .= '</select> |
| 116 | + </td> |
| 117 | + </tr> |
119 | 118 | <tr> |
120 | | - <td width="200" class="view-form">'.wfMsg( 'ga-threshold' ).'</td> |
121 | | - <td width="695"><input type="text" size="25" class="createbox" name="gift_threshold" value="'. $gift['gift_threshold'] . '"/></td> |
122 | | - </tr> |
123 | | - <tr>'; |
| 119 | + <td width="200" class="view-form">'.wfMsg( 'ga-threshold' ).'</td> |
| 120 | + <td width="695"><input type="text" size="25" class="createbox" name="gift_threshold" value="'. $gift['gift_threshold'] . '"/></td> |
| 121 | + </tr>'; |
124 | 122 | |
125 | 123 | if( $gift_id ){ |
126 | 124 | $gift_image = '<img src="'. $wgUploadPath .'/awards/' . SystemGifts::getGiftImage( $gift_id, 'l' ) . '" border="0" alt="gift" />'; |
127 | 125 | $form .= '<tr> |
128 | | - <td width="200" class="view-form" valign="top">'.wfMsg('ga-giftimage').'</td> |
| 126 | + <td width="200" class="view-form" valign="top">'.wfMsg( 'ga-giftimage' ).'</td> |
129 | 127 | <td width="695">' . $gift_image . ' |
130 | | - <p> |
131 | 128 | <a href="'.$wgScriptPath.'/index.php?title=Special:SystemGiftManagerLogo&gift_id=' . $gift_id . '">'.wfMsg( 'ga-img' ).'</a> |
132 | 129 | </td> |
133 | 130 | </tr>'; |
— | — | @@ -134,9 +131,9 @@ |
135 | 132 | |
136 | 133 | $form .= '<tr> |
137 | 134 | <td colspan="2"> |
138 | | - <input type="hidden" name="id" value="' . $gift['gift_id'] . '"> |
139 | | - <input type="button" class="createbox" value="' . ( ( $gift['gift_id'] ) ? wfMsg( 'edit' ) : wfMsg( 'ga-create-gift' ) ) . '" size="20" onclick="document.gift.submit()" /> |
140 | | - <input type="button" class="createbox" value="'.wfMsg( 'cancel' ).'" size="20" onclick="history.go(-1)" /> |
| 135 | + <input type="hidden" name="id" value="' . $gift['gift_id'] . '" /> |
| 136 | + <input type="button" class="createbox" value="' . ( ( $gift['gift_id'] ) ? wfMsg( 'edit' ) : wfMsg( 'ga-create-gift' ) ) . '" size="20" onclick="document.gift.submit()" /> |
| 137 | + <input type="button" class="createbox" value="'.wfMsg( 'cancel' ).'" size="20" onclick="history.go(-1)" /> |
141 | 138 | </td> |
142 | 139 | </tr> |
143 | 140 | </table> |
Index: trunk/extensions/SocialProfile/SystemGifts/SystemGift.css |
— | — | @@ -1,117 +1,133 @@ |
2 | 2 | .back-links { |
3 | | - margin:0px 0px 10px 0px; |
| 3 | + margin: 0px 0px 10px 0px; |
4 | 4 | } |
5 | 5 | |
6 | 6 | .back-links a { |
7 | | - text-decoration:none; |
8 | | - font-weight:bold; |
| 7 | + text-decoration: none; |
| 8 | + font-weight: bold; |
9 | 9 | } |
10 | 10 | |
11 | 11 | .ga-count { |
12 | | - margin:0px 0px 15px 0px; |
| 12 | + margin: 0px 0px 15px 0px; |
13 | 13 | } |
14 | 14 | |
15 | 15 | .ga-item { |
16 | | - border:1px solid #D7DEE8; |
17 | | - padding:7px; |
18 | | - float:left; |
19 | | - margin:0px 15px 15px 0px; |
20 | | - width:350px; |
| 16 | + border: 1px solid #D7DEE8; |
| 17 | + padding: 7px; |
| 18 | + float: left; |
| 19 | + margin: 0px 15px 15px 0px; |
| 20 | + width: 350px; |
21 | 21 | } |
22 | 22 | |
23 | 23 | .ga-item a { |
24 | | - text-decoration:none; |
25 | | - font-weight:bold; |
26 | | - font-size:14px; |
| 24 | + text-decoration: none; |
| 25 | + font-weight: bold; |
| 26 | + font-size: 14px; |
27 | 27 | } |
28 | 28 | |
29 | 29 | .ga-item img { |
30 | | - border:1px solid #dcdcdc; |
31 | | - background-color:#fff; |
32 | | - padding:3px; |
33 | | - display:block; |
34 | | - float:left; |
35 | | - margin:0px 10px 0px 0px; |
| 30 | + border: 1px solid #dcdcdc; |
| 31 | + background-color: #fff; |
| 32 | + padding: 3px; |
| 33 | + display: block; |
| 34 | + float: left; |
| 35 | + margin: 0px 10px 0px 0px; |
36 | 36 | } |
37 | 37 | |
38 | 38 | .page-nav a { |
39 | | - font-weight:bold; |
| 39 | + font-weight: bold; |
40 | 40 | } |
41 | 41 | |
42 | 42 | .ga-new { |
43 | | - background-color:#FFFB9B; |
44 | | - border:1px solid #FDC745; |
45 | | - font-weight:bold; |
46 | | - padding:0px 5px; |
| 43 | + background-color: #FFFB9B; |
| 44 | + border: 1px solid #FDC745; |
| 45 | + font-weight: bold; |
| 46 | + padding: 0px 5px; |
47 | 47 | } |
48 | 48 | |
49 | 49 | .ga-name { |
50 | | - font-size:16px; |
51 | | - font-weight:bold; |
52 | | - margin:0px 0px 2px; |
| 50 | + font-size: 16px; |
| 51 | + font-weight: bold; |
| 52 | + margin: 0px 0px 2px; |
53 | 53 | } |
54 | 54 | |
55 | 55 | .ga-timestamp { |
56 | | - font-size:9px; |
57 | | - color:#999; |
58 | | - margin:0px 0px 5px 0px; |
| 56 | + font-size: 9px; |
| 57 | + color: #999; |
| 58 | + margin: 0px 0px 5px 0px; |
59 | 59 | } |
60 | 60 | |
61 | 61 | .ga-description-message { |
62 | | - margin:0px 0px 5px 0px; |
63 | | - color:#666; |
64 | | - font-weight:bold; |
| 62 | + margin: 0px 0px 5px 0px; |
| 63 | + color: #666; |
| 64 | + font-weight: bold; |
65 | 65 | } |
66 | 66 | |
67 | 67 | .ga-gift-count { |
68 | | - font-size:9px; |
69 | | - margin:0px 0px 10px 0px; |
| 68 | + font-size: 9px; |
| 69 | + margin: 0px 0px 10px 0px; |
70 | 70 | } |
71 | 71 | |
72 | 72 | .ga-description-container { |
73 | | - width:480px; |
74 | | - margin:20px 0px; |
| 73 | + width: 480px; |
| 74 | + margin: 20px 0px; |
75 | 75 | } |
76 | 76 | |
77 | 77 | .ga-recent { |
78 | | - border-top:1px solid #EFEFEF; |
79 | | - padding:10px 0px 0px 0px; |
| 78 | + border-top: 1px solid #EFEFEF; |
| 79 | + padding: 10px 0px 0px 0px; |
80 | 80 | } |
81 | 81 | |
82 | 82 | .ga-recent img { |
83 | | - vertical-align:middle; |
84 | | - padding:3px; |
85 | | - background-color:#fff; |
86 | | - border:1px solid #dcdcdc; |
87 | | - margin:0px 10px 0px 0px; |
| 83 | + vertical-align: middle; |
| 84 | + padding: 3px; |
| 85 | + background-color: #fff; |
| 86 | + border: 1px solid #dcdcdc; |
| 87 | + margin: 0px 10px 0px 0px; |
88 | 88 | } |
89 | 89 | |
90 | 90 | .ga-recent a { |
91 | | - display:block; |
92 | | - float:left; |
93 | | - text-decoration:none; |
| 91 | + display: block; |
| 92 | + float: left; |
| 93 | + text-decoration: none; |
94 | 94 | } |
95 | 95 | |
96 | 96 | .ga-recent-title { |
97 | | - font-size:14px; |
98 | | - font-weight:bold; |
99 | | - color:#777; |
100 | | - margin:0px 0px 2px 0px; |
| 97 | + font-size: 14px; |
| 98 | + font-weight: bold; |
| 99 | + color: #777; |
| 100 | + margin: 0px 0px 2px 0px; |
101 | 101 | } |
102 | 102 | |
103 | 103 | .ga-recent-item { |
104 | | - margin:0px 0px 5px 0px; |
| 104 | + margin: 0px 0px 5px 0px; |
105 | 105 | } |
106 | 106 | |
107 | 107 | .ga-description { |
108 | | - padding:0px 0px 15px 0px; |
| 108 | + padding: 0px 0px 15px 0px; |
109 | 109 | } |
110 | 110 | |
111 | 111 | .ga-description img { |
112 | | - border:1px solid #dcdcdc; |
113 | | - background-color:#fff; |
114 | | - padding:3px; |
115 | | - display:block; |
116 | | - float:left; |
117 | | - margin:0px 10px 0px 0px; |
| 112 | + border: 1px solid #dcdcdc; |
| 113 | + background-color: #fff; |
| 114 | + padding: 3px; |
| 115 | + display: block; |
| 116 | + float: left; |
| 117 | + margin: 0px 10px 0px 0px; |
| 118 | +} |
| 119 | + |
| 120 | +/* Special:SystemGiftManager */ |
| 121 | +.view-form { |
| 122 | + font-weight: 800; |
| 123 | + font-size: 12px; |
| 124 | + color: #666666; |
| 125 | +} |
| 126 | + |
| 127 | +.view-status { |
| 128 | + font-weight: 800; |
| 129 | + font-size: 12px; |
| 130 | + background-color: #FFFB9B; |
| 131 | + color: #666666; |
| 132 | + padding: 5px; |
| 133 | + margin-bottom: 5px; |
118 | 134 | } |
\ No newline at end of file |