[PATCH 1/2] (koji-web) Add user-specific css classes.

Dennis Gilmore dennis at ausil.us
Thu May 7 18:13:20 UTC 2015


On Monday, April 27, 2015 02:20:30 PM Ralph Bean wrote:
> This will allow us in Fedora to style system account names differently.  For
> instance, we can markup the name 'koschei' (our continuous integration
> bot). ---
>  www/kojiweb/buildinfo.chtml   | 2 +-
>  www/kojiweb/builds.chtml      | 2 +-
>  www/kojiweb/index.chtml       | 4 ++--
>  www/kojiweb/packageinfo.chtml | 2 +-
>  www/kojiweb/packages.chtml    | 2 +-
>  www/kojiweb/tasks.chtml       | 2 +-
>  6 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/www/kojiweb/buildinfo.chtml b/www/kojiweb/buildinfo.chtml
> index 65fc3ba..07c62fd 100644
> --- a/www/kojiweb/buildinfo.chtml
> +++ b/www/kojiweb/buildinfo.chtml
> @@ -45,7 +45,7 @@
>      </tr>
>      #end if
>      <tr>
> -      <th>Built by</th><td><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> +     
> <th>Built by</th><td class="user-$build.owner_name"><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> </tr>
>      <tr>
>        #set $stateName = $util.stateName($build.state)
> diff --git a/www/kojiweb/builds.chtml b/www/kojiweb/builds.chtml
> index f221ffa..337c466 100644
> --- a/www/kojiweb/builds.chtml
> +++ b/www/kojiweb/builds.chtml
> @@ -134,7 +134,7 @@
>            #if $tag
>            <td><a
> href="taginfo?tagID=$build.tag_id">$build.tag_name</a></td> #end if
> -          <td><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> +        
>  <td class="user-$build.owner_name"><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td>
> <td>$util.formatTime($build.completion_time)</td>
>            #set $stateName = $util.stateName($build.state)
>            <td class="$stateName">$util.stateImage($build.state)</td>
> diff --git a/www/kojiweb/index.chtml b/www/kojiweb/index.chtml
> index f631217..7613fe6 100644
> --- a/www/kojiweb/index.chtml
> +++ b/www/kojiweb/index.chtml
> @@ -22,7 +22,7 @@
>        <td>$build.build_id</td>
>        <td><a href="buildinfo?buildID=$build.build_id">$build.nvr</a></td>
>        #if not $user
> -      <td><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> +     
> <td class="user-$build.owner_name"><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> #end if
>        <td>$util.formatTime($build.completion_time)</td>
>        <td class="$stateName">$util.stateImage($build.state)</td>
> @@ -55,7 +55,7 @@
>        <td>$task.id</td>
>        <td><a href="taskinfo?taskID=$task.id" class="task$state"
> title="$state">$koji.taskLabel($task)</a></td> #if not $user
> -      <td>
> +      <td class="user-$task.owner_name">
>          #if $task.owner_type == $koji.USERTYPES['HOST']
>          <a href="hostinfo?userID=$task.owner">$task.owner_name</a>
>          #else
> diff --git a/www/kojiweb/packageinfo.chtml b/www/kojiweb/packageinfo.chtml
> index e0fcb71..313bc88 100644
> --- a/www/kojiweb/packageinfo.chtml
> +++ b/www/kojiweb/packageinfo.chtml
> @@ -47,7 +47,7 @@
>            #for $build in $builds
>            <tr class="$util.rowToggle($self)">
>              <td><a
> href="buildinfo?buildID=$build.build_id">$build.nvr</a></td> -           
> <td><a href="userinfo?userID=$build.owner_id">$build.owner_name</a></td> + 
>           <td class="user-$build.owner_name"><a
> href="userinfo?userID=$build.owner_id">$build.owner_name</a></td>
> <td>$util.formatTime($build.completion_time)</td>
>              #set $stateName = $util.stateName($build.state)
>              <td class="$stateName">$util.stateImage($build.state)</td>
> diff --git a/www/kojiweb/packages.chtml b/www/kojiweb/packages.chtml
> index 6de2cf8..08cae84 100644
> --- a/www/kojiweb/packages.chtml
> +++ b/www/kojiweb/packages.chtml
> @@ -78,7 +78,7 @@
>            <td><a
> href="packageinfo?packageID=$package.package_id">$package.package_name</a><
> /td> #if $tag or $user
>            <td><a
> href="taginfo?tagID=$package.tag_id">$package.tag_name</a></td> -         
> <td><a
> href="userinfo?userID=$package.owner_id">$package.owner_name</a></td> +    
>      <td class="user-$package.owner_name"><a
> href="userinfo?userID=$package.owner_id">$package.owner_name</a></td> <td
> class="$str(not $package.blocked).lower()">#if $package.blocked then
> $util.imageTag('no') else $util.imageTag('yes')#</td> #end if
>          </tr>
> diff --git a/www/kojiweb/tasks.chtml b/www/kojiweb/tasks.chtml
> index 897bfcc..4c1a32f 100644
> --- a/www/kojiweb/tasks.chtml
> +++ b/www/kojiweb/tasks.chtml
> @@ -145,7 +145,7 @@ All
>              $printChildren($task.id, $task.descendents)
>              #end if
>            </td>
> -          <td>
> +          <td class="user-$task.owner_name">
>              #if $task.owner_type == $koji.USERTYPES['HOST']
>              <a href="hostinfo?userID=$task.owner">$task.owner_name</a>
>              #else

Ack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.fedoraproject.org/pipermail/buildsys/attachments/20150507/9b455d91/attachment.sig>


More information about the buildsys mailing list