Changeset - 2f4effc51867
[Not reviewed]
default
0 2 0
Mads Kiilerich - 9 years ago 2016-12-19 04:46:48
mads@kiilerich.com
style: fix pull request styling

My recent changes broke it. Add some band aid to help it. The pull request page
might not be a perfect fit for Bootstrap forms, but that is a better
approximation than nothing.
2 files changed with 28 insertions and 30 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -3956,13 +3956,13 @@ div.pr-details-title.closed {
 
    color: #555;
 
    background: #eee;
 
}
 

	
 
div.pr-details-title {
 
    font-size: 1.6em;
 
    padding: 5px 0px 5px 10px;
 
    padding: 5px 0px;
 
}
 

	
 
div.pr {
 
    margin: 0px 20px;
 
    padding: 4px 4px;
 
}
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -28,45 +28,43 @@ ${self.repo_context_bar('showpullrequest
 
      <div class="pr-details-title ${'closed' if c.pull_request.is_closed() else ''}">
 
          ${_('Title')}: ${c.pull_request.title}
 
          %if c.pull_request.is_closed():
 
              (${_('Closed')})
 
          %endif
 
      </div>
 
      <div id="pr-summary" class="fields">
 
      <div id="pr-summary" class="form-horizontal">
 

	
 
        <div class="pr-not-edit" style="min-height:37px">
 
        <div class="pr-not-edit form-group" style="min-height:47px">
 
            <label>${_('Description')}:</label>
 
            %if editable:
 
            <div style="margin: 25px 5px; position: absolute">
 
            <div style="margin: 20px 0; position: absolute">
 
              <a class="btn btn-default btn-xs" onclick="$('.pr-do-edit').show();$('.pr-not-edit').hide()">${_("Edit")}</a>
 
            </div>
 
            %endif
 
          <div>
 
            <div class="formatted-fixed">${h.urlify_text(c.pull_request.description, c.pull_request.org_repo.repo_name)}</div>
 
          </div>
 
            <div>
 
              <div class="form-control formatted-fixed">${h.urlify_text(c.pull_request.description, c.pull_request.org_repo.repo_name)}</div>
 
            </div>
 
        </div>
 

	
 
        %if editable:
 
        <div class="pr-do-edit" style="display:none">
 
          <div>
 
        <div class="pr-do-edit form-group" style="display:none">
 
              <label for="pullrequest_title">${_('Title')}:</label>
 
              <div>
 
                  ${h.text('pullrequest_title',class_='form-control',value=c.pull_request.title,placeholder=_('Summarize the changes'))}
 
              </div>
 
          </div>
 
        </div>
 

	
 
          <div>
 
        <div class="pr-do-edit form-group" style="display:none">
 
              <label for="pullrequest_desc">${_('Description')}:</label>
 
              <div>
 
                  ${h.textarea('pullrequest_desc',size=30,content=c.pull_request.description,placeholder=_('Write a short description on this pull request'),class_='form-control')}
 
              </div>
 
          </div>
 
        </div>
 
        %endif
 

	
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Reviewer voting result')}:</label>
 
          <div>
 
            <div class="changeset-status-container" style="float:none;clear:both">
 
            %if c.current_voting_result:
 
              <span class="changeset-status-ico" style="padding:0px 4px 0px 0px">
 
                  <i class="icon-circle changeset-status-${c.current_voting_result}" title="${_('Pull request status calculated from votes')}"></i></span>
 
@@ -77,47 +75,47 @@ ${self.repo_context_bar('showpullrequest
 
                ${h.changeset_status_lbl(c.current_voting_result)}
 
              </span>
 
            %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Still not reviewed by')}:</label>
 
          <div>
 
            % if len(c.pull_request_pending_reviewers) > 0:
 
                <div data-toggle="tooltip" title="${', '.join([x.username for x in c.pull_request_pending_reviewers])}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
 
            % elif len(c.pull_request_reviewers) > 0:
 
                <div>${_('Pull request was reviewed by all reviewers')}</div>
 
            %else:
 
                <div>${_('There are no reviewers')}</div>
 
            %endif
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Origin')}:</label>
 
          <div>
 
            <div>
 
              ${h.link_to_ref(c.pull_request.org_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
 
              %if c.cs_ref_type != 'branch':
 
                ${_('on')} ${h.link_to_ref(c.pull_request.org_repo.repo_name, 'branch', c.cs_branch_name)}
 
              %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Target')}:</label>
 
          <div>
 
            %if c.is_range:
 
              ${_("This is just a range of changesets and doesn't have a target or a real merge ancestor.")}
 
            %else:
 
              ${h.link_to_ref(c.pull_request.other_repo.repo_name, c.a_ref_type, c.a_ref_name)}
 
              ## we don't know other rev - c.a_rev is ancestor and not necessarily on other_name_branch branch
 
            %endif
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Pull changes')}:</label>
 
          <div>
 
            %if c.cs_ranges:
 
              <div>
 
               ## TODO: use cs_ranges[-1] or org_ref_parts[1] in both cases?
 
               %if h.is_hg(c.pull_request.org_repo):
 
@@ -126,32 +124,32 @@ ${self.repo_context_bar('showpullrequest
 
                 <span style="font-family: monospace">git pull ${c.pull_request.org_repo.clone_url()} ${c.pull_request.org_ref_parts[1]}</span>
 
               %endif
 
              </div>
 
            %endif
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Created on')}:</label>
 
          <div>
 
              <div>${h.fmt_date(c.pull_request.created_on)}</div>
 
          </div>
 
        </div>
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Owner')}:</label>
 
          <div class="pr-not-edit">
 
                  ${h.gravatar_div(c.pull_request.owner.email, size=20)}
 
                  <span>${c.pull_request.owner.full_name_and_username}</span><br/>
 
                  <span><a href="mailto:${c.pull_request.owner.email}">${c.pull_request.owner.email}</a></span><br/>
 
          </div>
 
          <div class="pr-do-edit ac" style="display:none">
 
               ${h.text('owner', class_='form-control', value=c.pull_request.owner.username, placeholder=_('Username'))}
 
               <div id="owner_completion_container"></div>
 
          </div>
 
        </div>
 

	
 
        <div>
 
        <div class="form-group">
 
          <label>${_('Next iteration')}:</label>
 
            <div>
 
              <div class="msg-div">${c.update_msg}</div>
 
              %if c.avail_revs:
 
              <div id="updaterevs" style="max-height:200px; overflow-y:auto; overflow-x:hidden; margin-bottom: 10px; padding: 1px 0">
 
                <div style="height:0;width:40px">
 
@@ -192,12 +190,21 @@ ${self.repo_context_bar('showpullrequest
 
              </div>
 
              <div class="msg-div">(${_("Pull request iterations do not change content once created. Select a revision and save to make a new iteration.")})</div>
 
              %endif
 
              <div class="msg-div">${c.update_msg_other}</div>
 
            </div>
 
        </div>
 
        %if editable:
 
        <div class="form-group">
 
          <div class="buttons">
 
            ${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")}
 
            ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')}
 
            ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
 
          </div>
 
        </div>
 
        %endif
 
      </div>
 
    </div>
 
    ## REVIEWERS
 
    <div style="float:left; border-left:1px dashed #eee">
 
        <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
 
        <div id="reviewers" style="padding:0px 0px 5px 10px">
 
@@ -264,22 +271,13 @@ ${self.repo_context_bar('showpullrequest
 
              </li>
 
            %endfor
 
          </ul>
 
        </div>
 
        %endif
 
    </div>
 
    <div class="form" style="clear:both">
 
      <div class="fields">
 
        %if editable:
 
          <div class="buttons">
 
            ${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")}
 
            ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')}
 
            ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
 
          </div>
 
        %endif
 
      </div>
 
    <div style="clear:both">
 
    </div>
 
  ${h.end_form()}
 
</div>
 

	
 
<div class="panel panel-primary">
 
    <div class="panel-heading">
0 comments (0 inline, 0 general)