#3683 put users search box back in the user listing page
Merged 5 years ago by pingou. Opened 5 years ago by ryanlerch.
ryanlerch/pagure user-search  into  master

@@ -3,6 +3,8 @@ 

  {% set tag = "users" %}

  {% from "_browseheader.html" import browse_header %}

  {% from "_projectstring.html" import projectstring, projecticon %}

+ {% from "_render_repo.html" import searchbox %}

+ 

  

  {% block header %}

  <link href="{{ url_for('static', filename='vendor/selectize/selectize.bootstrap3.css') }}"
@@ -21,15 +23,11 @@ 

    <div class="col">

      <h3 class="mb-3 font-weight-bold">

        Users <span class="badge badge-secondary">{{ users_length }}</span>

-       {%- if g.authenticated and config.get('PAGURE_AUTH') == 'local' %}

-       <a href="{{ url_for('ui_ns.new_user') }}">

-       <button type="button" class="btn btn-outline-success float-right">

-           New User

-       </button>

-       </a>

-       {% endif -%}

+       <div class="pull-right">

+         {{searchbox(select="users")}}

+       </div>

      </h3>

-     <div class="row">

+     <div class="row mt-5">

      {% for user in users %}

        <div class="col-lg-4 col-md-6">

          <div class="border mb-4">

@@ -62,7 +62,7 @@ 

          output_text = output.get_data(as_text=True)

          self.assertIn(

              '<h3 class="mb-3 font-weight-bold">\n      Users '

-             '<span class="badge badge-secondary">2</span></h3>', output_text)

+             '<span class="badge badge-secondary">2</span>', output_text)

          self.assertIn(

              '<a href="/user/pingou">\n                  '

              '<div class="nowrap"><strong>pingou</strong>',

rebased onto c2ec01a

5 years ago

1 new commit added

  • Fix unit-tests for the re-introduction of the search bar for users
5 years ago

Tests are now passing and local testing shows it looks nice and is working.

Thanks @ryanlerch!

Pull-Request has been merged by pingou

5 years ago