Overview
Comment:Fix colspan in user search
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: c5b5dfb4c779c5cc856f44ca17cf2a4fb5db12981fd1d794e72cd3839d145e35
User & Date: bohwaz on 2022-08-07 02:23:05
Other Links: branch diff | manifest | tags
Context
2022-08-07
02:47
Fix issues in dynamic fields, and drop triggers to allow changing the users table from a third-party program check-in: 0b7fc4db8b user: bohwaz tags: dev
02:23
Fix colspan in user search check-in: c5b5dfb4c7 user: bohwaz tags: dev
02:21
Allow empty search query, just show columns check-in: f99eac7de4 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/DynamicList.php from [b54872f56e] to [a672b61802].

147
148
149
150
151
152
153





154
155
156
157
158
159
160
			}

			$columns[$alias] = $label_only ? $properties['label'] : $properties;
		}

		return $columns;
	}






	public function iterate(bool $include_hidden = true)
	{
		foreach (DB::getInstance()->iterate($this->SQL()) as $row) {
			if ($this->modifier) {
				call_user_func_array($this->modifier, [&$row]);
			}







>
>
>
>
>







147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
			}

			$columns[$alias] = $label_only ? $properties['label'] : $properties;
		}

		return $columns;
	}

	public function countHeaderColumns(): int
	{
		return count($this->getHeaderColumns());
	}

	public function iterate(bool $include_hidden = true)
	{
		foreach (DB::getInstance()->iterate($this->SQL()) as $row) {
			if ($this->modifier) {
				call_user_func_array($this->modifier, [&$row]);
			}

Modified src/templates/users/search.tpl from [261c7a3cdd] to [1b298dc269].

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
					{linkbutton shape="edit" label="Modifier" href="!users/edit.php?id=%d"|args:$row.id}
				{/if}
			</td>
		</tr>
	{/foreach}
		</tbody>
	{if $is_admin}
		{include file="users/_list_actions.tpl" colspan=$list->countHeaderColumns()}
	{/if}
	</table>

	{pagination url=$list->paginationURL() page=$list.page bypage=$list.per_page total=$list->count() use_buttons=true}

{elseif $results}








|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
					{linkbutton shape="edit" label="Modifier" href="!users/edit.php?id=%d"|args:$row.id}
				{/if}
			</td>
		</tr>
	{/foreach}
		</tbody>
	{if $is_admin}
		{include file="users/_list_actions.tpl" colspan=$list->countHeaderColumns()+1}
	{/if}
	</table>

	{pagination url=$list->paginationURL() page=$list.page bypage=$list.per_page total=$list->count() use_buttons=true}

{elseif $results}