#3113 Move source git urls above contibutors list
Merged 7 years ago by pingou. Opened 7 years ago by yadnesh45.
yadnesh45/pagure change_url_pos  into  master

file modified
+70 -70
@@ -51,6 +51,76 @@ 

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

          <div class="card">

            <div class="card-block">

+               <h5><strong>Source GIT URLs</strong>{% if

+                 (authenticated and g.repo_committer) or

+                 (config['DOC_APP_URL'] and repo and

+                         repo.settings.get('project_documentation', True))

+                 %}

+                     <span class="pull-xs-right"><a data-toggle="collapse" href="#moregiturls"

+                     aria-expanded="false" aria-controls="moregiturls"

+                     id="more_gits">more</a></span>{%endif%}</h5>

+               <div>

+                 {% if g.authenticated and g.repo_committer %}

+                 <div class="form-group">

+                   <div class="input-group input-group-sm">

+                     <div class="input-group-addon">SSH</div>

+                     <input class="form-control" type="text" value="{{

+                       git_url_ssh }}{{ repo.fullname }}.git" readonly>

+                   </div>

+                 </div>

+                 {% endif %}

+                 <div class="form-group">

+                   <div class="input-group input-group-sm">

+                     <div class="input-group-addon">GIT</div>

+                     <input class="form-control" type="text" value="{{

+                       config.get('GIT_URL_GIT') }}{{ repo.fullname }}.git" readonly>

+                   </div>

+                 </div>

+                 <div class="collapse" id="moregiturls">

+                   {% if config['DOC_APP_URL']

+                       and repo

+                       and repo.settings.get('project_documentation', True) %}

+                     <h5><strong>Docs GIT URLs</strong></h5>

+                     {% if g.authenticated and g.repo_committer %}

+                       <div class="form-group">

+                         <div class="input-group input-group-sm">

+                           <div class="input-group-addon">SSH</div>

+                           <input class="form-control" type="text" value="{{

+                             git_url_ssh }}docs/{{ repo.fullname }}.git" readonly>

+                         </div>

+                       </div>

+                     {% endif %}

+                     <div class="form-group">

+                       <div class="input-group input-group-sm">

+                         <div class="input-group-addon">GIT</div>

+                         <input class="form-control" type="text" value="{{

+                           config.get('GIT_URL_GIT') }}docs/{{ repo.fullname }}.git" readonly>

+                       </div>

+                     </div>

+                   {% endif %}

+                   {% if g.authenticated and g.repo_committer %}

+                     {% if config.get('ENABLE_TICKETS', True)

+                        and repo.settings.get('issue_tracker', True) %}

+                       <h5><strong>Issues GIT URLs</strong></h5>

+                       <div class="form-group">

+                         <div class="input-group input-group-sm">

+                           <div class="input-group-addon">SSH</div>

+                           <input class="form-control" type="text" value="{{

+                             git_url_ssh }}tickets/{{ repo.fullname }}.git" readonly>

+                         </div>

+                       </div>

+                     {% endif %}

+                     <h5><strong>Pull Requests GIT URLs</strong></h5>

+                     <div class="form-group">

+                       <div class="input-group input-group-sm">

+                         <div class="input-group-addon">SSH</div>

+                         <input class="form-control" type="text" value="{{

+                           git_url_ssh }}requests/{{ repo.fullname }}.git" readonly>

+                       </div>

+                     </div>

+                   {% endif %}

+                 </div>

+               </div>

              <h5><strong>Contributors</strong></h5>

              <div class="m-b-2">

                <div>
@@ -167,76 +237,6 @@ 

                  </a>

              </div>

              {% endif %}

-             <h5><strong>Source GIT URLs</strong>{% if

-               (authenticated and g.repo_committer) or

-               (config['DOC_APP_URL'] and repo and

-                       repo.settings.get('project_documentation', True))

-               %}

-                   <span class="pull-xs-right"><a data-toggle="collapse" href="#moregiturls"

-                   aria-expanded="false" aria-controls="moregiturls"

-                   id="more_gits">more</a></span>{%endif%}</h5>

-             <div>

-               {% if g.authenticated and g.repo_committer %}

-               <div class="form-group">

-                 <div class="input-group input-group-sm">

-                   <div class="input-group-addon">SSH</div>

-                   <input class="form-control" type="text" value="{{

-                     git_url_ssh }}{{ repo.fullname }}.git" readonly>

-                 </div>

-               </div>

-               {% endif %}

-               <div class="form-group">

-                 <div class="input-group input-group-sm">

-                   <div class="input-group-addon">GIT</div>

-                   <input class="form-control" type="text" value="{{

-                     config.get('GIT_URL_GIT') }}{{ repo.fullname }}.git" readonly>

-                 </div>

-               </div>

-               <div class="collapse" id="moregiturls">

-                 {% if config['DOC_APP_URL']

-                     and repo

-                     and repo.settings.get('project_documentation', True) %}

-                   <h5><strong>Docs GIT URLs</strong></h5>

-                   {% if g.authenticated and g.repo_committer %}

-                     <div class="form-group">

-                       <div class="input-group input-group-sm">

-                         <div class="input-group-addon">SSH</div>

-                         <input class="form-control" type="text" value="{{

-                           git_url_ssh }}docs/{{ repo.fullname }}.git" readonly>

-                       </div>

-                     </div>

-                   {% endif %}

-                   <div class="form-group">

-                     <div class="input-group input-group-sm">

-                       <div class="input-group-addon">GIT</div>

-                       <input class="form-control" type="text" value="{{

-                         config.get('GIT_URL_GIT') }}docs/{{ repo.fullname }}.git" readonly>

-                     </div>

-                   </div>

-                 {% endif %}

-                 {% if g.authenticated and g.repo_committer %}

-                   {% if config.get('ENABLE_TICKETS', True)

-                      and repo.settings.get('issue_tracker', True) %}

-                     <h5><strong>Issues GIT URLs</strong></h5>

-                     <div class="form-group">

-                       <div class="input-group input-group-sm">

-                         <div class="input-group-addon">SSH</div>

-                         <input class="form-control" type="text" value="{{

-                           git_url_ssh }}tickets/{{ repo.fullname }}.git" readonly>

-                       </div>

-                     </div>

-                   {% endif %}

-                   <h5><strong>Pull Requests GIT URLs</strong></h5>

-                   <div class="form-group">

-                     <div class="input-group input-group-sm">

-                       <div class="input-group-addon">SSH</div>

-                       <input class="form-control" type="text" value="{{

-                         git_url_ssh }}requests/{{ repo.fullname }}.git" readonly>

-                     </div>

-                   </div>

-                 {% endif %}

-               </div>

-             </div>

            </div>

            <div class="repo_date" title="{{repo.date_created}}">

                created {{repo.date_created|humanize}}

I kinda think I'd prefer to keep the contributors at the top.

@pfrields what do you think?

@pingou How about a scroll for branches because if there are too many, the source url get pushed down

We could place the branches under the URLs and keep the contributors at the top.

Let's wait to hear back from @pfrields :)

The problem is that branch and contributor lists are essentially unbounded, while source URLs are basically small, fixed size. You will never run the risk of a branch or contributor list pushing them out of sight, while the opposite isn't true. However, another good way to solve this would be to limit the size of the branch and contributor lists, say to 6-8 entries, with a "Show all..." prompt to dynamically open up the box.

@pfrields would you still put URLs above or under contributors then?

I would still put it above. I can't see what problem is solved by keeping it at bottom when it's fixed size. If the problem is that you want people to know the contributors involved, then that should come second, but you don't also want to create the problem of branch list being pushed offscreen if it's not necessary. Just my $0.02.

In this case @yadnesh45 let's rebase and merge this PR, we can fine tune the drop-down for branches and contributors later :)

@yadnesh45 Could you rebase this pull-request?

rebased onto 4c521d4

7 years ago

Pull-Request has been merged by pingou

7 years ago